linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Martin Schiller <ms@dev.tdt.de>
Cc: sergei.shtylyov@cogentembedded.com, f.fainelli@gmail.com,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs
Date: Thu, 15 Nov 2018 21:12:33 +0100	[thread overview]
Message-ID: <20181115201233.GE32274@lunn.ch> (raw)
In-Reply-To: <20181115052428.8133-1-ms@dev.tdt.de>

On Thu, Nov 15, 2018 at 06:24:28AM +0100, Martin Schiller wrote:
> Up until commit 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod
> functions where possible"), the _cansleep variants of the gpio_ API was
> used. After that commit and the change to gpiod_ API, the _cansleep()
> was dropped. This then results in WARN_ON() when used with GPIO
> devices which do sleep. Add back the _cansleep() to avoid this.
> 
> Fixes: 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod functions where possible")
> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> ---
> v5:
>  - reworked commit message
>  - added "Fixes:" tag
>  - based on DaveM net tree instead of mainline

Hi Martin

Thanks for these changes. We are much closer now.

> @@ -162,6 +162,10 @@ static int mdio_gpio_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> +	if (gpiod_cansleep(bitbang->mdc) || gpiod_cansleep(bitbang->mdio) ||
> +	    gpiod_cansleep(bitbang->mdo))
> +		dev_warn(&pdev->dev, "Slow GPIO pins might wreak havoc into MDIO bus timing");
> +

I talked with Florian about this. We would like this hunk of the patch
dropped

1) For a patch which is going to stable, it does not fit. It does not
actually fix anything.

2) I'm not sure it has any value. The hardware has been designed like
that. There is nothing which can be done about it. Printing a message
is not going to help users.

   Andrew

  reply	other threads:[~2018-11-15 20:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14  6:17 [PATCH] net: phy: mdio-gpio: fix access that may sleep Martin Schiller
2018-11-14  6:37 ` [PATCH v2] " Martin Schiller
2018-11-14  7:05   ` Andrew Lunn
2018-11-14  7:43     ` Martin Schiller
2018-11-14 20:46       ` Andrew Lunn
2018-11-14  9:20   ` Sergei Shtylyov
2018-11-17  3:52   ` David Miller
2018-11-14 10:12 ` [PATCH v3] net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs Martin Schiller
2018-11-14 11:03   ` Sergei Shtylyov
2018-11-14 11:54 ` [PATCH v4] " Martin Schiller
2018-11-17  4:25   ` David Miller
2018-11-17  6:28     ` Andrew Lunn
2018-11-15  5:24 ` [PATCH v5] " Martin Schiller
2018-11-15 20:12   ` Andrew Lunn [this message]
2018-11-17  7:04   ` David Miller
2018-11-16  7:38 ` [PATCH v6] " Martin Schiller
2018-11-16  7:53   ` Andrew Lunn
2018-11-17 19:52   ` Florian Fainelli
2018-11-18  5:12   ` David Miller

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=20181115201233.GE32274@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ms@dev.tdt.de \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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).