aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index bc483e1881a3..94ff7a43b679 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -2075,18 +2075,25 @@ void qlcnic_83xx_config_intr_coal(struct qlcnic_adapter *adapter)
2075static void qlcnic_83xx_handle_link_aen(struct qlcnic_adapter *adapter, 2075static void qlcnic_83xx_handle_link_aen(struct qlcnic_adapter *adapter,
2076 u32 data[]) 2076 u32 data[])
2077{ 2077{
2078 struct qlcnic_hardware_context *ahw = adapter->ahw;
2078 u8 link_status, duplex; 2079 u8 link_status, duplex;
2079 /* link speed */ 2080 /* link speed */
2080 link_status = LSB(data[3]) & 1; 2081 link_status = LSB(data[3]) & 1;
2081 adapter->ahw->link_speed = MSW(data[2]); 2082 if (link_status) {
2082 adapter->ahw->link_autoneg = MSB(MSW(data[3])); 2083 ahw->link_speed = MSW(data[2]);
2083 adapter->ahw->module_type = MSB(LSW(data[3])); 2084 duplex = LSB(MSW(data[3]));
2084 duplex = LSB(MSW(data[3])); 2085 if (duplex)
2085 if (duplex) 2086 ahw->link_duplex = DUPLEX_FULL;
2086 adapter->ahw->link_duplex = DUPLEX_FULL; 2087 else
2087 else 2088 ahw->link_duplex = DUPLEX_HALF;
2088 adapter->ahw->link_duplex = DUPLEX_HALF; 2089 } else {
2089 adapter->ahw->has_link_events = 1; 2090 ahw->link_speed = SPEED_UNKNOWN;
2091 ahw->link_duplex = DUPLEX_UNKNOWN;
2092 }
2093
2094 ahw->link_autoneg = MSB(MSW(data[3]));
2095 ahw->module_type = MSB(LSW(data[3]));
2096 ahw->has_link_events = 1;
2090 qlcnic_advert_link_change(adapter, link_status); 2097 qlcnic_advert_link_change(adapter, link_status);
2091} 2098}
2092 2099