|
@@ -683,12 +683,17 @@ void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup)
|
|
|
adapter->ahw->linkup = 0;
|
|
|
netif_carrier_off(netdev);
|
|
|
} else if (!adapter->ahw->linkup && linkup) {
|
|
|
- /* Do not advertise Link up if the port is in loopback mode */
|
|
|
- if (qlcnic_83xx_check(adapter) && adapter->ahw->lb_mode)
|
|
|
+ adapter->ahw->linkup = 1;
|
|
|
+
|
|
|
+ /* Do not advertise Link up to the stack if device
|
|
|
+ * is in loopback mode
|
|
|
+ */
|
|
|
+ if (qlcnic_83xx_check(adapter) && adapter->ahw->lb_mode) {
|
|
|
+ netdev_info(netdev, "NIC Link is up for loopback test\n");
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
netdev_info(netdev, "NIC Link is up\n");
|
|
|
- adapter->ahw->linkup = 1;
|
|
|
netif_carrier_on(netdev);
|
|
|
}
|
|
|
}
|
|
@@ -1150,13 +1155,13 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
|
|
|
u16 lro_length, length, data_offset, t_vid, vid = 0xffff;
|
|
|
u32 seq_number;
|
|
|
|
|
|
- if (unlikely(ring > adapter->max_rds_rings))
|
|
|
+ if (unlikely(ring >= adapter->max_rds_rings))
|
|
|
return NULL;
|
|
|
|
|
|
rds_ring = &recv_ctx->rds_rings[ring];
|
|
|
|
|
|
index = qlcnic_get_lro_sts_refhandle(sts_data0);
|
|
|
- if (unlikely(index > rds_ring->num_desc))
|
|
|
+ if (unlikely(index >= rds_ring->num_desc))
|
|
|
return NULL;
|
|
|
|
|
|
buffer = &rds_ring->rx_buf_arr[index];
|
|
@@ -1662,13 +1667,13 @@ qlcnic_83xx_process_lro(struct qlcnic_adapter *adapter,
|
|
|
u16 vid = 0xffff;
|
|
|
int err;
|
|
|
|
|
|
- if (unlikely(ring > adapter->max_rds_rings))
|
|
|
+ if (unlikely(ring >= adapter->max_rds_rings))
|
|
|
return NULL;
|
|
|
|
|
|
rds_ring = &recv_ctx->rds_rings[ring];
|
|
|
|
|
|
index = qlcnic_83xx_hndl(sts_data[0]);
|
|
|
- if (unlikely(index > rds_ring->num_desc))
|
|
|
+ if (unlikely(index >= rds_ring->num_desc))
|
|
|
return NULL;
|
|
|
|
|
|
buffer = &rds_ring->rx_buf_arr[index];
|