mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
Merge branch 'ibmvnic-Fixes-for-device-reset-handling'
Thomas Falcon says: ==================== ibmvnic: Fixes for device reset handling This series contains three unrelated fixes to issues seen during device resets. The first patch fixes an error when the driver requests to deactivate the link of an uninitialized device, resulting in a failure to reset. Next, a patch to fix multicast transmission failures seen after a driver reset. The final patch fixes mishandling of memory allocation failures during device initialization, which caused a kernel oops. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
7f0b44a42e
@ -428,9 +428,10 @@ static int reset_rx_pools(struct ibmvnic_adapter *adapter)
|
|||||||
if (rx_pool->buff_size != be64_to_cpu(size_array[i])) {
|
if (rx_pool->buff_size != be64_to_cpu(size_array[i])) {
|
||||||
free_long_term_buff(adapter, &rx_pool->long_term_buff);
|
free_long_term_buff(adapter, &rx_pool->long_term_buff);
|
||||||
rx_pool->buff_size = be64_to_cpu(size_array[i]);
|
rx_pool->buff_size = be64_to_cpu(size_array[i]);
|
||||||
alloc_long_term_buff(adapter, &rx_pool->long_term_buff,
|
rc = alloc_long_term_buff(adapter,
|
||||||
rx_pool->size *
|
&rx_pool->long_term_buff,
|
||||||
rx_pool->buff_size);
|
rx_pool->size *
|
||||||
|
rx_pool->buff_size);
|
||||||
} else {
|
} else {
|
||||||
rc = reset_long_term_buff(adapter,
|
rc = reset_long_term_buff(adapter,
|
||||||
&rx_pool->long_term_buff);
|
&rx_pool->long_term_buff);
|
||||||
@ -696,9 +697,9 @@ static int init_tx_pools(struct net_device *netdev)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_one_tx_pool(netdev, &adapter->tso_pool[i],
|
rc = init_one_tx_pool(netdev, &adapter->tso_pool[i],
|
||||||
IBMVNIC_TSO_BUFS,
|
IBMVNIC_TSO_BUFS,
|
||||||
IBMVNIC_TSO_BUF_SZ);
|
IBMVNIC_TSO_BUF_SZ);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
release_tx_pools(adapter);
|
release_tx_pools(adapter);
|
||||||
return rc;
|
return rc;
|
||||||
@ -1745,7 +1746,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
|||||||
|
|
||||||
ibmvnic_cleanup(netdev);
|
ibmvnic_cleanup(netdev);
|
||||||
|
|
||||||
if (adapter->reset_reason != VNIC_RESET_MOBILITY &&
|
if (reset_state == VNIC_OPEN &&
|
||||||
|
adapter->reset_reason != VNIC_RESET_MOBILITY &&
|
||||||
adapter->reset_reason != VNIC_RESET_FAILOVER) {
|
adapter->reset_reason != VNIC_RESET_FAILOVER) {
|
||||||
rc = __ibmvnic_close(netdev);
|
rc = __ibmvnic_close(netdev);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -1844,6 +1846,9 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* refresh device's multicast list */
|
||||||
|
ibmvnic_set_multi(netdev);
|
||||||
|
|
||||||
/* kick napi */
|
/* kick napi */
|
||||||
for (i = 0; i < adapter->req_rx_queues; i++)
|
for (i = 0; i < adapter->req_rx_queues; i++)
|
||||||
napi_schedule(&adapter->napi[i]);
|
napi_schedule(&adapter->napi[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user