forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
....@@ -12,6 +12,7 @@
1212 * Copyright(c) 2002-2010 Exar Corp.
1313 ******************************************************************************/
1414 #include <linux/etherdevice.h>
15
+#include <linux/io-64-nonatomic-lo-hi.h>
1516 #include <linux/prefetch.h>
1617
1718 #include "vxge-traffic.h"
....@@ -277,7 +278,7 @@
277278
278279 /**
279280 * vxge_hw_channel_msix_mask - Mask MSIX Vector.
280
- * @channeh: Channel for rx or tx handle
281
+ * @channel: Channel for rx or tx handle
281282 * @msix_id: MSIX ID
282283 *
283284 * The function masks the msix interrupt for the given msix_id
....@@ -294,7 +295,7 @@
294295
295296 /**
296297 * vxge_hw_channel_msix_unmask - Unmask the MSIX Vector.
297
- * @channeh: Channel for rx or tx handle
298
+ * @channel: Channel for rx or tx handle
298299 * @msix_id: MSI ID
299300 *
300301 * The function unmasks the msix interrupt for the given msix_id
....@@ -349,8 +350,6 @@
349350 /**
350351 * vxge_hw_device_intr_enable - Enable interrupts.
351352 * @hldev: HW device handle.
352
- * @op: One of the enum vxge_hw_device_intr enumerated values specifying
353
- * the type(s) of interrupts to enable.
354353 *
355354 * Enable Titan interrupts. The function is to be executed the last in
356355 * Titan initialization sequence.
....@@ -404,8 +403,6 @@
404403 /**
405404 * vxge_hw_device_intr_disable - Disable Titan interrupts.
406405 * @hldev: HW device handle.
407
- * @op: One of the enum vxge_hw_device_intr enumerated values specifying
408
- * the type(s) of interrupts to disable.
409406 *
410407 * Disable Titan interrupts.
411408 *
....@@ -1390,11 +1387,7 @@
13901387 VXGE_HW_NODBW_GET_NO_SNOOP(no_snoop),
13911388 &fifo->nofl_db->control_0);
13921389
1393
- mmiowb();
1394
-
13951390 writeq(txdl_ptr, &fifo->nofl_db->txdl_ptr);
1396
-
1397
- mmiowb();
13981391 }
13991392
14001393 /**
....@@ -1409,7 +1402,7 @@
14091402
14101403 /**
14111404 * vxge_hw_fifo_txdl_reserve - Reserve fifo descriptor.
1412
- * @fifoh: Handle to the fifo object used for non offload send
1405
+ * @fifo: Handle to the fifo object used for non offload send
14131406 * @txdlh: Reserved descriptor. On success HW fills this "out" parameter
14141407 * with a valid handle.
14151408 * @txdl_priv: Buffer to return the pointer to per txdl space
....@@ -1520,8 +1513,6 @@
15201513 * vxge_hw_fifo_txdl_post - Post descriptor on the fifo channel.
15211514 * @fifo: Handle to the fifo object used for non offload send
15221515 * @txdlh: Descriptor obtained via vxge_hw_fifo_txdl_reserve()
1523
- * @frags: Number of contiguous buffers that are part of a single
1524
- * transmit operation.
15251516 *
15261517 * Post descriptor on the 'fifo' type channel for transmission.
15271518 * Prior to posting the descriptor should be filled in accordance with
....@@ -1686,23 +1677,15 @@
16861677 */
16871678 void vxge_hw_fifo_txdl_free(struct __vxge_hw_fifo *fifo, void *txdlh)
16881679 {
1689
- struct __vxge_hw_fifo_txdl_priv *txdl_priv;
1690
- u32 max_frags;
16911680 struct __vxge_hw_channel *channel;
16921681
16931682 channel = &fifo->channel;
1694
-
1695
- txdl_priv = __vxge_hw_fifo_txdl_priv(fifo,
1696
- (struct vxge_hw_fifo_txd *)txdlh);
1697
-
1698
- max_frags = fifo->config->max_frags;
16991683
17001684 vxge_hw_channel_dtr_free(channel, txdlh);
17011685 }
17021686
17031687 /**
1704
- * vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath
1705
- * to MAC address table.
1688
+ * vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath to MAC address table.
17061689 * @vp: Vpath handle.
17071690 * @macaddr: MAC address to be added for this vpath into the list
17081691 * @macaddr_mask: MAC address mask for macaddr
....@@ -1767,13 +1750,13 @@
17671750 }
17681751
17691752 /**
1770
- * vxge_hw_vpath_mac_addr_get - Get the first mac address entry for this vpath
1771
- * from MAC address table.
1753
+ * vxge_hw_vpath_mac_addr_get - Get the first mac address entry
17721754 * @vp: Vpath handle.
17731755 * @macaddr: First MAC address entry for this vpath in the list
17741756 * @macaddr_mask: MAC address mask for macaddr
17751757 *
1776
- * Returns the first mac address and mac address mask in the list for this
1758
+ * Get the first mac address entry for this vpath from MAC address table.
1759
+ * Return: the first mac address and mac address mask in the list for this
17771760 * vpath.
17781761 * see also: vxge_hw_vpath_mac_addr_get_next
17791762 *
....@@ -1818,14 +1801,13 @@
18181801 }
18191802
18201803 /**
1821
- * vxge_hw_vpath_mac_addr_get_next - Get the next mac address entry for this
1822
- * vpath
1823
- * from MAC address table.
1804
+ * vxge_hw_vpath_mac_addr_get_next - Get the next mac address entry
18241805 * @vp: Vpath handle.
18251806 * @macaddr: Next MAC address entry for this vpath in the list
18261807 * @macaddr_mask: MAC address mask for macaddr
18271808 *
1828
- * Returns the next mac address and mac address mask in the list for this
1809
+ * Get the next mac address entry for this vpath from MAC address table.
1810
+ * Return: the next mac address and mac address mask in the list for this
18291811 * vpath.
18301812 * see also: vxge_hw_vpath_mac_addr_get
18311813 *
....@@ -1871,8 +1853,7 @@
18711853 }
18721854
18731855 /**
1874
- * vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath
1875
- * to MAC address table.
1856
+ * vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath to MAC address table.
18761857 * @vp: Vpath handle.
18771858 * @macaddr: MAC address to be added for this vpath into the list
18781859 * @macaddr_mask: MAC address mask for macaddr
....@@ -1918,8 +1899,7 @@
19181899 }
19191900
19201901 /**
1921
- * vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath
1922
- * to vlan id table.
1902
+ * vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath to vlan id table.
19231903 * @vp: Vpath handle.
19241904 * @vid: vlan id to be added for this vpath into the list
19251905 *
....@@ -2253,7 +2233,7 @@
22532233 {
22542234 struct __vxge_hw_device *hldev = vp->vpath->hldev;
22552235
2256
- if ((hldev->config.intr_mode == VXGE_HW_INTR_MODE_MSIX_ONE_SHOT))
2236
+ if (hldev->config.intr_mode == VXGE_HW_INTR_MODE_MSIX_ONE_SHOT)
22572237 __vxge_hw_pio_mem_write32_upper(
22582238 (u32) vxge_bVALn(vxge_mBIT((msix_id >> 2)), 0, 32),
22592239 &hldev->common_reg->clr_msix_one_shot_vec[msix_id % 4]);
....@@ -2413,9 +2393,11 @@
24132393 }
24142394
24152395 /**
2416
- * vxge_hw_vpath_poll_tx - Poll Tx for completed descriptors and process
2417
- * the same.
2396
+ * vxge_hw_vpath_poll_tx - Poll Tx for completed descriptors and process the same.
24182397 * @fifo: Handle to the fifo object used for non offload send
2398
+ * @skb_ptr: pointer to skb
2399
+ * @nr_skb: number of skbs
2400
+ * @more: more is coming
24192401 *
24202402 * The function polls the Tx for the completed descriptors and calls
24212403 * the driver via supplied completion callback.