mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
Merge branch 'ibmvnic-napi-fixes'
Lijun Pan says: ==================== ibmvnic: correctly call NAPI APIs This series correct some misuse of NAPI APIs in the driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
49963eed2c
1 changed files with 2 additions and 12 deletions
|
@ -1149,19 +1149,13 @@ static int __ibmvnic_open(struct net_device *netdev)
|
||||||
|
|
||||||
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);
|
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
for (i = 0; i < adapter->req_rx_queues; i++)
|
ibmvnic_napi_disable(adapter);
|
||||||
napi_disable(&adapter->napi[i]);
|
|
||||||
release_resources(adapter);
|
release_resources(adapter);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
netif_tx_start_all_queues(netdev);
|
netif_tx_start_all_queues(netdev);
|
||||||
|
|
||||||
if (prev_state == VNIC_CLOSED) {
|
|
||||||
for (i = 0; i < adapter->req_rx_queues; i++)
|
|
||||||
napi_schedule(&adapter->napi[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
adapter->state = VNIC_OPEN;
|
adapter->state = VNIC_OPEN;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1922,7 +1916,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||||
u64 old_num_rx_queues, old_num_tx_queues;
|
u64 old_num_rx_queues, old_num_tx_queues;
|
||||||
u64 old_num_rx_slots, old_num_tx_slots;
|
u64 old_num_rx_slots, old_num_tx_slots;
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
int i, rc;
|
int rc;
|
||||||
|
|
||||||
netdev_dbg(adapter->netdev,
|
netdev_dbg(adapter->netdev,
|
||||||
"[S:%d FOP:%d] Reset reason %d, reset_state %d\n",
|
"[S:%d FOP:%d] Reset reason %d, reset_state %d\n",
|
||||||
|
@ -2111,10 +2105,6 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||||
/* refresh device's multicast list */
|
/* refresh device's multicast list */
|
||||||
ibmvnic_set_multi(netdev);
|
ibmvnic_set_multi(netdev);
|
||||||
|
|
||||||
/* kick napi */
|
|
||||||
for (i = 0; i < adapter->req_rx_queues; i++)
|
|
||||||
napi_schedule(&adapter->napi[i]);
|
|
||||||
|
|
||||||
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
|
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
|
||||||
adapter->reset_reason == VNIC_RESET_MOBILITY)
|
adapter->reset_reason == VNIC_RESET_MOBILITY)
|
||||||
__netdev_notify_peers(netdev);
|
__netdev_notify_peers(netdev);
|
||||||
|
|
Loading…
Reference in a new issue