#
aefd0136 |
|
24-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: use irq_domain for interrupt controller In the current interrupt controller, the MAC interrupt acts as the parent interrupt in the GPIO IRQ chip. But when the number of Rx/Tx ring changes, the PCI IRQ vector needs to be reallocated. Then this interrupt controller would be corrupted. So use irq_domain structure to avoid the above problem. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
937d46ec |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: add ethtool_ops for channel number Add support to get RX/TX queue number with ethtool -l, and set RX/TX queue number with ethtool -L. Since interrupts need to be rescheduled, adjust the allocation of msix enties. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
4ac2d9df |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: add coalesce options support Support to show RX/TX coalesce with ethtool -c and set RX/TX coalesce with ethtool -C. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
883b5984 |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: add ethtool_ops for ring parameters Support to query RX/TX depth with ethtool -g, and change RX/TX depth with ethtool -G. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
2fe2ca09 |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: add flow control support Add support to set pause params with ethtool -A and get pause params with ethtool -a, for ethernet driver txgbe and ngbe. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
e8e138cf |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: add phylink to libwx For the following implementation, add struct phylink and phylink_config to wx structure. Add the helper function for converting phylink to wx, implement ethtool ksetting and nway reset in libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
738b54b9 |
|
13-Dec-2023 |
duanqiangwen <duanqiangwen@net-swift.com> |
net: libwx: fix memory leak on free page ifconfig ethx up, will set page->refcount larger than 1, and then ifconfig ethx down, calling __page_frag_cache_drain() to free pages, it is not compatible with page pool. So deleting codes which changing page->refcount. Fixes: 3c47e8ae113a ("net: libwx: Support to receive packets in NAPI") Signed-off-by: duanqiangwen <duanqiangwen@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
46b92e10 |
|
11-Oct-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: support hardware statistics Implement update and clear Rx/Tx statistics. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://lore.kernel.org/r/20231011091906.70486-2-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
f5575240 |
|
11-Sep-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: move MDIO bus implementation to the library Move similar code of accessing MDIO bus from txgbe/ngbe to libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20230912031424.721386-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
#
02b2a6f9 |
|
23-Aug-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: support copper NIC with external PHY Wangxun SP chip supports to connect with external PHY (marvell 88x3310), which links to 10GBASE-T/1000BASE-T/100BASE-T. Add the identification of media types from subsystem device IDs. For sp_media_copper, register mdio bus for the external PHY. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
a4414dd1 |
|
23-Aug-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: support switching mode to 1000BASE-X and SGMII Disable data path before PCS VR reset while switching PCS mode, to prevent the blocking of data path. Enable AN interrupt for CL37 auto-negotiation. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
6963e463 |
|
13-Jul-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: ngbe: add Wake on Lan support Implement ethtool_ops get_wol and set_wol. Implement Wake-on-LAN support. Wol requires hardware board support which use sub id to identify. Magic packets are checked by fw, for now just support WAKE_MAGIC. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
b83c3731 |
|
06-Jun-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Support GPIO to SFP socket Register GPIO chip and handle GPIO IRQ for SFP socket. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
#
c3e382ad |
|
06-Jun-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Add software nodes to support phylink Register software nodes for GPIO, I2C, SFP and PHYLINK. Define the device properties. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
#
6dbedcff |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: libwx: Implement xx_set_features ops Implement wx_set_features function which to support ndo_set_features. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
f3b03c65 |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: Implement vlan add and kill functions Implement vlan add/kill functions which add and remove vlan id in hardware. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
ef4f3c19 |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: libwx add rx offload functions Add rx offload functions for wx_clean_rx_irq which supports ngbe and txgbe to implement rx offload function. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
3403960c |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: libwx add tx offload functions Add tx offload functions for wx_xmit_frame_ring which includes wx_encode_tx_desc_ptype, wx_tso and wx_tx_csum. which supports ngbe and txgbe to implement tx offload function. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
fe6559fa |
|
15-May-2023 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
net: libwx: Replace zero-length array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated, and we are moving towards adopting C99 flexible-array members instead. Transform zero-length array into flexible-array member in struct wx_q_vector. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/286 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/ZGKGwtsobVZecWa4@work Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
4dd2744f |
|
15-Mar-2023 |
mengyuanlou <mengyuanlou@net-swift.com> |
net: wangxun: Remove macro that is redefined Remove PCI_VENDOR_ID_WANGXUN which is redefined in drivers/pci/quirks. Signed-off-by: mengyuanlou <mengyuanlou@net-swift.com> Link: https://lore.kernel.org/r/20230315091846.17314-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
81dc0741 |
|
15-Mar-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: Implement the ndo change mtu interface Add ngbe and txgbe ndo_change_mtu support. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
59513714 |
|
22-Mar-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: Fix vector length of interrupt cause There is 64-bit interrupt cause register for txgbe. Fix to clear upper 32 bits. Fixes: 3f703186113f ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Link: https://lore.kernel.org/r/20230322103632.132011-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
1b8d1c50 |
|
14-Feb-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: Add the basic ethtool interfaces Add the basic ethtool ops get_drvinfo and get_link for ngbe and txgbe. Ngbe implements get_link_ksettings, nway_reset and set_link_ksettings for free using phylib code. The code related to the physical interface is not yet fully implemented in txgbe using phylink code. So do not implement get_link_ksettings, nway_reset and set_link_ksettings in txgbe. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230214091527.69943-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
09a50880 |
|
03-Feb-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: libwx: Add tx path to process packets Support to transmit packets without hardware features. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
3c47e8ae |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: Support to receive packets in NAPI Clean all queues associated with a q_vector, to simple receive packets without hardware features. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
0ef7e159 |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Setup Rx and Tx ring Improve the configuration of Rx and Tx ring, set Rx flags and implement ndo_set_rx_mode ops. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
850b9711 |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: Allocate Rx and Tx resources Setup Rx and Tx descriptors for specefic rings. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
18b5b8a9 |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: Configure Rx and Tx unit on hardware Configure hardware for preparing to process packets. Including configure receive and transmit unit of the MAC layer, and setup the specific rings. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
3f703186 |
|
03-Feb-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: libwx: Add irq flow functions Add irq flow functions for ngbe and txgbe. Alloc pcie msix irqs for drivers, otherwise fall back to msi/legacy. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
860edff5 |
|
16-Jan-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: wangxun: clean up the code Convert various mult-bit fields to be defined using GENMASK/FIELD_PREP. Simplify the code with the ternary operator. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230116103839.84087-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
a1cf597b |
|
11-Jan-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: ngbe: Add ngbe mdio bus driver. Add mdio bus register for ngbe. The internal phy and external phy need to be handled separately. Add phy changed event detection. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230111111718.40745-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
803df55d |
|
05-Jan-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: ngbe: Remove structure ngbe_adapter Move the total private structure to libwx. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
270a71e6 |
|
05-Jan-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Remove structure txgbe_adapter Move the total private structure to libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
9607a3e6 |
|
05-Jan-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: Rename private structure in libwx In order to move the total members in struct adapter to struct wx_hw to keep the code clean, it's a bad name of 'wx_hw' only for hardware. Rename 'wx_hw' to 'wx', and rename the pointers at use. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
79625f45 |
|
05-Jan-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: Move MAC address handling to libwx For setting MAC address, both txgbe and ngbe drivers have the same handling flow with different parameters. Move the same codes to libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
02338c48 |
|
31-Oct-2022 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: ngbe: Initialize sw info and register netdev Initialize ngbe mac/phy type. Check whether the firmware is initialized. Initialize ngbe hw and register netdev. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
1efa9bfe |
|
31-Oct-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: libwx: Implement interaction with firmware Add mailbox commands to interact with firmware. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
d21d2c7f |
|
27-Oct-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Set MAC address and register netdev Add MAC address related operations, and register netdev. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
b0801256 |
|
27-Oct-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Reset hardware Reset and initialize the hardware by configuring the MAC layer. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
a34b3e6e |
|
27-Oct-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Store PCI info Get PCI config space info, set LAN id and check flash status. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|