Patch "net: aquantia: Fix actual speed capabilities reporting" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: aquantia: Fix actual speed capabilities reporting
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-aquantia-fix-actual-speed-capabilities-reporting.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Feb 28 16:23:28 CET 2018
From: Igor Russkikh <[email protected]>
Date: Thu, 14 Dec 2017 12:34:40 +0300
Subject: net: aquantia: Fix actual speed capabilities reporting
From: Igor Russkikh <[email protected]>
[ Upstream commit e4d02ca04c6d48ab2226342a1c4ed54f1dbb72bd ]
Different hardware device Ids correspond to different maximum speed available. Extra checks were added for devices D108 and D109 to remove unsupported speeds from these device capabilities list.
--- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 +++- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 7 ++++--- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 5 +++-- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 13 ++++++++++++- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 13 ++++++++++++- 6 files changed, 35 insertions(+), 9 deletions(-)
drivers/net/ethernet/aquantia/atlantic/aq_hw.h +3 -1
@@ -85,7 +85,9 @@ struct aq_hw_ops {void (*destroy)(struct aq_hw_s *self);int (*get_hw_caps)(struct aq_hw_s *self, -struct aq_hw_caps_s *aq_hw_caps); +struct aq_hw_caps_s *aq_hw_caps, +unsigned short device, +unsigned short subsystem_device);int (*hw_ring_tx_xmit)(struct aq_hw_s *self,struct aq_ring_s *aq_ring,unsigned int frags);
drivers/net/ethernet/aquantia/atlantic/aq_nic.c +4 -3
@@ -222,7 +222,7 @@ static struct net_device *aq_nic_ndev_alstruct aq_nic_s *aq_nic_alloc_cold (const struct net_device_ops *ndev_ops,const struct ethtool_ops *et_ops, -struct device *dev, +struct pci_dev *pdev,struct aq_pci_func_s *aq_pci_func,unsigned int port,const struct aq_hw_ops *aq_hw_ops)
@@ -242,7 +242,7 @@ struct aq_nic_s *aq_nic_alloc_cold(const ndev->netdev_ops = ndev_ops; ndev->ethtool_ops = et_ops; -SET_NETDEV_DEV (ndev, dev); +SET_NETDEV_DEV (ndev, &pdev->dev); ndev->if_port = port; self->ndev = ndev;
@@ -254,7 +254,8 @@ struct aq_nic_s *aq_nic_alloc_cold(const self->aq_hw = self->aq_hw_ops.create (aq_pci_func, self->port, &self->aq_hw_ops); - err = self->aq_hw_ops.get_hw_caps (self->aq_hw, &self->aq_hw_caps); + err = self->aq_hw_ops.get_hw_caps (self->aq_hw, &self->aq_hw_caps, + pdev->device, pdev->subsystem_device);if (err <0 ) goto err_exit;
drivers/net/ethernet/aquantia/atlantic/aq_nic.h +1 -1
@@ -71,7 +71,7 @@ struct aq_nic_cfg_s {struct aq_nic_s *aq_nic_alloc_cold (const struct net_device_ops *ndev_ops,const struct ethtool_ops *et_ops, -struct device *dev, +struct pci_dev *pdev,struct aq_pci_func_s *aq_pci_func,unsigned int port,const struct aq_hw_ops *aq_hw_ops);
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +3 -2
@@ -51,7 +51,8 @@ struct aq_pci_func_s *aq_pci_func_alloc(pci_set_drvdata (pdev, self); self->pdev = pdev; - err = aq_hw_ops->get_hw_caps (NULL , &self->aq_hw_caps); + err = aq_hw_ops->get_hw_caps (NULL , &self->aq_hw_caps, pdev->device, + pdev->subsystem_device);if (err <0 ) goto err_exit;
@@ -59,7 +60,7 @@ struct aq_pci_func_s *aq_pci_func_alloc(for (port =0 ; port < self->ports; ++port) {struct aq_nic_s *aq_nic =aq_nic_alloc_cold (ndev_ops, eth_ops, - &pdev->dev, self, + pdev, self, port, aq_hw_ops);if (!aq_nic) {
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +12 -1
@@ -18,9 +18,20 @@#include "hw_atl_a0_internal.h" static int hw_atl_a0_get_hw_caps (struct aq_hw_s *self, -struct aq_hw_caps_s *aq_hw_caps) +struct aq_hw_caps_s *aq_hw_caps, +unsigned short device, +unsigned short subsystem_device) {memcpy (aq_hw_caps, &hw_atl_a0_hw_caps_,sizeof (*aq_hw_caps)); + +if (device ==HW_ATL_DEVICE_ID_D108 && subsystem_device ==0x0001 ) + aq_hw_caps->link_speed_msk &= ~HW_ATL_A0_RATE_10G ; + +if (device ==HW_ATL_DEVICE_ID_D109 && subsystem_device ==0x0001 ) { + aq_hw_caps->link_speed_msk &= ~HW_ATL_A0_RATE_10G ; + aq_hw_caps->link_speed_msk &= ~HW_ATL_A0_RATE_5G ; + } +return 0 ; }
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +12 -1
@@ -18,9 +18,20 @@#include "hw_atl_b0_internal.h" static int hw_atl_b0_get_hw_caps (struct aq_hw_s *self, -struct aq_hw_caps_s *aq_hw_caps) +struct aq_hw_caps_s *aq_hw_caps, +unsigned short device, +unsigned short subsystem_device) {memcpy (aq_hw_caps, &hw_atl_b0_hw_caps_,sizeof (*aq_hw_caps)); + +if (device ==HW_ATL_DEVICE_ID_D108 && subsystem_device ==0x0001 ) + aq_hw_caps->link_speed_msk &= ~HW_ATL_B0_RATE_10G ; + +if (device ==HW_ATL_DEVICE_ID_D109 && subsystem_device ==0x0001 ) { + aq_hw_caps->link_speed_msk &= ~HW_ATL_B0_RATE_10G ; + aq_hw_caps->link_speed_msk &= ~HW_ATL_B0_RATE_5G ; + } +return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/net-aquantia-fix-actual-speed-capabilities-reporting.patch queue-4.14/net-aquantia-fix-hardware-dma-stream-overload-on-large-mrrs.patch