All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Salvator-X ravb failure with v4.5-rc3 due to irqchip power down
Date: Mon, 8 Feb 2016 19:31:36 +0100	[thread overview]
Message-ID: <CAMuHMdUHiBfYDrA_=wq3DwyN1dOb-af_cuhCNaWZjvHSmMfg2Q@mail.gmail.com> (raw)

On r8a7795/salvator-x, ravb Ethernet fails on v4.5-rc3 with:

    ravb e6800000.ethernet eth0: limited PHY to 100Mbit/s
    Micrel KSZ9031 Gigabit PHY e6800000.etherne:00: attached PHY
driver [Micrel KSZ9031 Gigabit PHY]
(mii_bus:phy_addr=e6800000.etherne:00, irq=202)
    ata1: link resume succeeded after 1 retries
    ata1: SATA link down (SStatus 0 SControl 300)
    Waiting up to 110 more seconds for network.
    Waiting up to 100 more seconds for network.
    ...

On success, it would continue with:

    ravb e6800000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    Sending DHCP requests ., OK
    IP-Config: Got DHCP answer from [ ... ]

This problem started when commit d5c3d84657db57bd ("net: phy: Avoid
polling PHY with PHY_IGNORE_INTERRUPTS") was merged into mainline.
Reverting it fixes the
problem, or rather the symptom.

The real problem is that the PHY interrupt is wired to an on-chip GPIO
controller, which is disabled by PM Runtime if no GPIOs are in use, and
interrupts are not taken into account (the irqchip subsystem is not (yet) PM
Runtime aware) for GPIO use.

Adding a call to

    pm_runtime_get_sync(dev);

to gpio_rcar_probe() fixes the problem, but keeps the GPIO modules enabled
all the time.

IIRC, we have a similar issue with HDMI on r8a7791/koelsch...

Gr{oetje,eeting}s,

                        Geert

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Salvator-X ravb failure with v4.5-rc3 due to irqchip power down
Date: Mon, 8 Feb 2016 19:31:36 +0100	[thread overview]
Message-ID: <CAMuHMdUHiBfYDrA_=wq3DwyN1dOb-af_cuhCNaWZjvHSmMfg2Q@mail.gmail.com> (raw)

On r8a7795/salvator-x, ravb Ethernet fails on v4.5-rc3 with:

    ravb e6800000.ethernet eth0: limited PHY to 100Mbit/s
    Micrel KSZ9031 Gigabit PHY e6800000.etherne:00: attached PHY
driver [Micrel KSZ9031 Gigabit PHY]
(mii_bus:phy_addr=e6800000.etherne:00, irq=202)
    ata1: link resume succeeded after 1 retries
    ata1: SATA link down (SStatus 0 SControl 300)
    Waiting up to 110 more seconds for network.
    Waiting up to 100 more seconds for network.
    ...

On success, it would continue with:

    ravb e6800000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    Sending DHCP requests ., OK
    IP-Config: Got DHCP answer from [ ... ]

This problem started when commit d5c3d84657db57bd ("net: phy: Avoid
polling PHY with PHY_IGNORE_INTERRUPTS") was merged into mainline.
Reverting it fixes the
problem, or rather the symptom.

The real problem is that the PHY interrupt is wired to an on-chip GPIO
controller, which is disabled by PM Runtime if no GPIOs are in use, and
interrupts are not taken into account (the irqchip subsystem is not (yet) PM
Runtime aware) for GPIO use.

Adding a call to

    pm_runtime_get_sync(dev);

to gpio_rcar_probe() fixes the problem, but keeps the GPIO modules enabled
all the time.

IIRC, we have a similar issue with HDMI on r8a7791/koelsch...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

             reply	other threads:[~2016-02-08 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 18:31 Geert Uytterhoeven [this message]
2016-02-08 18:31 ` Salvator-X ravb failure with v4.5-rc3 due to irqchip power down Geert Uytterhoeven
2016-02-08 20:04 ` Wolfram Sang

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='CAMuHMdUHiBfYDrA_=wq3DwyN1dOb-af_cuhCNaWZjvHSmMfg2Q@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.