linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stefan.wahren@i2se.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] net: qca_spi: Fix race condition in spi transfers
Date: Tue, 04 Sep 2018 12:16:35 -0700 (PDT)	[thread overview]
Message-ID: <20180904.121635.1652475457526472991.davem@davemloft.net> (raw)
In-Reply-To: <1535978657-2880-1-git-send-email-stefan.wahren@i2se.com>

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.

      reply	other threads:[~2018-09-04 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 12:44 [PATCH V2] net: qca_spi: Fix race condition in spi transfers Stefan Wahren
2018-09-04 19:16 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180904.121635.1652475457526472991.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).