Jiawen Wu
937d46ecc5
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 >
2024-01-04 10:49:35 +00:00
Jiawen Wu
2fe2ca09da
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 >
2024-01-04 10:49:35 +00:00
Jiawen Wu
4491c602fe
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 >
2024-01-04 10:49:35 +00:00
Jiawen Wu
f557524029
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 >
2023-09-14 15:18:40 +02:00
Jiawen Wu
02b2a6f91b
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 >
2023-08-25 07:42:59 +01:00
Jiawen Wu
a4414dd13f
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 >
2023-08-25 07:42:59 +01:00
Xiongfeng Wang
d8c21ef7b2
net: txgbe: Use pci_dev_id() to simplify the code
...
PCI core API pci_dev_id() can be used to get the BDF number for a pci
device. We don't need to compose it manually. Use pci_dev_id() to
simplify the code a little bit.
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com >
Reviewed-by: Yang Yingliang <yangyingliang@huawei.com >
Reviewed-by: Simon Horman <horms@kernel.org >
Link: https://lore.kernel.org/r/20230808024931.147048-1-wangxiongfeng2@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-08-09 13:03:27 -07:00
Jiawen Wu
08f08f9390
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 >
2023-06-08 13:25:10 +02:00
Jiawen Wu
854cace613
net: txgbe: Implement phylink pcs
...
Register MDIO bus for PCS layer to use Synopsys designware XPCS, support
10GBASE-R interface to the controller.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Reviewed-by: Andrew Lunn <andrew@lunn.ch >
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com >
Signed-off-by: Paolo Abeni <pabeni@redhat.com >
2023-06-08 13:25:10 +02:00
Jiawen Wu
b83c37315a
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 >
2023-06-08 13:25:10 +02:00
Jiawen Wu
04d9423618
net: txgbe: Add SFP module identify
...
Register SFP platform device to get modules information.
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 >
2023-06-08 13:25:10 +02:00
Jiawen Wu
c625e72561
net: txgbe: Register I2C platform device
...
Register the platform device to use Designware I2C bus master driver.
Use regmap to read/write I2C device region from given base offset.
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com >
Signed-off-by: Paolo Abeni <pabeni@redhat.com >
2023-06-08 13:25:10 +02:00
Jiawen Wu
b63f20485e
net: txgbe: Register fixed rate clock
...
In order for I2C to be able to work in standard mode, register a fixed
rate clock for each I2C device.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Reviewed-by: Andrew Lunn <andrew@lunn.ch >
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com >
Signed-off-by: Paolo Abeni <pabeni@redhat.com >
2023-06-08 13:25:10 +02:00
Jiawen Wu
c3e382ad6d
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 >
2023-06-08 13:25:10 +02:00