Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42821a5b authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

vxge: make functions local and remove dead code



Use results of make namespacecheck to make functions local and
remove code that is not used.

Also rename initialize_ethtool_ops to vxge_initialize_ethtool_ops.

Compile tested only.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89ff05ec
Loading
Loading
Loading
Loading
+247 −85
Original line number Original line Diff line number Diff line
@@ -20,6 +20,179 @@
#include "vxge-traffic.h"
#include "vxge-traffic.h"
#include "vxge-config.h"
#include "vxge-config.h"


static enum vxge_hw_status
__vxge_hw_fifo_create(
	struct __vxge_hw_vpath_handle *vpath_handle,
	struct vxge_hw_fifo_attr *attr);

static enum vxge_hw_status
__vxge_hw_fifo_abort(
	struct __vxge_hw_fifo *fifoh);

static enum vxge_hw_status
__vxge_hw_fifo_reset(
	struct __vxge_hw_fifo *ringh);

static enum vxge_hw_status
__vxge_hw_fifo_delete(
	struct __vxge_hw_vpath_handle *vpath_handle);

static struct __vxge_hw_blockpool_entry *
__vxge_hw_blockpool_block_allocate(struct __vxge_hw_device *hldev,
			u32 size);

static void
__vxge_hw_blockpool_block_free(struct __vxge_hw_device *hldev,
			struct __vxge_hw_blockpool_entry *entry);

static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
					void *block_addr,
					u32 length,
					struct pci_dev *dma_h,
					struct pci_dev *acc_handle);

static enum vxge_hw_status
__vxge_hw_blockpool_create(struct __vxge_hw_device *hldev,
			struct __vxge_hw_blockpool  *blockpool,
			u32 pool_size,
			u32 pool_max);

static void
__vxge_hw_blockpool_destroy(struct __vxge_hw_blockpool  *blockpool);

static void *
__vxge_hw_blockpool_malloc(struct __vxge_hw_device *hldev,
			u32 size,
			struct vxge_hw_mempool_dma *dma_object);

static void
__vxge_hw_blockpool_free(struct __vxge_hw_device *hldev,
			void *memblock,
			u32 size,
			struct vxge_hw_mempool_dma *dma_object);


static struct __vxge_hw_channel*
__vxge_hw_channel_allocate(struct __vxge_hw_vpath_handle *vph,
			enum __vxge_hw_channel_type type, u32 length,
			u32 per_dtr_space, void *userdata);

static void
__vxge_hw_channel_free(
	struct __vxge_hw_channel *channel);

static enum vxge_hw_status
__vxge_hw_channel_initialize(
	struct __vxge_hw_channel *channel);

static enum vxge_hw_status
__vxge_hw_channel_reset(
	struct __vxge_hw_channel *channel);

static enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp);

static enum vxge_hw_status
__vxge_hw_device_fifo_config_check(struct vxge_hw_fifo_config *fifo_config);

static enum vxge_hw_status
__vxge_hw_device_config_check(struct vxge_hw_device_config *new_config);

static void
__vxge_hw_device_id_get(struct __vxge_hw_device *hldev);

static void
__vxge_hw_device_host_info_get(struct __vxge_hw_device *hldev);

static enum vxge_hw_status
__vxge_hw_vpath_card_info_get(
	u32 vp_id,
	struct vxge_hw_vpath_reg __iomem *vpath_reg,
	struct vxge_hw_device_hw_info *hw_info);

static enum vxge_hw_status
__vxge_hw_device_initialize(struct __vxge_hw_device *hldev);

static void
__vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev);

static enum vxge_hw_status
__vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev);

static enum vxge_hw_status
__vxge_hw_device_register_poll(
	void __iomem	*reg,
	u64 mask, u32 max_millis);

static inline enum vxge_hw_status
__vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr,
			  u64 mask, u32 max_millis)
{
	__vxge_hw_pio_mem_write32_lower((u32)vxge_bVALn(val64, 32, 32), addr);
	wmb();

	__vxge_hw_pio_mem_write32_upper((u32)vxge_bVALn(val64, 0, 32), addr);
	wmb();

	return  __vxge_hw_device_register_poll(addr, mask, max_millis);
}

static struct vxge_hw_mempool*
__vxge_hw_mempool_create(struct __vxge_hw_device *devh, u32 memblock_size,
			 u32 item_size,	u32 private_size, u32 items_initial,
			 u32 items_max,	struct vxge_hw_mempool_cbs *mp_callback,
			 void *userdata);
static void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool);

static enum vxge_hw_status
__vxge_hw_vpath_stats_get(struct __vxge_hw_virtualpath *vpath,
			  struct vxge_hw_vpath_stats_hw_info *hw_stats);

static enum vxge_hw_status
vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vpath_handle);

static enum vxge_hw_status
__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg);

static u64
__vxge_hw_vpath_pci_func_mode_get(u32  vp_id,
				  struct vxge_hw_vpath_reg __iomem *vpath_reg);

static u32
__vxge_hw_vpath_func_id_get(u32 vp_id, struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg);

