diff options
Diffstat (limited to 'drivers/net/ethernet/neterion/vxge')
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-config.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-config.h | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-main.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-traffic.c | 72 |
5 files changed, 42 insertions, 65 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c index 78eba10300ae..f5d48d7c4ce2 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c @@ -988,6 +988,9 @@ exit: /** * vxge_hw_device_hw_info_get - Get the hw information + * @bar0: the bar + * @hw_info: the hw_info struct + * * Returns the vpath mask that has the bits set for each vpath allocated * for the driver, FW version information, and the first mac address for * each vpath @@ -2303,16 +2306,9 @@ exit: static inline 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); - + vaddr = kmalloc(size, GFP_KERNEL | GFP_DMA); vxge_hw_blockpool_block_add(devh, vaddr, size, pdev, pdev); } @@ -3926,7 +3922,7 @@ exit: /** * vxge_hw_vpath_check_leak - Check for memory leak - * @ringh: Handle to the ring object used for receive + * @ring: Handle to the ring object used for receive * * If PRC_RXD_DOORBELL_VPn.NEW_QW_CNT is larger or equal to * PRC_CFG6_VPn.RXD_SPAT then a leak has occurred. diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.h b/drivers/net/ethernet/neterion/vxge/vxge-config.h index 373165119850..0cd0750484ae 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.h @@ -1899,18 +1899,13 @@ static inline void *vxge_os_dma_malloc(struct pci_dev *pdev, struct pci_dev **p_dmah, struct pci_dev **p_dma_acch) { - gfp_t flags; void *vaddr; unsigned long misaligned = 0; int realloc_flag = 0; *p_dma_acch = *p_dmah = NULL; - if (in_interrupt()) - flags = GFP_ATOMIC | GFP_DMA; - else - flags = GFP_KERNEL | GFP_DMA; realloc: - vaddr = kmalloc((size), flags); + vaddr = kmalloc(size, GFP_KERNEL | GFP_DMA); if (vaddr == NULL) return vaddr; misaligned = (unsigned long)VXGE_ALIGN((unsigned long)vaddr, diff --git a/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c b/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c index 03c3d1230c17..4d91026485ae 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c @@ -119,7 +119,7 @@ static void vxge_ethtool_gdrvinfo(struct net_device *dev, * @dev: device pointer. * @regs: pointer to the structure with parameters given by ethtool for * dumping the registers. - * @reg_space: The input argument into which all the registers are dumped. + * @space: The input argument into which all the registers are dumped. * * Dumps the vpath register space of Titan NIC into the user given * buffer area. diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index 1ded4e275086..87892bd992b1 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c @@ -1275,6 +1275,7 @@ _set_all_mcast: /** * vxge_set_mac_addr * @dev: pointer to the device structure + * @p: socket info * * Update entry "0" (default MAC addr) */ @@ -1799,7 +1800,7 @@ static void vxge_reset(struct work_struct *work) /** * vxge_poll - Receive handler when Receive Polling is used. - * @dev: pointer to the device structure. + * @napi: pointer to the napi structure. * @budget: Number of packets budgeted to be processed in this iteration. * * This function comes into picture only if Receive side is being handled @@ -3096,7 +3097,7 @@ static int vxge_change_mtu(struct net_device *dev, int new_mtu) /** * vxge_get_stats64 * @dev: pointer to the device structure - * @stats: pointer to struct rtnl_link_stats64 + * @net_stats: pointer to struct rtnl_link_stats64 * */ static void @@ -3245,7 +3246,7 @@ static int vxge_hwtstamp_get(struct vxgedev *vdev, void __user *data) /** * vxge_ioctl * @dev: Device pointer. - * @ifr: An IOCTL specific structure, that can contain a pointer to + * @rq: An IOCTL specific structure, that can contain a pointer to * a proprietary structure used to pass information to the driver. * @cmd: This is used to distinguish between the different commands that * can be passed to the IOCTL functions. @@ -3269,6 +3270,7 @@ static int vxge_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) /** * vxge_tx_watchdog * @dev: pointer to net device structure + * @txqueue: index of the hanging queue * * Watchdog for transmit side. * This function is triggered if the Tx Queue is stopped @@ -4002,6 +4004,7 @@ static void vxge_print_parm(struct vxgedev *vdev, u64 vpath_mask) /** * vxge_pm_suspend - vxge power management suspend entry point + * @dev_d: device pointer * */ static int __maybe_unused vxge_pm_suspend(struct device *dev_d) @@ -4010,6 +4013,7 @@ static int __maybe_unused vxge_pm_suspend(struct device *dev_d) } /** * vxge_pm_resume - vxge power management resume entry point + * @dev_d: device pointer * */ static int __maybe_unused vxge_pm_resume(struct device *dev_d) @@ -4539,7 +4543,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre) * due to the fact that HWTS is using the FCS as the location of the * timestamp. The HW FCS checking will still correctly determine if * there is a valid checksum, and the FCS is being removed by the driver - * anyway. So no fucntionality is being lost. Since it is always + * anyway. So no functionality is being lost. Since it is always * enabled, we now simply use the ioctl call to set whether or not the * driver should be paying attention to the HWTS. */ diff --git a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c index 709d20d9938f..ee164970b267 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c @@ -30,8 +30,6 @@ */ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp) { - u64 val64; - struct __vxge_hw_virtualpath *vpath; struct vxge_hw_vpath_reg __iomem *vp_reg; enum vxge_hw_status status = VXGE_HW_OK; @@ -84,7 +82,7 @@ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp) __vxge_hw_pio_mem_write32_upper((u32)VXGE_HW_INTR_MASK_ALL, &vp_reg->xgmac_vp_int_status); - val64 = readq(&vp_reg->vpath_general_int_status); + readq(&vp_reg->vpath_general_int_status); /* Mask unwanted interrupts */ @@ -157,8 +155,6 @@ exit: enum vxge_hw_status vxge_hw_vpath_intr_disable( struct __vxge_hw_vpath_handle *vp) { - u64 val64; - struct __vxge_hw_virtualpath *vpath; enum vxge_hw_status status = VXGE_HW_OK; struct vxge_hw_vpath_reg __iomem *vp_reg; @@ -179,8 +175,6 @@ enum vxge_hw_status vxge_hw_vpath_intr_disable( (u32)VXGE_HW_INTR_MASK_ALL, &vp_reg->vpath_general_int_mask); - val64 = VXGE_HW_TIM_CLR_INT_EN_VP(1 << (16 - vpath->vp_id)); - writeq(VXGE_HW_INTR_MASK_ALL, &vp_reg->kdfcctl_errors_mask); __vxge_hw_pio_mem_write32_upper((u32)VXGE_HW_INTR_MASK_ALL, @@ -284,7 +278,7 @@ void vxge_hw_vpath_dynamic_rti_rtimer_set(struct __vxge_hw_ring *ring) /** * vxge_hw_channel_msix_mask - Mask MSIX Vector. - * @channeh: Channel for rx or tx handle + * @channel: Channel for rx or tx handle * @msix_id: MSIX ID * * The function masks the msix interrupt for the given msix_id @@ -301,7 +295,7 @@ void vxge_hw_channel_msix_mask(struct __vxge_hw_channel *channel, int msix_id) /** * vxge_hw_channel_msix_unmask - Unmask the MSIX Vector. - * @channeh: Channel for rx or tx handle + * @channel: Channel for rx or tx handle * @msix_id: MSI ID * * The function unmasks the msix interrupt for the given msix_id @@ -356,8 +350,6 @@ u32 vxge_hw_device_set_intr_type(struct __vxge_hw_device *hldev, u32 intr_mode) /** * vxge_hw_device_intr_enable - Enable interrupts. * @hldev: HW device handle. - * @op: One of the enum vxge_hw_device_intr enumerated values specifying - * the type(s) of interrupts to enable. * * Enable Titan interrupts. The function is to be executed the last in * Titan initialization sequence. @@ -411,8 +403,6 @@ void vxge_hw_device_intr_enable(struct __vxge_hw_device *hldev) /** * vxge_hw_device_intr_disable - Disable Titan interrupts. * @hldev: HW device handle. - * @op: One of the enum vxge_hw_device_intr enumerated values specifying - * the type(s) of interrupts to disable. * * Disable Titan interrupts. * @@ -487,9 +477,7 @@ void vxge_hw_device_unmask_all(struct __vxge_hw_device *hldev) */ void vxge_hw_device_flush_io(struct __vxge_hw_device *hldev) { - u32 val32; - - val32 = readl(&hldev->common_reg->titan_general_int_status); + readl(&hldev->common_reg->titan_general_int_status); } /** @@ -1414,7 +1402,7 @@ u32 vxge_hw_fifo_free_txdl_count_get(struct __vxge_hw_fifo *fifoh) /** * vxge_hw_fifo_txdl_reserve - Reserve fifo descriptor. - * @fifoh: Handle to the fifo object used for non offload send + * @fifo: Handle to the fifo object used for non offload send * @txdlh: Reserved descriptor. On success HW fills this "out" parameter * with a valid handle. * @txdl_priv: Buffer to return the pointer to per txdl space @@ -1525,8 +1513,6 @@ void vxge_hw_fifo_txdl_buffer_set(struct __vxge_hw_fifo *fifo, * vxge_hw_fifo_txdl_post - Post descriptor on the fifo channel. * @fifo: Handle to the fifo object used for non offload send * @txdlh: Descriptor obtained via vxge_hw_fifo_txdl_reserve() - * @frags: Number of contiguous buffers that are part of a single - * transmit operation. * * Post descriptor on the 'fifo' type channel for transmission. * Prior to posting the descriptor should be filled in accordance with @@ -1699,8 +1685,7 @@ void vxge_hw_fifo_txdl_free(struct __vxge_hw_fifo *fifo, void *txdlh) } /** - * vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath - * to MAC address table. + * vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath to MAC address table. * @vp: Vpath handle. * @macaddr: MAC address to be added for this vpath into the list * @macaddr_mask: MAC address mask for macaddr @@ -1716,8 +1701,8 @@ void vxge_hw_fifo_txdl_free(struct __vxge_hw_fifo *fifo, void *txdlh) enum vxge_hw_status vxge_hw_vpath_mac_addr_add( struct __vxge_hw_vpath_handle *vp, - u8 (macaddr)[ETH_ALEN], - u8 (macaddr_mask)[ETH_ALEN], + u8 *macaddr, + u8 *macaddr_mask, enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode) { u32 i; @@ -1765,13 +1750,13 @@ exit: } /** - * vxge_hw_vpath_mac_addr_get - Get the first mac address entry for this vpath - * from MAC address table. + * vxge_hw_vpath_mac_addr_get - Get the first mac address entry * @vp: Vpath handle. * @macaddr: First MAC address entry for this vpath in the list * @macaddr_mask: MAC address mask for macaddr * - * Returns the first mac address and mac address mask in the list for this + * Get the first mac address entry for this vpath from MAC address table. + * Return: the first mac address and mac address mask in the list for this * vpath. * see also: vxge_hw_vpath_mac_addr_get_next * @@ -1779,8 +1764,8 @@ exit: enum vxge_hw_status vxge_hw_vpath_mac_addr_get( struct __vxge_hw_vpath_handle *vp, - u8 (macaddr)[ETH_ALEN], - u8 (macaddr_mask)[ETH_ALEN]) + u8 *macaddr, + u8 *macaddr_mask) { u32 i; u64 data1 = 0ULL; @@ -1816,14 +1801,13 @@ exit: } /** - * vxge_hw_vpath_mac_addr_get_next - Get the next mac address entry for this - * vpath - * from MAC address table. + * vxge_hw_vpath_mac_addr_get_next - Get the next mac address entry * @vp: Vpath handle. * @macaddr: Next MAC address entry for this vpath in the list * @macaddr_mask: MAC address mask for macaddr * - * Returns the next mac address and mac address mask in the list for this + * Get the next mac address entry for this vpath from MAC address table. + * Return: the next mac address and mac address mask in the list for this * vpath. * see also: vxge_hw_vpath_mac_addr_get * @@ -1831,8 +1815,8 @@ exit: enum vxge_hw_status vxge_hw_vpath_mac_addr_get_next( struct __vxge_hw_vpath_handle *vp, - u8 (macaddr)[ETH_ALEN], - u8 (macaddr_mask)[ETH_ALEN]) + u8 *macaddr, + u8 *macaddr_mask) { u32 i; u64 data1 = 0ULL; @@ -1869,8 +1853,7 @@ exit: } /** - * vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath - * to MAC address table. + * vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath to MAC address table. * @vp: Vpath handle. * @macaddr: MAC address to be added for this vpath into the list * @macaddr_mask: MAC address mask for macaddr @@ -1884,8 +1867,8 @@ exit: enum vxge_hw_status vxge_hw_vpath_mac_addr_delete( struct __vxge_hw_vpath_handle *vp, - u8 (macaddr)[ETH_ALEN], - u8 (macaddr_mask)[ETH_ALEN]) + u8 *macaddr, + u8 *macaddr_mask) { u32 i; u64 data1 = 0ULL; @@ -1916,8 +1899,7 @@ exit: } /** - * vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath - * to vlan id table. + * vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath to vlan id table. * @vp: Vpath handle. * @vid: vlan id to be added for this vpath into the list * @@ -2375,7 +2357,6 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring) u8 t_code; enum vxge_hw_status status = VXGE_HW_OK; void *first_rxdh; - u64 val64 = 0; int new_count = 0; ring->cmpl_cnt = 0; @@ -2403,8 +2384,7 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring) } writeq(VXGE_HW_PRC_RXD_DOORBELL_NEW_QW_CNT(new_count), &ring->vp_reg->prc_rxd_doorbell); - val64 = - readl(&ring->common_reg->titan_general_int_status); + readl(&ring->common_reg->titan_general_int_status); ring->doorbell_cnt = 0; } } @@ -2413,9 +2393,11 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring) } /** - * vxge_hw_vpath_poll_tx - Poll Tx for completed descriptors and process - * the same. + * vxge_hw_vpath_poll_tx - Poll Tx for completed descriptors and process the same. * @fifo: Handle to the fifo object used for non offload send + * @skb_ptr: pointer to skb + * @nr_skb: number of skbs + * @more: more is coming * * The function polls the Tx for the completed descriptors and calls * the driver via supplied completion callback. |