[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <527f42fa5e6a087101cbc19934611783@linux.vnet.ibm.com>
Date: Thu, 12 Nov 2020 21:45:52 -0800
From: drt <drt@...ux.vnet.ibm.com>
To: Thomas Falcon <tlfalcon@...ux.ibm.com>
Cc: netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
dnbanerg@...ibm.com, brking@...ux.vnet.ibm.com, pradeep@...ibm.com,
sukadev@...ux.vnet.ibm.com, ljp@...ux.vnet.ibm.com,
cforno12@...ux.ibm.com, ricklind@...ux.ibm.com
Subject: Re: [PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads
are ordered
On 2020-11-12 11:09, Thomas Falcon wrote:
> Ensure that received Subordinate Command-Response Queue
> entries are properly read in order by the driver.
>
> Signed-off-by: Thomas Falcon <tlfalcon@...ux.ibm.com>
Acked-by: Dany Madden <drt@...ux.ibm.com>
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index da15913879f8..5647f54bf387 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -2391,6 +2391,8 @@ static int ibmvnic_poll(struct napi_struct
> *napi, int budget)
>
> if (!pending_scrq(adapter, adapter->rx_scrq[scrq_num]))
> break;
> + /* ensure that we do not prematurely exit the polling loop */
> + dma_rmb();
> next = ibmvnic_next_scrq(adapter, adapter->rx_scrq[scrq_num]);
> rx_buff =
> (struct ibmvnic_rx_buff *)be64_to_cpu(next->
> @@ -3087,6 +3089,8 @@ static int ibmvnic_complete_tx(struct
> ibmvnic_adapter *adapter,
> int num_entries = 0;
>
> next = ibmvnic_next_scrq(adapter, scrq);
> + /* ensure that we are reading the correct queue entry */
> + dma_rmb();
> for (i = 0; i < next->tx_comp.num_comps; i++) {
> if (next->tx_comp.rcs[i]) {
> dev_err(dev, "tx error %x\n",
Powered by blists - more mailing lists