]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: clean pending indirect buffs during reset
authorSukadev Bhattiprolu <sukadev@linux.ibm.com>
Thu, 24 Jun 2021 04:13:12 +0000 (21:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Jun 2021 18:22:23 +0000 (11:22 -0700)
commit8fc9fe5cacedc244d9fec456fed2337d4afc6c7e
treef7fbbb9276091ab9632362d183c0cfb4ec24a294
parentc3637591badc47205f7704762062851e7aba05d0
ibmvnic: clean pending indirect buffs during reset

We batch subordinate command response queue (scrq) descriptors that we
need to send to the VIOS using an "indirect" buffer. If after we queue
one or more scrqs in the indirect buffer encounter an error (say fail
to allocate an skb), we leave the queued scrq descriptors in the
indirect buffer until the next call to ibmvnic_xmit().

On the next call to ibmvnic_xmit(), it is possible that the adapter is
going through a reset and it is possible that the long term  buffers
have been unmapped on the VIOS side. If we proceed to flush (send) the
packets that are in the indirect buffer, we will end up using the old
map ids and this can cause the VIOS to trigger an unnecessary FATAL
error reset.

Instead of flushing packets remaining on the indirect_buff, discard
(clean) them instead.

Fixes: 4a0f14e71dd1e ("ibmvnic: Introduce xmit_more support using batched subCRQ hcalls")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c