static enum vxge_hw_status
__vxge_hw_vpath_addr_get(u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
			 u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN]);

static enum vxge_hw_status
__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath);


static enum vxge_hw_status
__vxge_hw_vpath_sw_reset(struct __vxge_hw_device *devh, u32 vp_id);

static enum vxge_hw_status
__vxge_hw_vpath_fw_ver_get(u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
			   struct vxge_hw_device_hw_info *hw_info);

static enum vxge_hw_status
__vxge_hw_vpath_mac_configure(struct __vxge_hw_device *devh, u32 vp_id);

static void
__vxge_hw_vp_terminate(struct __vxge_hw_device *devh, u32 vp_id);

static enum vxge_hw_status
__vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
			     u32 operation, u32 offset,	u64 *stat);

static enum vxge_hw_status
__vxge_hw_vpath_xmac_tx_stats_get(struct __vxge_hw_virtualpath	*vpath,
				  struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats);

static enum vxge_hw_status
__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath	*vpath,
				  struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats);

/*
/*
 * __vxge_hw_channel_allocate - Allocate memory for channel
 * __vxge_hw_channel_allocate - Allocate memory for channel
 * This function allocates required memory for the channel and various arrays
 * This function allocates required memory for the channel and various arrays
@@ -190,7 +363,7 @@ __vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev)
 * Will poll certain register for specified amount of time.
 * Will poll certain register for specified amount of time.
 * Will poll until masked bit is not cleared.
 * Will poll until masked bit is not cleared.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
__vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
{
{
	u64 val64;
	u64 val64;
@@ -221,7 +394,7 @@ __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
 * in progress
 * in progress
 * This routine checks the vpath reset in progress register is turned zero
 * This routine checks the vpath reset in progress register is turned zero
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog)
__vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog)
{
{
	enum vxge_hw_status status;
	enum vxge_hw_status status;
@@ -236,7 +409,7 @@ __vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog)
 * This routine sets the swapper and reads the toc pointer and returns the
 * This routine sets the swapper and reads the toc pointer and returns the
 * memory mapped address of the toc
 * memory mapped address of the toc
 */
 */
