lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2] net: qca_spi: Fix race condition in spi transfers
From
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Mon, 3 Sep 2018 14:44:17 +0200

> With performance optimization the spi transfer and messages from basic
> register operations like qcaspi_read_register moved into the private
> driver structure. But they weren't protected against mutual access
> (e.g. between driver kthread and ethtool). So dumping the QCA7000
> register via ethtool during network traffic could make spi_sync
> hang forever, because the completion in spi_message is overwritten.
>
> So revert the optimization completely.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
> drivers/net/ethernet/qualcomm/qca_7k.c | 84 ++++++++++++------------
> drivers/net/ethernet/qualcomm/qca_spi.c | 110 +++++++++++++++++---------------
> drivers/net/ethernet/qualcomm/qca_spi.h | 5 --
> 3 files changed, 97 insertions(+), 102 deletions(-)
>
> Changes in V2:
> - explain race in commit log more in detail

Ok, I want one more change.

Please repost this with an appropriate Fixes: tag added.

Thank you.

\
 
 \ /
  Last update: 2018-09-04 21:17    [W:0.039 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site