Re: C45 support and mdiobus_scan

2018-08-10 Thread Tom Lendacky
On 8/9/2018 10:25 AM, Andrew Lunn wrote: >>> The PCIe core will look in the device tree and when it creates the >>> platform device for the i210 on the pcie bus, it points >>> pdev->dev.of_node at this node. So long as you are using a platform >>> with DT, you can do this. I hope you are not using

[PATCH net-next v2 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-23 Thread Tom Lendacky
Add ethtool support to show and set the device channel configuration. Changing the channel configuration will result in a device restart. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 25 + drivers/net/ethernet/amd/xgb

[PATCH net-next v2 12/12] amd-xgbe: Improve SFP 100Mbps auto-negotiation

2018-05-23 Thread Tom Lendacky
properly. Add a quirk for these SFPs so that if the outcome of the AN actually results in changing to a new speed, re-initiate AN at that new speed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 77 +++ d

[PATCH net-next v2 09/12] amd-xgbe: Always attempt link training in KR mode

2018-05-23 Thread Tom Lendacky
-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 69 +++-- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 9c39c72..4

[PATCH net-next v2 11/12] amd-xgbe: Update the BelFuse quirk to support SGMII

2018-05-23 Thread Tom Lendacky
Instead of using a quirk to make the BelFuse 1GBT-SFP06 part look like a 1000baseX part, program the SFP PHY to support SGMII and 10/100/1000 baseT. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 109 +++

[PATCH net-next v2 10/12] amd-xgbe: Advertise FEC support with the KR re-driver

2018-05-23 Thread Tom Lendacky
When a KR re-driver is present, indicate the FEC support is available during auto-negotiation. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/amd/xgbe/xg

[PATCH net-next v2 07/12] amd-xgbe: Prepare for ethtool set-channel support

2018-05-23 Thread Tom Lendacky
startup Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 108 ++--- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 20 - 2 files changed, 68 insertions(+), 60 deletions(-) diff --git a/drivers/net/ethernet/am

[PATCH net-next v2 05/12] amd-xgbe: Add ethtool support to retrieve SFP module info

2018-05-23 Thread Tom Lendacky
Add support to get SFP module information using ethtool. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 18 +++ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c| 21 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next v2 06/12] amd-xgbe: Add ethtool show/set ring parameter support

2018-05-23 Thread Tom Lendacky
Add ethtool support to show and set the number of the Rx and Tx ring descriptors. Changing the ring configuration will result in a device restart. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c |6 -- drivers/net/ethernet/amd/xgb

[PATCH net-next v2 03/12] amd-xgbe: Remove use of comm_owned field

2018-05-23 Thread Tom Lendacky
communications ownership properly. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-ph

[PATCH net-next v2 04/12] amd-xgbe: Remove field that indicates SFP diagnostic support

2018-05-23 Thread Tom Lendacky
is detected. Remove this field and the logic supporting it. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/am

[PATCH net-next v2 02/12] amd-xgbe: Read and save the port property registers during probe

2018-05-23 Thread Tom Lendacky
Read and save the port property registers once during the device probe and then use the saved values as they are needed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c| 34 ++ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next v2 00/12] amd-xgbe: AMD XGBE driver updates 2018-05-21

2018-05-23 Thread Tom Lendacky
, don't create combined channels based on the min of the tx and rx channels specified). Tom Lendacky (12): amd-xgbe: Fix debug output of max channel counts amd-xgbe: Read and save the port property registers during probe amd-xgbe: Remove use of comm_owned field amd-xgbe

[PATCH net-next v2 01/12] amd-xgbe: Fix debug output of max channel counts

2018-05-23 Thread Tom Lendacky
A debug output print statement uses the wrong variable to output the maximum Rx channel count (cut and paste error, basically). Fix the statement to use the proper variable. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |2 +-

