aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/qed
diff options
context:
space:
mode:
authorAlexander Lobakin <alobakin@marvell.com>2020-07-20 21:08:07 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-20 17:59:44 -0700
commitae7e69379fd5a87141fd8c7f2efab8e73f2a9f7e (patch)
treef6fdda7d5a8779edcfb14bbe7946eea466697efa /include/linux/qed
parentqed: reformat several structures a bit (diff)
downloadlinux-dev-ae7e69379fd5a87141fd8c7f2efab8e73f2a9f7e.tar.xz
linux-dev-ae7e69379fd5a87141fd8c7f2efab8e73f2a9f7e.zip
qed: add support for Forward Error Correction
Add all necessary routines for reading supported FEC modes from NVM and querying FEC control to the MFW (if the running version supports it). Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/qed')
-rw-r--r--include/linux/qed/qed_if.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index dde48f206d0d..f0b4cdc79299 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -661,6 +661,14 @@ enum qed_protocol {
QED_PROTOCOL_FCOE,
};
+enum qed_fec_mode {
+ QED_FEC_MODE_NONE = BIT(0),
+ QED_FEC_MODE_FIRECODE = BIT(1),
+ QED_FEC_MODE_RS = BIT(2),
+ QED_FEC_MODE_AUTO = BIT(3),
+ QED_FEC_MODE_UNSUPPORTED = BIT(4),
+};
+
struct qed_link_params {
bool link_up;
@@ -671,6 +679,7 @@ struct qed_link_params {
#define QED_LINK_OVERRIDE_PAUSE_CONFIG BIT(3)
#define QED_LINK_OVERRIDE_LOOPBACK_MODE BIT(4)
#define QED_LINK_OVERRIDE_EEE_CONFIG BIT(5)
+#define QED_LINK_OVERRIDE_FEC_CONFIG BIT(6)
bool autoneg;
__ETHTOOL_DECLARE_LINK_MODE_MASK(adv_speeds);
@@ -689,6 +698,7 @@ struct qed_link_params {
#define QED_LINK_LOOPBACK_MAC BIT(4)
struct qed_link_eee_params eee;
+ u32 fec;
};
struct qed_link_output {
@@ -709,6 +719,9 @@ struct qed_link_output {
bool eee_active;
u8 sup_caps;
struct qed_link_eee_params eee;
+
+ u32 sup_fec;
+ u32 active_fec;
};
struct qed_probe_params {