diff options
author | Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 2018-04-06 18:37:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-08 12:39:47 -0400 |
commit | 41f714672f93608751dbd2fa2291d476a8ff0150 (patch) | |
tree | 4182868626af0530fe976b4f61e508b5041fbc5f /drivers/net | |
parent | 37e40fa8f62ba33021cb0050e38f87d7519ee447 (diff) | |
download | linux-stable-41f714672f93608751dbd2fa2291d476a8ff0150.tar.gz linux-stable-41f714672f93608751dbd2fa2291d476a8ff0150.tar.bz2 linux-stable-41f714672f93608751dbd2fa2291d476a8ff0150.zip |
ibmvnic: Zero used TX descriptor counter on reset
The counter that tracks used TX descriptors pending completion
needs to be zeroed as part of a device reset. This change fixes
a bug causing transmit queues to be stopped unnecessarily and in
some cases a transmit queue stall and timeout reset. If the counter
is not reset, the remaining descriptors will not be "removed",
effectively reducing queue capacity. If the queue is over half full,
it will cause the queue to stall if stopped.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 58e01432c2aa..153a868c5135 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2361,6 +2361,7 @@ static int reset_one_sub_crq_queue(struct ibmvnic_adapter *adapter, } memset(scrq->msgs, 0, 4 * PAGE_SIZE); + atomic_set(&scrq->used, 0); scrq->cur = 0; rc = h_reg_sub_crq(adapter->vdev->unit_address, scrq->msg_token, |