Re: [PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-22 Thread Tom Lendacky
On 5/22/2018 8:29 AM, Edward Cree wrote: > On 22/05/18 14:24, Tom Lendacky wrote: >> The amd-xgbe driver is not designed to allocate separate IRQs for Rx and >> Tx. In general, there is one IRQ for a channel of which Tx and Rx are >> shared. You can have more Tx channels tha

Re: [PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-22 Thread Tom Lendacky
On 5/22/2018 12:35 AM, Jakub Kicinski wrote: > On Mon, 21 May 2018 16:59:37 -0500, Tom Lendacky wrote: >> +rx = combined + channels->rx_count; >> +tx = combined + channels->tx_count; >> +netdev_notice(netdev, "final channel count assignment: combined=

[PATCH net-next 09/12] amd-xgbe: Always attempt link training in KR mode

2018-05-21 Thread Tom Lendacky
-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 69 +++-- 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 9c39c72..4

[PATCH net-next 11/12] amd-xgbe: Update the BelFuse quirk to support SGMII

2018-05-21 Thread Tom Lendacky
Instead of using a quirk to make the BelFuse 1GBT-SFP06 part look like a 1000baseX part, program the SFP PHY to support SGMII and 10/100/1000 baseT. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 109 +++

[PATCH net-next 12/12] amd-xgbe: Improve SFP 100Mbps auto-negotiation

2018-05-21 Thread Tom Lendacky
properly. Add a quirk for these SFPs so that if the outcome of the AN actually results in changing to a new speed, re-initiate AN at that new speed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 77 +++ d

[PATCH net-next 10/12] amd-xgbe: Advertise FEC support with the KR re-driver

2018-05-21 Thread Tom Lendacky
When a KR re-driver is present, indicate the FEC support is available during auto-negotiation. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/amd/xgbe/xg

[PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-21 Thread Tom Lendacky
Add ethtool support to show and set the device channel configuration. Changing the channel configuration will result in a device restart. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 25 + drivers/net/ethernet/amd/xgb

[PATCH net-next 05/12] amd-xgbe: Add ethtool support to retrieve SFP module info

2018-05-21 Thread Tom Lendacky
Add support to get SFP module information using ethtool. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 18 +++ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c| 21 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next 07/12] amd-xgbe: Prepare for ethtool set-channel support

2018-05-21 Thread Tom Lendacky
startup Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 108 ++--- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 20 - 2 files changed, 68 insertions(+), 60 deletions(-) diff --git a/drivers/net/ethernet/am

[PATCH net-next 06/12] amd-xgbe: Add ethtool show/set ring parameter support

2018-05-21 Thread Tom Lendacky
Add ethtool support to show and set the number of the Rx and Tx ring descriptors. Changing the ring configuration will result in a device restart. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c |6 -- drivers/net/ethernet/amd/xgb

[PATCH net-next 04/12] amd-xgbe: Remove field that indicates SFP diagnostic support

2018-05-21 Thread Tom Lendacky
is detected. Remove this field and the logic supporting it. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/am

[PATCH net-next 03/12] amd-xgbe: Remove use of comm_owned field

2018-05-21 Thread Tom Lendacky
communications ownership properly. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-ph

[PATCH net-next 02/12] amd-xgbe: Read and save the port property registers during probe

2018-05-21 Thread Tom Lendacky
Read and save the port property registers once during the device probe and then use the saved values as they are needed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c| 34 ++ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next 00/12] amd-xgbe: AMD XGBE driver updates 2018-05-21

2018-05-21 Thread Tom Lendacky
- Update the BelFuse quirk to now support SGMII - Improve 100Mbps auto-negotiation for BelFuse parts This patch series is based on net-next. --- Tom Lendacky (12): amd-xgbe: Fix debug output of max channel counts amd-xgbe: Read and save the port property registers during probe amd

[PATCH net-next 01/12] amd-xgbe: Fix debug output of max channel counts

2018-05-21 Thread Tom Lendacky
A debug output print statement uses the wrong variable to output the maximum Rx channel count (cut and paste error, basically). Fix the statement to use the proper variable. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |2 +-

[PATCH net 3/3] amd-xgbe: Only use the SFP supported transceiver signals

2018-04-23 Thread Tom Lendacky
The SFP eeprom indicates the transceiver signals (Rx LOS, Tx Fault, etc.) that it supports. Update the driver to include checking the eeprom data when deciding whether to use a transceiver signal. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xg

[PATCH net 2/3] amd-xgbe: Improve KR auto-negotiation and training

2018-04-23 Thread Tom Lendacky
tracking before or after link training has been initiated. Also, with these changes the receiver reset cycle that is performed during the link status check can be performed less often. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h

[PATCH net 1/3] amd-xgbe: Add pre/post auto-negotiation phy hooks

2018-04-23 Thread Tom Lendacky
Add hooks to the driver auto-negotiation (AN) flow to allow the different phy implementations to perform any steps necessary to improve AN. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 16 ++-- drivers/net/ethernet/am

[PATCH net 0/3] amd-xgbe: AMD XGBE driver fixes 2018-04-23

2018-04-23 Thread Tom Lendacky
tracking during auto-negotiation page exchange in KR mode - Check for SFP tranceiver signal support and only use the signal if the SFP indicates that it is supported This patch series is based on net. --- Please queue this patch series up to stable releases 4.14 and above. Tom Lendacky (3

[PATCH net] amd-xgbe: Restore PCI interrupt enablement setting on resume

2018-02-20 Thread Tom Lendacky
After resuming from suspend, the PCI device support must re-enable the interrupt setting so that interrupts are actually delivered. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- Please queue this patch up to stable releases 4.14 and above. drivers/net/ethernet/amd/xgbe/xgbe

Re: [PATCH 4/4] net: amd-xgbe: fix comparison to bitshift when dealing with a mask

2018-02-05 Thread Tom Lendacky
On 2/5/2018 2:10 PM, Wolfram Sang wrote: > Due to a typo, the mask was destroyed by a comparison instead of a bit > shift. > > Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> Excellent find. Acked-by: Tom Lendacky <thomas.lenda...@amd.com> David, thi

Re: [PATCH v1] net: amd-xgbe: Get rid of custom hex_dump_to_buffer()

2017-12-19 Thread Tom Lendacky
'; > - } else if ((i % 4) == 0) { > - buffer[j++] = ' '; > - } > + for (i = 0; i < skb->len; i += 32) { > + unsigned int len = min(skb->len - i, 32U); > + > + hex_dump_to_buffer(>data[i], len, 32, 1, buffer, 128, > fal

[PATCH net-next v1] amd-xgbe: Interrupt summary bits are h/w version dependent

2017-08-28 Thread Tom Lendacky
when a fatal bus error occurs. Update the driver to set the interrupt enable bit based on the reported version of the hardware. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h |8 ++-- drivers/net/ethernet/amd/xgbe/xgbe-dev.c

[PATCH net-next v2 13/13] amd-xgbe: Add additional ethtool statistics

2017-08-18 Thread Tom Lendacky
Add some additional statistics for tracking VXLAN packets and checksum errors. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c |8 +++- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c |4 drivers/net/ethernet/amd/xgbe/

[PATCH net-next v2 12/13] amd-xgbe: Add support for VXLAN offload capabilities

2017-08-18 Thread Tom Lendacky
to be disabled and can no longer be advertised. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 24 ++ drivers/net/ethernet/amd/xgbe/xgbe-dev.c| 92 +++ drivers/net/ethernet/amd/xgbe/xgbe-drv.c

[PATCH net-next v2 11/13] amd-xgbe: Convert to using the new link mode settings

2017-08-18 Thread Tom Lendacky
Convert from using the old u32 supported, advertising, etc. link settings to the new link mode settings that support bit positions / settings greater than 32 bits. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 56 ++-- drive

[PATCH net-next v2 07/13] amd-xgbe: Optimize DMA channel interrupt enablement

2017-08-18 Thread Tom Lendacky
to read it each time. Add the IER value to the channel related data structure and use that as the base for enabling and disabling interrupts, thus removing the need for the MMIO read. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c

[PATCH net-next v2 09/13] amd-xgbe: Add per queue Tx and Rx statistics

2017-08-18 Thread Tom Lendacky
Add per queue Tx and Rx packet and byte counts. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 +- drivers/net/ethernet/am

[PATCH net-next v2 05/13] amd-xgbe: Add support to handle device renaming

2017-08-18 Thread Tom Lendacky
named workqueues into the device open path. Add support to register for net events so that if a device is renamed the corresponding debugfs directory can be renamed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 25 + d

[PATCH net-next v2 02/13] amd-xgbe: Set the MII control width for the MAC interface

2017-08-18 Thread Tom Lendacky
When running in SGMII mode at speeds below 1000Mbps, the auto-negotition control register must set the MII control width for the MAC interface to be 8-bits wide. By default the width is 4-bits. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-co

[PATCH net-next v2 03/13] amd-xgbe: Be sure driver shuts down cleanly on module removal

2017-08-18 Thread Tom Lendacky
, the phy_exit() does not need to invoke phy_stop() since that will be called as part of the device closing, so remove that call. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-main.c |4 ++-- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c |2 -- 2

[PATCH net-next v2 01/13] amd-xgbe: Set the MDIO mode for 10000Base-T configuration

2017-08-18 Thread Tom Lendacky
Currently the MDIO mode is set to none for the 1Base-T, which is incorrect. The MDIO mode should for this configuration should be clause 45. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |2 +- 1 file changed, 1 insertion

[PATCH net-next v2 00/13] amd-xgbe: AMD XGBE driver updates 2017-08-17

2017-08-18 Thread Tom Lendacky
debugfs support for reading SFP eeprom and phydev registers Tom Lendacky (13): amd-xgbe: Set the MDIO mode for 1Base-T configuration amd-xgbe: Set the MII control width for the MAC interface amd-xgbe: Be sure driver shuts down cleanly on module removal amd-xgbe: Update

Re: [PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-18 Thread Tom Lendacky
On 8/18/2017 12:02 AM, David Miller wrote: From: Andrew Lunn <and...@lunn.ch> Date: Fri, 18 Aug 2017 02:30:57 +0200 On Thu, Aug 17, 2017 at 07:02:50PM -0500, Tom Lendacky wrote: Add additional debugfs support for reading / writing registers of any attached external phy devices a

[PATCH net-next v1 13/14] amd-xgbe: Add support for VXLAN offload capabilities

2017-08-17 Thread Tom Lendacky
to be disabled and can no longer be advertised. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 24 ++ drivers/net/ethernet/amd/xgbe/xgbe-dev.c| 92 +++ drivers/net/ethernet/amd/xgbe/xgbe-drv.c

[PATCH net-next v1 08/14] amd-xgbe: Optimize DMA channel interrupt enablement

2017-08-17 Thread Tom Lendacky
to read it each time. Add the IER value to the channel related data structure and use that as the base for enabling and disabling interrupts, thus removing the need for the MMIO read. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c

[PATCH net-next v1 14/14] amd-xgbe: Add additional ethtool statistics

2017-08-17 Thread Tom Lendacky
Add some additional statistics for tracking VXLAN packets and checksum errors. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c |8 +++- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c |4 drivers/net/ethernet/amd/xgbe/

[PATCH net-next v1 12/14] amd-xgbe: Convert to using the new link mode settings

2017-08-17 Thread Tom Lendacky
Convert from using the old u32 supported, advertising, etc. link settings to the new link mode settings that support bit positions / settings greater than 32 bits. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 56 ++-- drive

[PATCH net-next v1 09/14] amd-xgbe: Add hardware features debug output

2017-08-17 Thread Tom Lendacky
Use the dynamic debug support to output information about the hardware features reported by the device. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 78 +- 1 file changed, 75 insertions(+), 3 deletions(-)

[PATCH net-next v1 11/14] net: ethtool: Add macro to clear a link mode setting

2017-08-17 Thread Tom Lendacky
There are currently macros to set and test an ETHTOOL_LINK_MODE_ setting, but not to clear one. Add a macro to clear an ETHTOOL_LINK_MODE_ setting. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- include/linux/ethtool.h | 11 +++ 1 file changed, 11 insertions(+) diff

[PATCH net-next v1 10/14] amd-xgbe: Add per queue Tx and Rx statistics

2017-08-17 Thread Tom Lendacky
Add per queue Tx and Rx packet and byte counts. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 +- drivers/net/ethernet/am

[PATCH net-next v1 06/14] amd-xgbe: Add support to handle device renaming

2017-08-17 Thread Tom Lendacky
named workqueues into the device open path. Add support to register for net events so that if a device is renamed the corresponding debugfs directory can be renamed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 25 + d

[PATCH net-next v1 07/14] amd-xgbe: Add additional dynamic debug messages

2017-08-17 Thread Tom Lendacky
Add some additional dynamic debug message to the driver. The new messages will provide additional information about the PCS window calculation. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |4 1 file changed, 4 insertions(+)

[PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-17 Thread Tom Lendacky
Add additional debugfs support for reading / writing registers of any attached external phy devices as well as the SFP eeprom data. These debugfs files will only be created if the phy implementation supports them. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/et

[PATCH net-next v1 01/14] amd-xgbe: Set the MDIO mode for 10000Base-T configuration

2017-08-17 Thread Tom Lendacky
Currently the MDIO mode is set to none for the 1Base-T, which is incorrect. The MDIO mode should for this configuration should be clause 45. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |2 +- 1 file changed, 1 insertion

[PATCH net-next v1 03/14] amd-xgbe: Be sure driver shuts down cleanly on module removal

2017-08-17 Thread Tom Lendacky
, the phy_exit() does not need to invoke phy_stop() since that will be called as part of the device closing, so remove that call. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-main.c |4 ++-- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c |2 -- 2

[PATCH net-next v1 02/14] amd-xgbe: Set the MII control width for the MAC interface

2017-08-17 Thread Tom Lendacky
When running in SGMII mode at speeds below 1000Mbps, the auto-negotition control register must set the MII control width for the MAC interface to be 8-bits wide. By default the width is 4-bits. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-co

[PATCH net-next v1 04/14] amd-xgbe: Update TSO packet statistics accuracy

2017-08-17 Thread Tom Lendacky
When transmitting a TSO packet, the driver only increments the TSO packet statistic by one rather than the number of total packets that were sent. Update the driver to record the total number of packets that resulted from TSO transmit. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.

[PATCH net-next v1 00/14] amd-xgbe: AMD XGBE driver updates 2017-08-17

2017-08-17 Thread Tom Lendacky
+ include/linux/ethtool.h | 11 + 12 files changed, 1408 insertions(+), 353 deletions(-) -- Tom Lendacky

[PATCH net-next v1 13/14] amd-xgbe: Simplify the burst length settings

2017-06-28 Thread Tom Lendacky
to set the AXI master burst len setting. Change to the full bit field range and set the burst length based on the specified value. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 11 drivers/net/ethernet/amd/xgbe/xgbe-dev.c

[PATCH net-next v1 14/14] amd-xgbe: Adjust register settings to improve performance

2017-06-28 Thread Tom Lendacky
descriptor pre-fetch threshold - Selectively setting additional cache coherency controls Tested and verified on all versions of the hardware. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 13 + drivers/net/ethernet/amd/xgb

[PATCH net-next v1 11/14] amd-xgbe: Add NUMA affinity support for IRQ hints

2017-06-28 Thread Tom Lendacky
For IRQ affinity, set the affinity hints for the IRQs to be (initially) on the processors corresponding to the NUMA node of the device. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 18 +++--- drivers/net/ethernet/am

[PATCH net-next v1 12/14] amd-xgbe: Prepare for more fine grained cache coherency controls

2017-06-28 Thread Tom Lendacky
In prep for setting fine grained read and write DMA cache coherency controls, allow specific values to be used to set the cache coherency registers. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 28 - d

[PATCH net-next v1 10/14] amd-xgbe: Add NUMA affinity support for memory allocations

2017-06-28 Thread Tom Lendacky
the channel and ring allocations into individual allocations. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 94 ++- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 135 +- drivers/net/ethernet/amd/xgbe/xgbe

[PATCH net-next v1 09/14] amd-xgbe: Re-issue interrupt if interrupt status not cleared

2017-06-28 Thread Tom Lendacky
service routine as a tasklet so that the re-issuance of the interrupt is handled properly. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-common.h |1 + drivers/net/ethernet/amd/xgbe/xgbe-drv.c| 53 +++ drive

[PATCH net-next v1 04/14] amd-xgbe: Add a check for an skb in the timestamp path

2017-06-28 Thread Tom Lendacky
Spurious Tx timestamp interrupts can cause an oops in the Tx timestamp processing function if a Tx timestamp skb is NULL. Add a check to insure a Tx timestamp skb is present before attempting to use it. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgb

[PATCH net-next v1 08/14] amd-xgbe: Limit the I2C error messages that are output

2017-06-28 Thread Tom Lendacky
When I2C communication fails, it tends to always fail. Rather than continuously issue an error message (once per second in most cases), change the message to be issued just once. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next v1 06/14] amd-xgbe: Handle return code from software reset function

2017-06-28 Thread Tom Lendacky
Currently the function that performs a software reset of the hardware provides a return code. During driver probe check this return code and exit with an error if the software reset fails. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-main.c

[PATCH net-next v1 07/14] amd-xgbe: Fixes for working with PHYs that support 2.5GbE

2017-06-28 Thread Tom Lendacky
The driver has some missing functionality when operating in the mode that supports 2.5GbE. Fix the driver to fully recognize and support this speed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |7 +++ 1 file changed, 7 inse

[PATCH net-next v1 05/14] amd-xgbe: Prevent looping forever if timestamp update fails

2017-06-28 Thread Tom Lendacky
Just to be on the safe side, should the update of the timestamp registers not complete, issue a warning rather than looping forever waiting for the update to complete. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 15

[PATCH net-next v1 01/14] amd-xgbe: Simplify mailbox interface rate change code

2017-06-28 Thread Tom Lendacky
Simplify and centralize the mailbox command rate change interface by having a single function perform the writes to the mailbox registers to issue the request. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

[PATCH net-next v1 02/14] amd-xgbe: Fix SFP PHY supported/advertised settings

2017-06-28 Thread Tom Lendacky
. to be based on the installed SFP. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 69 ++- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drive

[PATCH net-next v1 03/14] amd-xgbe: Use the proper register during PTP initialization

2017-06-28 Thread Tom Lendacky
result in a bug, hence only fixing in net-next. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ptp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe

[PATCH net-next v1 00/14] amd-xgbe: AMD XGBE driver updates 2016-06-28

2017-06-28 Thread Tom Lendacky
cache coherency controls - Simplify setting the DMA burst length programming - Performance improvements This patch series is based on net-next. --- Tom Lendacky (14): amd-xgbe: Simplify mailbox interface rate change code amd-xgbe: Fix SFP PHY supported/advertised settings amd-xgbe

Re: [PATCH] amd-xgbe: use PAGE_ALLOC_COSTLY_ORDER in xgbe_map_rx_buffer

2017-06-02 Thread Tom Lendacky
rectly. Signed-off-by: Michal Hocko <mho...@suse.com> Acked-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethe

[PATCH net] amd-xgbe: Fix the ECC-related bit position definitions

2017-03-22 Thread Tom Lendacky
is performed. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- Please queue this patch up for 4.10-stable. drivers/net/ethernet/amd/xgbe/xgbe-common.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/amd/xgb

Re: [PATCH net] amd-xgbe: Fix jumbo MTU processing on newer hardware

2017-03-15 Thread Tom Lendacky
On 3/15/2017 5:52 PM, Tom Lendacky wrote: On 3/15/2017 5:41 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Wed, 15 Mar 2017 17:40:51 -0500 On 3/15/2017 5:37 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Wed, 15 Mar 2017 15

Re: [PATCH net] amd-xgbe: Fix jumbo MTU processing on newer hardware

2017-03-15 Thread Tom Lendacky
On 3/15/2017 5:37 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Wed, 15 Mar 2017 15:11:23 -0500 Newer hardware does not provide a cumulative payload length when multiple descriptors are needed to handle the data. Once the MTU increases beyond the size th

Re: [PATCH net] amd-xgbe: Fix jumbo MTU processing on newer hardware

2017-03-15 Thread Tom Lendacky
On 3/15/2017 5:41 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Wed, 15 Mar 2017 17:40:51 -0500 On 3/15/2017 5:37 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Wed, 15 Mar 2017 15:11:23 -0500 Newer hardware does

[PATCH net] amd-xgbe: Fix jumbo MTU processing on newer hardware

2017-03-15 Thread Tom Lendacky
in the chain for payload data. Based on whether the driver is processing the first, intermediate, or last descriptor it can calculate the buffer usage and build the SKB properly. Tested and verified on both old and new hardware. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/et

Re: amd-xgbe: unbalanced irq enable in v4.11-rc1

2017-03-10 Thread Tom Lendacky
On 3/10/2017 11:19 AM, Mark Rutland wrote: Hi, I'm seeing the below splat when transferring data over the network, using v4.11-rc1 on an AMD Seattle platform. I don't see the splat with v4.10. Looking at just the driver, I couldn't see any suspicious changes. Reverting commit 402168b4c2dc0734

Re: [PATCH net] amd-xgbe: Enable IRQs only if napi_complete_done() is true

2017-03-10 Thread Tom Lendacky
On 3/9/2017 8:31 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Thu, 9 Mar 2017 17:48:23 -0600 Depending on the hardware, the amd-xgbe driver may use disable_irq_nosync() and enable_irq() when an interrupt is received to process Rx packets. If the napi_complet

[PATCH net] amd-xgbe: Enable IRQs only if napi_complete_done() is true

2017-03-09 Thread Tom Lendacky
the driver to only enable interrupts if napi_complete_done() returns true. Reported-by: Jeremy Linton <jeremy.lin...@arm.com> Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-)

Re: xgbe unbalanced enable for IRQ XX in 4.11-rc1

2017-03-09 Thread Tom Lendacky
On 3/9/2017 5:06 PM, Eric Dumazet wrote: On Thu, 2017-03-09 at 16:35 -0600, Tom Lendacky wrote: On 3/9/2017 4:17 PM, Jeremy Linton wrote: Hi, On 03/09/2017 03:39 PM, Tom Lendacky wrote: On 3/9/2017 3:26 PM, Jeremy Linton wrote: Hi, Hi Jeremy, I'll have a look at it. Can you send me your

Re: xgbe unbalanced enable for IRQ XX in 4.11-rc1

2017-03-09 Thread Tom Lendacky
On 3/9/2017 4:17 PM, Jeremy Linton wrote: Hi, On 03/09/2017 03:39 PM, Tom Lendacky wrote: On 3/9/2017 3:26 PM, Jeremy Linton wrote: Hi, Hi Jeremy, I'll have a look at it. Can you send me your kernel config just in case? Sure, i will send it to you off list to avoid spamming everyone

Re: xgbe unbalanced enable for IRQ XX in 4.11-rc1

2017-03-09 Thread Tom Lendacky
On 3/9/2017 3:26 PM, Jeremy Linton wrote: Hi, Hi Jeremy, I'll have a look at it. Can you send me your kernel config just in case? Thanks, Tom I have a softiron 3k and under network load (nfs copies, vnc with gnome, etc) it is now throwing these messages as fast as the console will accept

Re: [PATCH net v1 0/3] amd-xgbe: AMD XGBE driver fixes 2017-02-28

2017-03-02 Thread Tom Lendacky
On 3/2/2017 3:02 PM, David Miller wrote: From: Tom Lendacky <thomas.lenda...@amd.com> Date: Tue, 28 Feb 2017 15:02:42 -0600 This patch series addresses some issues in the AMD XGBE driver. The following fixes are included in this driver update series: - Stop the PHY before dis

[PATCH net v1 3/3] amd-xgbe: Don't overwrite SFP PHY mod_absent settings

2017-02-28 Thread Tom Lendacky
If an SFP module is not present, xgbe_phy_sfp_phy_settings() should return after applying the default settings. Currently there is no return statement and the default settings are overwritten. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-ph

[PATCH net v1 0/3] amd-xgbe: AMD XGBE driver fixes 2017-02-28

2017-02-28 Thread Tom Lendacky
on device startup, not just device probe - Do not overwrite SFP settings when mod_absent is detected This patch series is based on net. --- Tom Lendacky (3): amd-xgbe: Stop the PHY before releasing interrupts amd-xgbe: Be sure to set MDIO modes on device (re)start amd-xgbe

[PATCH net v1 1/3] amd-xgbe: Stop the PHY before releasing interrupts

2017-02-28 Thread Tom Lendacky
. Move the stopping of the PHY to before the releasing of the interrupts. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/d

[PATCH net v1 2/3] amd-xgbe: Be sure to set MDIO modes on device (re)start

2017-02-28 Thread Tom Lendacky
The MDIO register mode is set when the device is probed. But when the device is brought down and then back up, the MDIO register mode has been reset. Be sure to reset the mode during device startup and only change the mode of the address specified. Signed-off-by: Tom Lendacky <thomas.le

[PATCH net v1 2/2] amd-xgbe: Check xgbe_init() return code

2017-01-20 Thread Tom Lendacky
The xgbe_init() routine returns a return code indicating success or failure, but the return code is not checked. Add code to xgbe_init() to issue a message when failures are seen and add code to check the xgbe_init() return code. Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> --- d

[PATCH net v1 0/2] amd-xgbe: AMD XGBE driver fixes 2017-01-20

2017-01-20 Thread Tom Lendacky
from the xgbe_init() function This patch series is based on net. --- Tom Lendacky (2): amd-xgbe: Add a hardware quirk for register definitions amd-xgbe: Check xgbe_init() return code drivers/net/ethernet/amd/xgbe/xgbe-common.h |2 ++ drivers/net/ethernet/amd/xgbe/xgbe-dev.c

[PATCH net v1 1/2] amd-xgbe: Add a hardware quirk for register definitions

2017-01-20 Thread Tom Lendacky
A newer version of the hardware is using the same PCI ids for the network device but has altered register definitions for determining the window settings for the indirect PCS access. Add support to check for this hardware and if found use the new register values. Signed-off-by: Tom Lendacky

Re: kill off pci_enable_msi_{exact,range}

2017-01-13 Thread Tom Lendacky
On 1/13/2017 11:15 AM, Christoph Hellwig wrote: > On Fri, Jan 13, 2017 at 11:13:21AM -0600, Bjorn Helgaas wrote: >> I dropped the empty commit and replaced the xgbe patch with the one below. >> Can you take a look at [1] and make sure it's what you expected? > > This looks great, thanks! >

Re: [PATCH 2/3] xgbe: switch to pci_irq_alloc_vectors

2017-01-11 Thread Tom Lendacky
On 1/11/2017 3:03 AM, Christoph Hellwig wrote: > On Tue, Jan 10, 2017 at 12:40:10PM -0600, Tom Lendacky wrote: >> On 1/9/2017 2:37 PM, Christoph Hellwig wrote: >>> The newly added xgbe drivers uses the deprecated pci_enable_msi_exact >>> and pci_enable_msix_range in

  1   2   3   >