sfp: improve support for direct-attach copper cables
Improve the support for direct-attach copper so that we avoid kernel warning messages, and report the appropriate PORT_DA type to userspace. Direct Attach cables can use a number of protocols depending on their range of speeds. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9962acf7fb
commit
f10fcbcf91
@@ -165,7 +165,41 @@ struct sfp_eeprom_base {
|
||||
char vendor_rev[4];
|
||||
union {
|
||||
__be16 optical_wavelength;
|
||||
u8 cable_spec;
|
||||
__be16 cable_compliance;
|
||||
struct {
|
||||
#if defined __BIG_ENDIAN_BITFIELD
|
||||
u8 reserved60_2:6;
|
||||
u8 fc_pi_4_app_h:1;
|
||||
u8 sff8431_app_e:1;
|
||||
u8 reserved61:8;
|
||||
#elif defined __LITTLE_ENDIAN_BITFIELD
|
||||
u8 sff8431_app_e:1;
|
||||
u8 fc_pi_4_app_h:1;
|
||||
u8 reserved60_2:6;
|
||||
u8 reserved61:8;
|
||||
#else
|
||||
#error Unknown Endian
|
||||
#endif
|
||||
} __packed passive;
|
||||
struct {
|
||||
#if defined __BIG_ENDIAN_BITFIELD
|
||||
u8 reserved60_4:4;
|
||||
u8 fc_pi_4_lim:1;
|
||||
u8 sff8431_lim:1;
|
||||
u8 fc_pi_4_app_h:1;
|
||||
u8 sff8431_app_e:1;
|
||||
u8 reserved61:8;
|
||||
#elif defined __LITTLE_ENDIAN_BITFIELD
|
||||
u8 sff8431_app_e:1;
|
||||
u8 fc_pi_4_app_h:1;
|
||||
u8 sff8431_lim:1;
|
||||
u8 fc_pi_4_lim:1;
|
||||
u8 reserved60_4:4;
|
||||
u8 reserved61:8;
|
||||
#else
|
||||
#error Unknown Endian
|
||||
#endif
|
||||
} __packed active;
|
||||
} __packed;
|
||||
u8 reserved62;
|
||||
u8 cc_base;
|
||||
|
Reference in New Issue
Block a user