]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit65d6470d139a6c1655fccb5cbacbeaba8e8ad2f8
treef7fbbb9276091ab9632362d183c0cfb4ec24a294
parent2ca220f92878470c6ba03f9946e412323093cc94
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: 0d973388185d4 ("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