Commit b1f5037f authored by Rajesh Borundia's avatar Rajesh Borundia Committed by David S. Miller

qlcnic: Fix link speed and duplex display for 83xx adapter

o Set link speed and duplex to unknown when link is not up.
Signed-off-by: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: default avatarShahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent beb3d3a4
...@@ -2075,18 +2075,25 @@ void qlcnic_83xx_config_intr_coal(struct qlcnic_adapter *adapter) ...@@ -2075,18 +2075,25 @@ void qlcnic_83xx_config_intr_coal(struct qlcnic_adapter *adapter)
static void qlcnic_83xx_handle_link_aen(struct qlcnic_adapter *adapter, static void qlcnic_83xx_handle_link_aen(struct qlcnic_adapter *adapter,
u32 data[]) u32 data[])
{ {
struct qlcnic_hardware_context *ahw = adapter->ahw;
u8 link_status, duplex; u8 link_status, duplex;
/* link speed */ /* link speed */
link_status = LSB(data[3]) & 1; link_status = LSB(data[3]) & 1;
adapter->ahw->link_speed = MSW(data[2]); if (link_status) {
adapter->ahw->link_autoneg = MSB(MSW(data[3])); ahw->link_speed = MSW(data[2]);
adapter->ahw->module_type = MSB(LSW(data[3])); duplex = LSB(MSW(data[3]));
duplex = LSB(MSW(data[3])); if (duplex)
if (duplex) ahw->link_duplex = DUPLEX_FULL;
adapter->ahw->link_duplex = DUPLEX_FULL; else
else ahw->link_duplex = DUPLEX_HALF;
adapter->ahw->link_duplex = DUPLEX_HALF; } else {
adapter->ahw->has_link_events = 1; ahw->link_speed = SPEED_UNKNOWN;
ahw->link_duplex = DUPLEX_UNKNOWN;
}
ahw->link_autoneg = MSB(MSW(data[3]));
ahw->module_type = MSB(LSW(data[3]));
ahw->has_link_events = 1;
qlcnic_advert_link_change(adapter, link_status); qlcnic_advert_link_change(adapter, link_status);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment