]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Ensure that SCRQ entry reads are correctly ordered
authorThomas Falcon <tlfalcon@linux.ibm.com>
Tue, 1 Dec 2020 15:52:10 +0000 (09:52 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Dec 2020 18:09:04 +0000 (10:09 -0800)
commit6c85c659c422816aeccbcd9a7a54fd0f26a515c9
treefa2ca8f1ae8fc7d8b776f10a5a7e49b877c2487e
parent739f9dce7b4037f245500783efc9521a65e4cd39
ibmvnic: Ensure that SCRQ entry reads are correctly ordered

Ensure that received Subordinate Command-Response Queue (SCRQ)
entries are properly read in order by the driver. These queues
are used in the ibmvnic device to process RX buffer and TX completion
descriptors. dma_rmb barriers have been added after checking for a
pending descriptor to ensure the correct descriptor entry is checked
and after reading the SCRQ descriptor to ensure the entire
descriptor is read before processing.

Fixes: 70ece86a541c ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c