summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
diff options
context:
space:
mode:
authorIgor Russkikh <Igor.Russkikh@aquantia.com>2018-11-09 11:53:56 +0000
committerDavid S. Miller <davem@davemloft.net>2018-11-09 15:38:10 -0800
commit35e8e8b45d31bec34379dd36e7b71448e003efb2 (patch)
tree3d822a239bb044f81212b126de34aa1824b27aeb /drivers/net/ethernet/aquantia/atlantic/aq_hw.h
parent85b18b0237ce9986a81a1b9534b5e2ee116f5504 (diff)
downloadlinux-stable-35e8e8b45d31bec34379dd36e7b71448e003efb2.tar.gz
linux-stable-35e8e8b45d31bec34379dd36e7b71448e003efb2.tar.bz2
linux-stable-35e8e8b45d31bec34379dd36e7b71448e003efb2.zip
net: aquantia: synchronized flow control between mac/phy
Flow control statuses were not synchronized between blocks, that caused packets/link drop on some corner cases, when MAC sent PFC although Phy was not expecting these to come. Driver should readout the negotiated FC from phy and configure RX block accordigly. This is done on each link change event with information from FW. Fixes: 288551de45aa ("net: aquantia: Implement rx/tx flow control ethtools callback") Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_hw.h')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_hw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index e8689241204e..7ec8d24b2b0b 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@ -204,6 +204,7 @@ struct aq_hw_ops {
int (*hw_get_fw_version)(struct aq_hw_s *self, u32 *fw_version);
+ int (*hw_set_fc)(struct aq_hw_s *self, u32 fc, u32 tc);
};
struct aq_fw_ops {
@@ -226,6 +227,8 @@ struct aq_fw_ops {
int (*update_stats)(struct aq_hw_s *self);
+ u32 (*get_flow_control)(struct aq_hw_s *self, u32 *fcmode);
+
int (*set_flow_control)(struct aq_hw_s *self);
int (*set_power)(struct aq_hw_s *self, unsigned int power_state,