All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: hkallweit1@gmail.com
Cc: f.fainelli@gmail.com, andrew@lunn.ch, netdev@vger.kernel.org,
	richardcochran@gmail.com, linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com, khilman@baylibre.com,
	carlo@caione.org, linux-amlogic@lists.infradead.org,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next v3 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt
Date: Mon, 12 Nov 2018 21:32:54 +0100	[thread overview]
Message-ID: <CAFBinCCmNYGp8kzy45ojjr27tEaPVs-QwMsLRrfXHCvw_taDOw@mail.gmail.com> (raw)
In-Reply-To: <c067d321-c69e-706d-304a-04e1e477b47c@gmail.com>

Hi Heiner,

On Fri, Nov 9, 2018 at 9:56 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 09.11.2018 21:33, Florian Fainelli wrote:
> > On 11/9/18 12:22 PM, Heiner Kallweit wrote:
> >> On 09.11.2018 21:13, Andrew Lunn wrote:
> >>> Hi Heiner
> >>>
> >>>> +static bool phy_drv_supports_irq(struct phy_driver *phydrv)
> >>>> +{
> >>>> +  return phydrv->config_intr || phydrv->ack_interrupt;
> >>>> +}
> >>>
> >>> Should this be && not || ? I thought both needed to be provided for
> >>> interrupts to work.
> >>>
> >>>        Andrew
> >>>
> >> I've seen at least one driver which configures interrupts in
> >> config_init and doesn't define a config_intr callback
> >> (ack_interrupt callback is there)
> >
> > That driver should probably be fixed, while it most likely does not make
> > any significant difference during probe/connect, since config_init() and
> > config_intr() are virtually happening at the same time, this is not
> > necessarily true when disconnecting from the PHY where we really want
> > config_intr() to effectively disable the interrupts and not leaving
> > something enabled that would now become unmaskable, because no more
> > driver attached.
> >
> Found the driver: It's the IP101A/G in icplus.c
> It should be easy to fix the behavior and move the interrupt config
> to a config_intr callback. But the last real changes to the driver
> have been done 6 years ago, so I'm not sure there's anybody out
> there who can test.
if you want I can take care of the IP101A/G code.
I have at least one board with an IP101A/G (PHY ID: 0x02430c54,
according to the schematics it's an IP101GR-GP) where the interrupt is
routed to the SoC.

please let me know whether you'd like to work on it or if I should
give it a try.


Regards
Martin

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next v3 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt
Date: Mon, 12 Nov 2018 21:32:54 +0100	[thread overview]
Message-ID: <CAFBinCCmNYGp8kzy45ojjr27tEaPVs-QwMsLRrfXHCvw_taDOw@mail.gmail.com> (raw)
In-Reply-To: <c067d321-c69e-706d-304a-04e1e477b47c@gmail.com>

Hi Heiner,

On Fri, Nov 9, 2018 at 9:56 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 09.11.2018 21:33, Florian Fainelli wrote:
> > On 11/9/18 12:22 PM, Heiner Kallweit wrote:
> >> On 09.11.2018 21:13, Andrew Lunn wrote:
> >>> Hi Heiner
> >>>
> >>>> +static bool phy_drv_supports_irq(struct phy_driver *phydrv)
> >>>> +{
> >>>> +  return phydrv->config_intr || phydrv->ack_interrupt;
> >>>> +}
> >>>
> >>> Should this be && not || ? I thought both needed to be provided for
> >>> interrupts to work.
> >>>
> >>>        Andrew
> >>>
> >> I've seen at least one driver which configures interrupts in
> >> config_init and doesn't define a config_intr callback
> >> (ack_interrupt callback is there)
> >
> > That driver should probably be fixed, while it most likely does not make
> > any significant difference during probe/connect, since config_init() and
> > config_intr() are virtually happening at the same time, this is not
> > necessarily true when disconnecting from the PHY where we really want
> > config_intr() to effectively disable the interrupts and not leaving
> > something enabled that would now become unmaskable, because no more
> > driver attached.
> >
> Found the driver: It's the IP101A/G in icplus.c
> It should be easy to fix the behavior and move the interrupt config
> to a config_intr callback. But the last real changes to the driver
> have been done 6 years ago, so I'm not sure there's anybody out
> there who can test.
if you want I can take care of the IP101A/G code.
I have at least one board with an IP101A/G (PHY ID: 0x02430c54,
according to the schematics it's an IP101GR-GP) where the interrupt is
routed to the SoC.

please let me know whether you'd like to work on it or if I should
give it a try.


Regards
Martin

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH net-next v3 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt
Date: Mon, 12 Nov 2018 21:32:54 +0100	[thread overview]
Message-ID: <CAFBinCCmNYGp8kzy45ojjr27tEaPVs-QwMsLRrfXHCvw_taDOw@mail.gmail.com> (raw)
In-Reply-To: <c067d321-c69e-706d-304a-04e1e477b47c@gmail.com>

Hi Heiner,

On Fri, Nov 9, 2018 at 9:56 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 09.11.2018 21:33, Florian Fainelli wrote:
> > On 11/9/18 12:22 PM, Heiner Kallweit wrote:
> >> On 09.11.2018 21:13, Andrew Lunn wrote:
> >>> Hi Heiner
> >>>
> >>>> +static bool phy_drv_supports_irq(struct phy_driver *phydrv)
> >>>> +{
> >>>> +  return phydrv->config_intr || phydrv->ack_interrupt;
> >>>> +}
> >>>
> >>> Should this be && not || ? I thought both needed to be provided for
> >>> interrupts to work.
> >>>
> >>>        Andrew
> >>>
> >> I've seen at least one driver which configures interrupts in
> >> config_init and doesn't define a config_intr callback
> >> (ack_interrupt callback is there)
> >
> > That driver should probably be fixed, while it most likely does not make
> > any significant difference during probe/connect, since config_init() and
> > config_intr() are virtually happening at the same time, this is not
> > necessarily true when disconnecting from the PHY where we really want
> > config_intr() to effectively disable the interrupts and not leaving
> > something enabled that would now become unmaskable, because no more
> > driver attached.
> >
> Found the driver: It's the IP101A/G in icplus.c
> It should be easy to fix the behavior and move the interrupt config
> to a config_intr callback. But the last real changes to the driver
> have been done 6 years ago, so I'm not sure there's anybody out
> there who can test.
if you want I can take care of the IP101A/G code.
I have at least one board with an IP101A/G (PHY ID: 0x02430c54,
according to the schematics it's an IP101GR-GP) where the interrupt is
routed to the SoC.

please let me know whether you'd like to work on it or if I should
give it a try.


Regards
Martin

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

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 17:15 [PATCH net-next v3 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt Heiner Kallweit
2018-11-09 17:15 ` Heiner Kallweit
2018-11-09 17:15 ` Heiner Kallweit
2018-11-09 17:15 ` Heiner Kallweit
2018-11-09 17:16 ` [PATCH net-next v3 1/2] " Heiner Kallweit
2018-11-09 17:16   ` Heiner Kallweit
2018-11-09 17:16   ` Heiner Kallweit
2018-11-09 17:16   ` Heiner Kallweit
2018-11-09 20:13   ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-09 20:22     ` Heiner Kallweit
2018-11-09 20:22       ` Heiner Kallweit
2018-11-09 20:22       ` Heiner Kallweit
2018-11-09 20:22       ` Heiner Kallweit
2018-11-09 20:33       ` Florian Fainelli
2018-11-09 20:33         ` Florian Fainelli
2018-11-09 20:33         ` Florian Fainelli
2018-11-09 20:33         ` Florian Fainelli
2018-11-09 20:56         ` Heiner Kallweit
2018-11-09 20:56           ` Heiner Kallweit
2018-11-09 20:56           ` Heiner Kallweit
2018-11-09 20:56           ` Heiner Kallweit
2018-11-12 20:32           ` Martin Blumenstingl [this message]
2018-11-12 20:32             ` Martin Blumenstingl
2018-11-12 20:32             ` Martin Blumenstingl
2018-11-12 20:38             ` Heiner Kallweit
2018-11-12 20:38               ` Heiner Kallweit
2018-11-12 20:38               ` Heiner Kallweit
2018-11-12 21:53               ` Martin Blumenstingl
2018-11-12 21:53                 ` Martin Blumenstingl
2018-11-12 21:53                 ` Martin Blumenstingl
2018-11-09 20:38       ` Andrew Lunn
2018-11-09 20:38         ` Andrew Lunn
2018-11-09 20:38         ` Andrew Lunn
2018-11-09 20:38         ` Andrew Lunn
2018-11-09 17:17 ` [PATCH net-next v3 2/2] net: phy: remove flag PHY_HAS_INTERRUPT from driver configs Heiner Kallweit
2018-11-09 17:17   ` Heiner Kallweit
2018-11-09 17:17   ` Heiner Kallweit
2018-11-09 17:17   ` Heiner Kallweit
2018-11-09 20:13   ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-09 20:13     ` Andrew Lunn
2018-11-11 17:38 ` [PATCH net-next v3 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt David Miller
2018-11-11 17:38   ` David Miller
2018-11-11 17:38   ` 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=CAFBinCCmNYGp8kzy45ojjr27tEaPVs-QwMsLRrfXHCvw_taDOw@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=carlo@caione.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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 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.