#
b4a2496c |
|
01-Mar-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: fix GPIO interrupt blocking The register of GPIO interrupt status is masked before MAC IRQ is enabled. This is because of hardware deficiency. So manually clear the interrupt status before using them. Otherwise, GPIO interrupts will never be reported again. There is a workaround for clearing interrupts to set GPIO EOI in txgbe_up_complete(). Fixes: aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://lore.kernel.org/r/20240301092956.18544-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
#
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>
|
#
63aabc3e |
|
24-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: move interrupt codes to a separate file In order to change the interrupt response structure, there will be a lot of code added next. Move these interrupt codes to a new file, to make the codes cleaner. 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>
|
#
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>
|
#
4491c602 |
|
02-Jan-2024 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: use phylink bits added in libwx Convert txgbe to use phylink and phylink_config added 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>
|
#
87e839c8 |
|
06-Dec-2023 |
duanqiangwen <duanqiangwen@net-swift.com> |
net: wangxun: fix changing mac failed when running in some bonding mode, service need to change mac when netif is running. Wangxun netdev add IFF_LIVE_ADDR_CHANGE priv_flag to support it. Signed-off-by: duanqiangwen <duanqiangwen@net-swift.com> Link: https://lore.kernel.org/r/20231206095044.17844-1-duanqiangwen@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
8ba2c459 |
|
17-Nov-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: fix kernel panic due to null pointer When the device uses a custom subsystem vendor ID, the function wx_sw_init() returns before the memory of 'wx->mac_table' is allocated. The null pointer will causes the kernel panic. Fixes: 79625f45ca73 ("net: wangxun: Move MAC address handling to libwx") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
48e44287 |
|
17-Oct-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: wangxun: remove redundant kernel log Since PBA info can be read from lspci, delete txgbe_read_pba_string() and the prints. In addition, delete the redundant MAC address printing. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20231017100635.154967-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
9224ade6 |
|
11-Oct-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: add ethtool stats support Support to show ethtool statistics. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://lore.kernel.org/r/20231011091906.70486-3-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
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>
|
#
ab928c24 |
|
23-Aug-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: add FW version warning Since XPCS device identifier is implemented in the firmware version 0x20010 and above, so add a warning to prompt the users to upgrade the firmware to make sure the driver works. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
08f08f93 |
|
06-Jun-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Support phylink MAC layer Add phylink support to Wangxun 10Gb Ethernet controller for the 10GBASE-R interface. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
#
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>
|
#
e7214663 |
|
06-Jun-2023 |
Simon Horman <horms@kernel.org> |
net: txgbe: Avoid passing uninitialised parameter to pci_wake_from_d3() txgbe_shutdown() relies on txgbe_dev_shutdown() to initialise wake by passing it by reference. However, txgbe_dev_shutdown() doesn't use this parameter at all. wake is then passed uninitialised by txgbe_dev_shutdown() to pci_wake_from_d3(). Resolve this problem by: * Removing the unused parameter from txgbe_dev_shutdown() * Removing the uninitialised variable wake from txgbe_dev_shutdown() * Passing false to pci_wake_from_d3() - this assumes that although uninitialised wake was in practice false (0). I'm not sure that this counts as a bug, as I'm not sure that it manifests in any unwanted behaviour. But in any case, the issue was introduced by: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe") Flagged by Smatch as: .../txgbe_main.c:486 txgbe_shutdown() error: uninitialized symbol 'wake'. No functional change intended. Compile tested only. Signed-off-by: Simon Horman <horms@kernel.org> Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
7df4af51 |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: txgbe: Implement vlan add and remove ops txgbe add ndo_vlan_rx_add_vid and ndo_vlan_rx_kill_vid. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
6670f1ec |
|
29-May-2023 |
Mengyuan Lou <mengyuanlou@net-swift.com> |
net: txgbe: Add netdev features support Add features and hw_features that ngbe can support. Signed-off-by: Mengyuan Lou <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>
|
#
1fccc781 |
|
06-Mar-2023 |
Bjorn Helgaas <bhelgaas@google.com> |
net: txgbe: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Jiawen Wu <jiawenwu@trustnetic.com> Cc: Mengyuan Lou <mengyuanlou@net-swift.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
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>
|
#
0d22be52 |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Support Rx and Tx process path Clean Rx and Tx ring interrupts, process packets in the data path. 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>
|
#
5d3ac705 |
|
03-Feb-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Add interrupt support Determine proper interrupt scheme to enable and handle interrupt. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
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>
|
#
524f6b29 |
|
05-Jan-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Move defines into unified file Remove txgbe.h, move defines into txgbe_type.h file. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
ce2b4ad5 |
|
05-Jan-2023 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Remove structure txgbe_hw Remove useless structure txgbe_hw to make the codes clear. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
049fe536 |
|
31-Oct-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Add operations to interact with firmware Add firmware interaction to get EEPROM information. 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>
|
#
2e8f205d |
|
31-Jul-2022 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
net: txgbe: Fix an error handling path in txgbe_probe() A pci_enable_pcie_error_reporting() should be balanced by a corresponding pci_disable_pcie_error_reporting() call in the error handling path, as already done in the remove function. Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://lore.kernel.org/r/082003d00be1f05578c9c6434272ceb314609b8e.1659285240.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
#
3ce7547e |
|
28-Jun-2022 |
Jiawen Wu <jiawenwu@trustnetic.com> |
net: txgbe: Add build support for txgbe Add doc build infrastructure for txgbe driver. Initialize PCI memory space for WangXun 10 Gigabit Ethernet devices. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://lore.kernel.org/r/20220628095530.889344-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|