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>
This commit is contained in:

committed by
David S. Miller

parent
37237b5b71
commit
ae7e69379f
@@ -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 {
|
||||
|
Reference in New Issue
Block a user