forked from Minki/linux
Merge branch 'qlcnic'
Rajesh Borundia says: ==================== qlcnic: bug fixes The patch series contains following bug fixes o Bound checks for number of receive descriptors and number of recieve rings. Both of these have off-by-one errors. o Vlan list was getting re-initialized in case of adapter reset. o Tx queue was timing out because of missing start queue for a corresponding netif_tx_disable. o Loopback test failed because driver was not setting linkup variable while handling link events. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
77c14e512f
@ -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];
|
||||
|
@ -1837,6 +1837,7 @@ int __qlcnic_up(struct qlcnic_adapter *adapter, struct net_device *netdev)
|
||||
qlcnic_linkevent_request(adapter, 1);
|
||||
|
||||
adapter->ahw->reset_context = 0;
|
||||
netif_tx_start_all_queues(netdev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2704,14 +2705,8 @@ static int qlcnic_open(struct net_device *netdev)
|
||||
|
||||
err = __qlcnic_up(adapter, netdev);
|
||||
if (err)
|
||||
goto err_out;
|
||||
qlcnic_detach(adapter);
|
||||
|
||||
netif_tx_start_all_queues(netdev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
qlcnic_detach(adapter);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -448,8 +448,7 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter,
|
||||
struct qlcnic_info *info)
|
||||
static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
struct qlcnic_sriov *sriov = adapter->ahw->sriov;
|
||||
struct qlcnic_cmd_args cmd;
|
||||
@ -495,10 +494,6 @@ static int qlcnic_sriov_vf_init_driver(struct qlcnic_adapter *adapter)
|
||||
if (err)
|
||||
return -EIO;
|
||||
|
||||
err = qlcnic_sriov_get_vf_acl(adapter, &nic_info);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (qlcnic_83xx_get_port_info(adapter))
|
||||
return -EIO;
|
||||
|
||||
@ -555,6 +550,10 @@ static int qlcnic_sriov_setup_vf(struct qlcnic_adapter *adapter,
|
||||
if (err)
|
||||
goto err_out_send_channel_term;
|
||||
|
||||
err = qlcnic_sriov_get_vf_acl(adapter);
|
||||
if (err)
|
||||
goto err_out_send_channel_term;
|
||||
|
||||
err = qlcnic_setup_netdev(adapter, adapter->netdev, pci_using_dac);
|
||||
if (err)
|
||||
goto err_out_send_channel_term;
|
||||
|
Loading…
Reference in New Issue
Block a user