struct vxge_hw_toc_reg __iomem *
static struct vxge_hw_toc_reg __iomem *
__vxge_hw_device_toc_get(void __iomem *bar0)
__vxge_hw_device_toc_get(void __iomem *bar0)
{
{
	u64 val64;
	u64 val64;
@@ -779,7 +952,7 @@ vxge_hw_mrpcim_stats_access(struct __vxge_hw_device *hldev,
 * vxge_hw_device_xmac_aggr_stats_get - Get the Statistics on aggregate port
 * vxge_hw_device_xmac_aggr_stats_get - Get the Statistics on aggregate port
 * Get the Statistics on aggregate port
 * Get the Statistics on aggregate port
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
vxge_hw_device_xmac_aggr_stats_get(struct __vxge_hw_device *hldev, u32 port,
vxge_hw_device_xmac_aggr_stats_get(struct __vxge_hw_device *hldev, u32 port,
				   struct vxge_hw_xmac_aggr_stats *aggr_stats)
				   struct vxge_hw_xmac_aggr_stats *aggr_stats)
{
{
@@ -814,7 +987,7 @@ vxge_hw_device_xmac_aggr_stats_get(struct __vxge_hw_device *hldev, u32 port,
 * vxge_hw_device_xmac_port_stats_get - Get the Statistics on a port
 * vxge_hw_device_xmac_port_stats_get - Get the Statistics on a port
 * Get the Statistics on port
 * Get the Statistics on port
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
vxge_hw_device_xmac_port_stats_get(struct __vxge_hw_device *hldev, u32 port,
vxge_hw_device_xmac_port_stats_get(struct __vxge_hw_device *hldev, u32 port,
				   struct vxge_hw_xmac_port_stats *port_stats)
				   struct vxge_hw_xmac_port_stats *port_stats)
{
{
@@ -952,20 +1125,6 @@ u32 vxge_hw_device_trace_level_get(struct __vxge_hw_device *hldev)
	return 0;
	return 0;
#endif
#endif
}
}
/*
 * vxge_hw_device_debug_mask_get - Get the debug mask
 * This routine returns the current debug mask set
 */
u32 vxge_hw_device_debug_mask_get(struct __vxge_hw_device *hldev)
{
#if defined(VXGE_DEBUG_TRACE_MASK) || defined(VXGE_DEBUG_ERR_MASK)
	if (hldev == NULL)
		return 0;
	return hldev->debug_module_mask;
#else
	return 0;
#endif
}


/*
/*
 * vxge_hw_getpause_data -Pause frame frame generation and reception.
 * vxge_hw_getpause_data -Pause frame frame generation and reception.
@@ -1090,7 +1249,7 @@ __vxge_hw_ring_block_next_pointer_set(u8 *block, dma_addr_t dma_next)
 *             first block
 *             first block
 * Returns the dma address of the first RxD block
 * Returns the dma address of the first RxD block
 */
 */
u64 __vxge_hw_ring_first_block_address_get(struct __vxge_hw_ring *ring)
static u64 __vxge_hw_ring_first_block_address_get(struct __vxge_hw_ring *ring)
{
{
	struct vxge_hw_mempool_dma *dma_object;
	struct vxge_hw_mempool_dma *dma_object;


@@ -1252,7 +1411,7 @@ vxge_hw_ring_replenish(struct __vxge_hw_ring *ring)
 * This function creates Ring and initializes it.
 * This function creates Ring and initializes it.
 *
 *
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_ring_create(struct __vxge_hw_vpath_handle *vp,
__vxge_hw_ring_create(struct __vxge_hw_vpath_handle *vp,
		      struct vxge_hw_ring_attr *attr)
		      struct vxge_hw_ring_attr *attr)
{
{
@@ -1363,7 +1522,7 @@ __vxge_hw_ring_create(struct __vxge_hw_vpath_handle *vp,
 * __vxge_hw_ring_abort - Returns the RxD
 * __vxge_hw_ring_abort - Returns the RxD
 * This function terminates the RxDs of ring
 * This function terminates the RxDs of ring
 */
 */
enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
static enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
{
{
	void *rxdh;
	void *rxdh;
	struct __vxge_hw_channel *channel;
	struct __vxge_hw_channel *channel;
@@ -1392,7 +1551,7 @@ enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
 * __vxge_hw_ring_reset - Resets the ring
 * __vxge_hw_ring_reset - Resets the ring
 * This function resets the ring during vpath reset operation
 * This function resets the ring during vpath reset operation
 */
 */
enum vxge_hw_status __vxge_hw_ring_reset(struct __vxge_hw_ring *ring)
static enum vxge_hw_status __vxge_hw_ring_reset(struct __vxge_hw_ring *ring)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct __vxge_hw_channel *channel;
	struct __vxge_hw_channel *channel;
@@ -1419,7 +1578,7 @@ enum vxge_hw_status __vxge_hw_ring_reset(struct __vxge_hw_ring *ring)
 * __vxge_hw_ring_delete - Removes the ring
 * __vxge_hw_ring_delete - Removes the ring
 * This function freeup the memory pool and removes the ring
 * This function freeup the memory pool and removes the ring
 */
 */
enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp)
static enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp)
{
{
	struct __vxge_hw_ring *ring = vp->vpath->ringh;
	struct __vxge_hw_ring *ring = vp->vpath->ringh;


@@ -1438,7 +1597,7 @@ enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp)
 * __vxge_hw_mempool_grow
 * __vxge_hw_mempool_grow
 * Will resize mempool up to %num_allocate value.
 * Will resize mempool up to %num_allocate value.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
__vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
		       u32 *num_allocated)
		       u32 *num_allocated)
{
{
@@ -1527,7 +1686,7 @@ __vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
 * with size enough to hold %items_initial number of items. Memory is
 * with size enough to hold %items_initial number of items. Memory is
 * DMA-able but client must map/unmap before interoperating with the device.
 * DMA-able but client must map/unmap before interoperating with the device.
 */
 */
struct vxge_hw_mempool*
static struct vxge_hw_mempool*
__vxge_hw_mempool_create(
__vxge_hw_mempool_create(
	struct __vxge_hw_device *devh,
	struct __vxge_hw_device *devh,
	u32 memblock_size,
	u32 memblock_size,
@@ -1644,7 +1803,7 @@ __vxge_hw_mempool_create(
/*
/*
 * vxge_hw_mempool_destroy
 * vxge_hw_mempool_destroy
 */
 */
void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool)
static void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool)
{
{
	u32 i, j;
	u32 i, j;
	struct __vxge_hw_device *devh = mempool->devh;
	struct __vxge_hw_device *devh = mempool->devh;
@@ -1700,7 +1859,7 @@ __vxge_hw_device_fifo_config_check(struct vxge_hw_fifo_config *fifo_config)
 * __vxge_hw_device_vpath_config_check - Check vpath configuration.
 * __vxge_hw_device_vpath_config_check - Check vpath configuration.
 * Check the vpath configuration
 * Check the vpath configuration
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_device_vpath_config_check(struct vxge_hw_vp_config *vp_config)
__vxge_hw_device_vpath_config_check(struct vxge_hw_vp_config *vp_config)
{
{
	enum vxge_hw_status status;
	enum vxge_hw_status status;
@@ -1922,7 +2081,7 @@ vxge_hw_device_config_default_get(struct vxge_hw_device_config *device_config)
 * _hw_legacy_swapper_set - Set the swapper bits for the legacy secion.
 * _hw_legacy_swapper_set - Set the swapper bits for the legacy secion.
 * Set the swapper bits appropriately for the lagacy section.
 * Set the swapper bits appropriately for the lagacy section.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg)
__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg)
{
{
	u64 val64;
	u64 val64;
@@ -1977,7 +2136,7 @@ __vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg)
 * __vxge_hw_vpath_swapper_set - Set the swapper bits for the vpath.
 * __vxge_hw_vpath_swapper_set - Set the swapper bits for the vpath.
 * Set the swapper bits appropriately for the vpath.
 * Set the swapper bits appropriately for the vpath.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg)
__vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg)
{
{
#ifndef __BIG_ENDIAN
#ifndef __BIG_ENDIAN
@@ -1996,7 +2155,7 @@ __vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg)
 * __vxge_hw_kdfc_swapper_set - Set the swapper bits for the kdfc.
 * __vxge_hw_kdfc_swapper_set - Set the swapper bits for the kdfc.
 * Set the swapper bits appropriately for the vpath.
 * Set the swapper bits appropriately for the vpath.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_kdfc_swapper_set(
__vxge_hw_kdfc_swapper_set(
	struct vxge_hw_legacy_reg __iomem *legacy_reg,
	struct vxge_hw_legacy_reg __iomem *legacy_reg,
	struct vxge_hw_vpath_reg __iomem *vpath_reg)
	struct vxge_hw_vpath_reg __iomem *vpath_reg)
@@ -2020,28 +2179,6 @@ __vxge_hw_kdfc_swapper_set(
	return VXGE_HW_OK;
	return VXGE_HW_OK;
}
}


/*
 * vxge_hw_mgmt_device_config - Retrieve device configuration.
 * Get device configuration. Permits to retrieve at run-time configuration
 * values that were used to initialize and configure the device.
 */
enum vxge_hw_status
vxge_hw_mgmt_device_config(struct __vxge_hw_device *hldev,
			   struct vxge_hw_device_config *dev_config, int size)
{

	if ((hldev == NULL) || (hldev->magic != VXGE_HW_DEVICE_MAGIC))
		return VXGE_HW_ERR_INVALID_DEVICE;

	if (size != sizeof(struct vxge_hw_device_config))
		return VXGE_HW_ERR_VERSION_CONFLICT;

	memcpy(dev_config, &hldev->config,
		sizeof(struct vxge_hw_device_config));

	return VXGE_HW_OK;
}

/*
/*
 * vxge_hw_mgmt_reg_read - Read Titan register.
 * vxge_hw_mgmt_reg_read - Read Titan register.
 */
 */
@@ -2438,7 +2575,7 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp,
 * __vxge_hw_fifo_abort - Returns the TxD
 * __vxge_hw_fifo_abort - Returns the TxD
 * This function terminates the TxDs of fifo
 * This function terminates the TxDs of fifo
 */
 */
enum vxge_hw_status __vxge_hw_fifo_abort(struct __vxge_hw_fifo *fifo)
static enum vxge_hw_status __vxge_hw_fifo_abort(struct __vxge_hw_fifo *fifo)
{
{
	void *txdlh;
	void *txdlh;


@@ -2466,7 +2603,7 @@ enum vxge_hw_status __vxge_hw_fifo_abort(struct __vxge_hw_fifo *fifo)
 * __vxge_hw_fifo_reset - Resets the fifo
 * __vxge_hw_fifo_reset - Resets the fifo
 * This function resets the fifo during vpath reset operation
 * This function resets the fifo during vpath reset operation
 */
 */
enum vxge_hw_status __vxge_hw_fifo_reset(struct __vxge_hw_fifo *fifo)
static enum vxge_hw_status __vxge_hw_fifo_reset(struct __vxge_hw_fifo *fifo)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;


@@ -2501,7 +2638,7 @@ enum vxge_hw_status __vxge_hw_fifo_delete(struct __vxge_hw_vpath_handle *vp)
 *                          in pci config space.
 *                          in pci config space.
 * Read from the vpath pci config space.
 * Read from the vpath pci config space.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_pci_read(struct __vxge_hw_virtualpath *vpath,
__vxge_hw_vpath_pci_read(struct __vxge_hw_virtualpath *vpath,
			 u32 phy_func_0, u32 offset, u32 *val)
			 u32 phy_func_0, u32 offset, u32 *val)
{
{
@@ -2542,7 +2679,7 @@ __vxge_hw_vpath_pci_read(struct __vxge_hw_virtualpath *vpath,
 * __vxge_hw_vpath_func_id_get - Get the function id of the vpath.
 * __vxge_hw_vpath_func_id_get - Get the function id of the vpath.
 * Returns the function number of the vpath.
 * Returns the function number of the vpath.
 */
 */
u32
static u32
__vxge_hw_vpath_func_id_get(u32 vp_id,
__vxge_hw_vpath_func_id_get(u32 vp_id,
	struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
	struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
{
{
@@ -2573,7 +2710,7 @@ __vxge_hw_read_rts_ds(struct vxge_hw_vpath_reg __iomem *vpath_reg,
 * __vxge_hw_vpath_card_info_get - Get the serial numbers,
 * __vxge_hw_vpath_card_info_get - Get the serial numbers,
 * part number and product description.
 * part number and product description.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_card_info_get(
__vxge_hw_vpath_card_info_get(
	u32 vp_id,
	u32 vp_id,
	struct vxge_hw_vpath_reg __iomem *vpath_reg,
	struct vxge_hw_vpath_reg __iomem *vpath_reg,
@@ -2695,7 +2832,7 @@ __vxge_hw_vpath_card_info_get(
 * __vxge_hw_vpath_fw_ver_get - Get the fw version
 * __vxge_hw_vpath_fw_ver_get - Get the fw version
 * Returns FW Version
 * Returns FW Version
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_fw_ver_get(
__vxge_hw_vpath_fw_ver_get(
	u32 vp_id,
	u32 vp_id,
	struct vxge_hw_vpath_reg __iomem *vpath_reg,
	struct vxge_hw_vpath_reg __iomem *vpath_reg,
@@ -2789,7 +2926,7 @@ __vxge_hw_vpath_fw_ver_get(
 * __vxge_hw_vpath_pci_func_mode_get - Get the pci mode
 * __vxge_hw_vpath_pci_func_mode_get - Get the pci mode
 * Returns pci function mode
 * Returns pci function mode
 */
 */
u64
static u64
__vxge_hw_vpath_pci_func_mode_get(
__vxge_hw_vpath_pci_func_mode_get(
	u32  vp_id,
	u32  vp_id,
	struct vxge_hw_vpath_reg __iomem *vpath_reg)
	struct vxge_hw_vpath_reg __iomem *vpath_reg)
@@ -2995,7 +3132,7 @@ __vxge_hw_vpath_rts_table_set(
 * __vxge_hw_vpath_addr_get - Get the hw address entry for this vpath
 * __vxge_hw_vpath_addr_get - Get the hw address entry for this vpath
 *               from MAC address table.
 *               from MAC address table.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_addr_get(
__vxge_hw_vpath_addr_get(
	u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
	u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
	u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN])
	u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN])
@@ -3347,7 +3484,7 @@ __vxge_hw_vpath_mgmt_read(
 * This routine checks the vpath_rst_in_prog register to see if
 * This routine checks the vpath_rst_in_prog register to see if
 * adapter completed the reset process for the vpath
 * adapter completed the reset process for the vpath
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
{
{
	enum vxge_hw_status status;
	enum vxge_hw_status status;
@@ -3365,7 +3502,7 @@ __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
 * __vxge_hw_vpath_reset
 * __vxge_hw_vpath_reset
 * This routine resets the vpath on the device
 * This routine resets the vpath on the device
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_reset(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_reset(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3383,7 +3520,7 @@ __vxge_hw_vpath_reset(struct __vxge_hw_device *hldev, u32 vp_id)
 * __vxge_hw_vpath_sw_reset
 * __vxge_hw_vpath_sw_reset
 * This routine resets the vpath structures
 * This routine resets the vpath structures
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_sw_reset(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_sw_reset(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
@@ -3408,7 +3545,7 @@ __vxge_hw_vpath_sw_reset(struct __vxge_hw_device *hldev, u32 vp_id)
 * This routine configures the prc registers of virtual path using the config
 * This routine configures the prc registers of virtual path using the config
 * passed
 * passed
 */
 */
void
static void
__vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3480,7 +3617,7 @@ __vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
 * This routine configures the kdfc registers of virtual path using the
 * This routine configures the kdfc registers of virtual path using the
 * config passed
 * config passed
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_kdfc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_kdfc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3553,7 +3690,7 @@ __vxge_hw_vpath_kdfc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
 * __vxge_hw_vpath_mac_configure
 * __vxge_hw_vpath_mac_configure
 * This routine configures the mac of virtual path using the config passed
 * This routine configures the mac of virtual path using the config passed
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_mac_configure(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_mac_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3621,7 +3758,7 @@ __vxge_hw_vpath_mac_configure(struct __vxge_hw_device *hldev, u32 vp_id)
 * This routine configures the tim registers of virtual path using the config
 * This routine configures the tim registers of virtual path using the config
 * passed
 * passed
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3897,7 +4034,7 @@ vxge_hw_vpath_tti_ci_set(struct __vxge_hw_device *hldev, u32 vp_id)
 * This routine is the final phase of init which initializes the
 * This routine is the final phase of init which initializes the
 * registers of the vpath using the configuration passed.
 * registers of the vpath using the configuration passed.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_initialize(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vpath_initialize(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	u64 val64;
	u64 val64;
@@ -3966,7 +4103,7 @@ __vxge_hw_vpath_initialize(struct __vxge_hw_device *hldev, u32 vp_id)
 * This routine is the initial phase of init which resets the vpath and
 * This routine is the initial phase of init which resets the vpath and
 * initializes the software support structures.
 * initializes the software support structures.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id,
__vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id,
			struct vxge_hw_vp_config *config)
			struct vxge_hw_vp_config *config)
{
{
@@ -4022,7 +4159,7 @@ __vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id,
 * __vxge_hw_vp_terminate - Terminate Virtual Path structure
 * __vxge_hw_vp_terminate - Terminate Virtual Path structure
 * This routine closes all channels it opened and freeup memory
 * This routine closes all channels it opened and freeup memory
 */
 */
void
static void
__vxge_hw_vp_terminate(struct __vxge_hw_device *hldev, u32 vp_id)
__vxge_hw_vp_terminate(struct __vxge_hw_device *hldev, u32 vp_id)
{
{
	struct __vxge_hw_virtualpath *vpath;
	struct __vxge_hw_virtualpath *vpath;
@@ -4384,7 +4521,7 @@ vxge_hw_vpath_enable(struct __vxge_hw_vpath_handle *vp)
 * Enable the DMA vpath statistics. The function is to be called to re-enable
 * Enable the DMA vpath statistics. The function is to be called to re-enable
 * the adapter to update stats into the host memory
 * the adapter to update stats into the host memory
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vp)
vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vp)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
@@ -4409,7 +4546,7 @@ vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vp)
 * __vxge_hw_vpath_stats_access - Get the statistics from the given location
 * __vxge_hw_vpath_stats_access - Get the statistics from the given location
 *                           and offset and perform an operation
 *                           and offset and perform an operation
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
__vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
			     u32 operation, u32 offset, u64 *stat)
			     u32 operation, u32 offset, u64 *stat)
{
{
@@ -4445,7 +4582,7 @@ __vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
/*
/*
 * __vxge_hw_vpath_xmac_tx_stats_get - Get the TX Statistics of a vpath
 * __vxge_hw_vpath_xmac_tx_stats_get - Get the TX Statistics of a vpath
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_xmac_tx_stats_get(
__vxge_hw_vpath_xmac_tx_stats_get(
	struct __vxge_hw_virtualpath *vpath,
	struct __vxge_hw_virtualpath *vpath,
	struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats)
	struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats)
@@ -4478,7 +4615,7 @@ __vxge_hw_vpath_xmac_tx_stats_get(
/*
/*
 * __vxge_hw_vpath_xmac_rx_stats_get - Get the RX Statistics of a vpath
 * __vxge_hw_vpath_xmac_rx_stats_get - Get the RX Statistics of a vpath
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath,
__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath,
				  struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats)
				  struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats)
{
{
@@ -4509,8 +4646,8 @@ __vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath,
/*
/*
 * __vxge_hw_vpath_stats_get - Get the vpath hw statistics.
 * __vxge_hw_vpath_stats_get - Get the vpath hw statistics.
 */
 */
enum vxge_hw_status __vxge_hw_vpath_stats_get(
static enum vxge_hw_status
			struct __vxge_hw_virtualpath *vpath,
__vxge_hw_vpath_stats_get(struct __vxge_hw_virtualpath *vpath,
			  struct vxge_hw_vpath_stats_hw_info *hw_stats)
			  struct vxge_hw_vpath_stats_hw_info *hw_stats)
{
{
	u64 val64;
	u64 val64;
@@ -4643,6 +4780,32 @@ enum vxge_hw_status __vxge_hw_vpath_stats_get(
	return status;
	return status;
}
}



static void vxge_os_dma_malloc_async(struct pci_dev *pdev, void *devh,
					unsigned long size)
{
	gfp_t flags;
	void *vaddr;

	if (in_interrupt())
		flags = GFP_ATOMIC | GFP_DMA;
	else
		flags = GFP_KERNEL | GFP_DMA;

	vaddr = kmalloc((size), flags);

	vxge_hw_blockpool_block_add(devh, vaddr, size, pdev, pdev);
}

static void vxge_os_dma_free(struct pci_dev *pdev, const void *vaddr,
			     struct pci_dev **p_dma_acch)
{
	unsigned long misaligned = *(unsigned long *)p_dma_acch;
	u8 *tmp = (u8 *)vaddr;
	tmp -= misaligned;
	kfree((void *)tmp);
}

/*
/*
 * __vxge_hw_blockpool_create - Create block pool
 * __vxge_hw_blockpool_create - Create block pool
 */
 */
@@ -4845,8 +5008,7 @@ void __vxge_hw_blockpool_blocks_remove(struct __vxge_hw_blockpool *blockpool)
 * vxge_hw_blockpool_block_add - callback for vxge_os_dma_malloc_async
 * vxge_hw_blockpool_block_add - callback for vxge_os_dma_malloc_async
 * Adds a block to block pool
 * Adds a block to block pool
 */
 */
void vxge_hw_blockpool_block_add(
static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
			struct __vxge_hw_device *devh,
					void *block_addr,
					void *block_addr,
					u32 length,
					u32 length,
					struct pci_dev *dma_h,
					struct pci_dev *dma_h,
+1 −226

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -1142,7 +1142,7 @@ static const struct ethtool_ops vxge_ethtool_ops = {
	.get_ethtool_stats	= vxge_get_ethtool_stats,
	.get_ethtool_stats	= vxge_get_ethtool_stats,
};
};


void initialize_ethtool_ops(struct net_device *ndev)
void vxge_initialize_ethtool_ops(struct net_device *ndev)
{
{
	SET_ETHTOOL_OPS(ndev, &vxge_ethtool_ops);
	SET_ETHTOOL_OPS(ndev, &vxge_ethtool_ops);
}
}
+38 −26
Original line number Original line Diff line number Diff line
@@ -82,6 +82,16 @@ module_param_array(bw_percentage, uint, NULL, 0);


static struct vxge_drv_config *driver_config;
static struct vxge_drv_config *driver_config;


static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
					     struct macInfo *mac);
static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
					     struct macInfo *mac);
static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac);
static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac);
static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath);
static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath);
static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);

static inline int is_vxge_card_up(struct vxgedev *vdev)
static inline int is_vxge_card_up(struct vxgedev *vdev)
{
{
	return test_bit(__VXGE_STATE_CARD_UP, &vdev->state);
	return test_bit(__VXGE_STATE_CARD_UP, &vdev->state);
@@ -138,7 +148,7 @@ static inline void VXGE_COMPLETE_ALL_RX(struct vxgedev *vdev)
 * This function is called during interrupt context to notify link up state
 * This function is called during interrupt context to notify link up state
 * change.
 * change.
 */
 */
void
static void
vxge_callback_link_up(struct __vxge_hw_device *hldev)
vxge_callback_link_up(struct __vxge_hw_device *hldev)
{
{
	struct net_device *dev = hldev->ndev;
	struct net_device *dev = hldev->ndev;
@@ -162,7 +172,7 @@ vxge_callback_link_up(struct __vxge_hw_device *hldev)
 * This function is called during interrupt context to notify link down state
 * This function is called during interrupt context to notify link down state
 * change.
 * change.
 */
 */
void
static void
vxge_callback_link_down(struct __vxge_hw_device *hldev)
vxge_callback_link_down(struct __vxge_hw_device *hldev)
{
{
	struct net_device *dev = hldev->ndev;
	struct net_device *dev = hldev->ndev;
@@ -354,7 +364,7 @@ static inline void vxge_post(int *dtr_cnt, void **first_dtr,
 * If the interrupt is because of a received frame or if the receive ring
 * If the interrupt is because of a received frame or if the receive ring
 * contains fresh as yet un-processed frames, this function is called.
 * contains fresh as yet un-processed frames, this function is called.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
		 u8 t_code, void *userdata)
		 u8 t_code, void *userdata)
{
{
@@ -531,7 +541,7 @@ vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
 * freed and frees all skbs whose data have already DMA'ed into the NICs
 * freed and frees all skbs whose data have already DMA'ed into the NICs
 * internal memory.
 * internal memory.
 */
 */
enum vxge_hw_status
static enum vxge_hw_status
vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
		enum vxge_hw_fifo_tcode t_code, void *userdata,
		enum vxge_hw_fifo_tcode t_code, void *userdata,
		struct sk_buff ***skb_ptr, int nr_skb, int *more)
		struct sk_buff ***skb_ptr, int nr_skb, int *more)
@@ -1246,7 +1256,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p)
 *
 *
 * Enables the interrupts for the vpath
 * Enables the interrupts for the vpath
*/
*/
void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
static void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
{
{
	struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
	struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
	int msix_id = 0;
	int msix_id = 0;
@@ -1279,7 +1289,7 @@ void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
 *
 *
 * Disables the interrupts for the vpath
 * Disables the interrupts for the vpath
*/
*/
void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
static void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
{
{
	struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
	struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
	int msix_id;
	int msix_id;
@@ -1553,7 +1563,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
 *
 *
 * driver may reset the chip on events of serr, eccerr, etc
 * driver may reset the chip on events of serr, eccerr, etc
 */
 */
int vxge_reset(struct vxgedev *vdev)
static int vxge_reset(struct vxgedev *vdev)
{
{
	return do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
	return do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
}
}
@@ -1724,7 +1734,7 @@ static enum vxge_hw_status vxge_rth_configure(struct vxgedev *vdev)
	return status;
	return status;
}
}


int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
{
{
	struct vxge_mac_addrs *new_mac_entry;
	struct vxge_mac_addrs *new_mac_entry;
	u8 *mac_address = NULL;
	u8 *mac_address = NULL;
@@ -1757,7 +1767,8 @@ int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
}
}


/* Add a mac address to DA table */
/* Add a mac address to DA table */
enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
					     struct macInfo *mac)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct vxge_vpath *vpath;
	struct vxge_vpath *vpath;
@@ -1782,7 +1793,7 @@ enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
	return status;
	return status;
}
}


int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
{
{
	struct list_head *entry, *next;
	struct list_head *entry, *next;
	u64 del_mac = 0;
	u64 del_mac = 0;
@@ -1807,7 +1818,8 @@ int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
	return FALSE;
	return FALSE;
}
}
/* delete a mac address from DA table */
/* delete a mac address from DA table */
enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
					     struct macInfo *mac)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct vxge_vpath *vpath;
	struct vxge_vpath *vpath;
@@ -1854,7 +1866,7 @@ static vxge_search_mac_addr_in_da_table(struct vxge_vpath *vpath,
}
}


/* Store all vlan ids from the list to the vid table */
/* Store all vlan ids from the list to the vid table */
enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct vxgedev *vdev = vpath->vdev;
	struct vxgedev *vdev = vpath->vdev;
@@ -1874,7 +1886,7 @@ enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
}
}


/* Store all mac addresses from the list to the DA table */
/* Store all mac addresses from the list to the DA table */
enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct macInfo mac_info;
	struct macInfo mac_info;
@@ -1916,7 +1928,7 @@ enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
}
}


/* reset vpaths */
/* reset vpaths */
enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
{
{
	enum vxge_hw_status status = VXGE_HW_OK;
	enum vxge_hw_status status = VXGE_HW_OK;
	struct vxge_vpath *vpath;
	struct vxge_vpath *vpath;
@@ -1948,7 +1960,7 @@ enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
}
}


/* close vpaths */
/* close vpaths */
void vxge_close_vpaths(struct vxgedev *vdev, int index)
static void vxge_close_vpaths(struct vxgedev *vdev, int index)
{
{
	struct vxge_vpath *vpath;
	struct vxge_vpath *vpath;
	int i;
	int i;
@@ -1966,7 +1978,7 @@ void vxge_close_vpaths(struct vxgedev *vdev, int index)
}
}


/* open vpaths */
/* open vpaths */
int vxge_open_vpaths(struct vxgedev *vdev)
static int vxge_open_vpaths(struct vxgedev *vdev)
{
{
	struct vxge_hw_vpath_attr attr;
	struct vxge_hw_vpath_attr attr;
	enum vxge_hw_status status;
	enum vxge_hw_status status;
@@ -2517,7 +2529,7 @@ static void vxge_poll_vp_lockup(unsigned long data)
 * Return value: '0' on success and an appropriate (-)ve integer as
 * Return value: '0' on success and an appropriate (-)ve integer as
 * defined in errno.h file on failure.
 * defined in errno.h file on failure.
 */
 */
int
static int
vxge_open(struct net_device *dev)
vxge_open(struct net_device *dev)
{
{
	enum vxge_hw_status status;
	enum vxge_hw_status status;
@@ -2721,7 +2733,7 @@ vxge_open(struct net_device *dev)
}
}


/* Loop throught the mac address list and delete all the entries */
/* Loop throught the mac address list and delete all the entries */
void vxge_free_mac_add_list(struct vxge_vpath *vpath)
static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
{
{


	struct list_head *entry, *next;
	struct list_head *entry, *next;
@@ -2745,7 +2757,7 @@ static void vxge_napi_del_all(struct vxgedev *vdev)
	}
	}
}
}


int do_vxge_close(struct net_device *dev, int do_io)
static int do_vxge_close(struct net_device *dev, int do_io)
{
{
	enum vxge_hw_status status;
	enum vxge_hw_status status;
	struct vxgedev *vdev;
	struct vxgedev *vdev;
@@ -2856,7 +2868,7 @@ int do_vxge_close(struct net_device *dev, int do_io)
 * Return value: '0' on success and an appropriate (-)ve integer as
 * Return value: '0' on success and an appropriate (-)ve integer as
 * defined in errno.h file on failure.
 * defined in errno.h file on failure.
 */
 */
int
static int
vxge_close(struct net_device *dev)
vxge_close(struct net_device *dev)
{
{
	do_vxge_close(dev, 1);
	do_vxge_close(dev, 1);
@@ -3113,7 +3125,7 @@ static const struct net_device_ops vxge_netdev_ops = {
#endif
#endif
};
};


int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
static int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
					  struct vxge_config *config,
					  struct vxge_config *config,
					  int high_dma, int no_of_vpath,
					  int high_dma, int no_of_vpath,
					  struct vxgedev **vdev_out)
					  struct vxgedev **vdev_out)
@@ -3164,7 +3176,7 @@ int __devinit vxge_device_register(struct __vxge_hw_device *hldev,


	ndev->watchdog_timeo = VXGE_LL_WATCH_DOG_TIMEOUT;
	ndev->watchdog_timeo = VXGE_LL_WATCH_DOG_TIMEOUT;


	initialize_ethtool_ops(ndev);
	vxge_initialize_ethtool_ops(ndev);


	/* Allocate memory for vpath */
	/* Allocate memory for vpath */
	vdev->vpaths = kzalloc((sizeof(struct vxge_vpath)) *
	vdev->vpaths = kzalloc((sizeof(struct vxge_vpath)) *
@@ -3249,7 +3261,7 @@ int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
 *
 *
 * This function will unregister and free network device
 * This function will unregister and free network device
 */
 */
void
static void
vxge_device_unregister(struct __vxge_hw_device *hldev)
vxge_device_unregister(struct __vxge_hw_device *hldev)
{
{
	struct vxgedev *vdev;
	struct vxgedev *vdev;
+1 −58

File changed.

Preview size limit exceeded, changes collapsed.

Loading