From: Heiner Kallweit <hkallweit1@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 4/4] net: phy: change phy_start_interrupts to phy_request_interrupt
Date: Sun, 20 Jan 2019 09:34:36 +0100 [thread overview]
Message-ID: <fc02a7ff-a523-7151-7eba-e72f607154fd@gmail.com> (raw)
In-Reply-To: <6147E439-53D4-4F0C-98D7-77B69E49C3D7@gmail.com>
On 20.01.2019 00:43, Florian Fainelli wrote:
>
>
> On January 19, 2019 3:30:05 AM PST, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>> Now that we enable the interrupts in phy_start() we don't have to do it
>> before. Therefore remove enabling interrupts from
>> phy_start_interrupts()
>> and rename this function to reflect the changed functionality.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>
>> + * phy_request_interrupt - request interrupt for a PHY device
>> * @phydev: target phy_device struct
>> *
>> * Description: Request the interrupt for the given PHY.
>> * If this fails, then we set irq to PHY_POLL.
>> - * Otherwise, we enable the interrupts in the PHY.
>> * This should only be called with a valid IRQ number.
>> - * Returns 0 on success or < 0 on error.
>> */
>> -int phy_start_interrupts(struct phy_device *phydev)
>> +void phy_request_interrupt(struct phy_device *phydev)
>> {
>> if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
>> IRQF_ONESHOT | IRQF_SHARED,
>> phydev_name(phydev), phydev) < 0) {
>> phydev_warn(phydev, "Can't get IRQ %d\n", phydev->irq);
>> phydev->irq = PHY_POLL;
>> - return 0;
>> }
>
> We should propagate the return code here and/or indicate we are falling back to polling since may not be desired. An use case that should be considered is probe deferral for instance.
>
I kept the current behavior to basically ignore the error and just
warn and fall back to polling. Seems that phylib has behaved this way
forever. If we come to the conclusion that changing this behavior
makes sense, shouldn't we do it separately? Also we may break systems
relying on the fallback to polling.
But something we can easily agree on is to extend the warning
to state that we fall back to polling.
next prev parent reply other threads:[~2019-01-20 8:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 11:27 [PATCH net-next 0/4] net: phy: improve starting PHY Heiner Kallweit
2019-01-19 11:28 ` [PATCH net-next 1/4] net: phy: start state machine in phy_start only Heiner Kallweit
2019-01-19 11:28 ` [PATCH net-next 2/4] net: phy: warn if phy_start is called from invalid state Heiner Kallweit
2019-01-19 11:29 ` [PATCH net-next 3/4] net: phy: enable interrupts in phy_start Heiner Kallweit
2019-01-19 11:30 ` [PATCH net-next 4/4] net: phy: change phy_start_interrupts to phy_request_interrupt Heiner Kallweit
2019-01-19 23:43 ` Florian Fainelli
2019-01-20 8:34 ` Heiner Kallweit [this message]
2019-01-19 23:44 ` [PATCH net-next 0/4] net: phy: improve starting PHY Florian Fainelli
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=fc02a7ff-a523-7151-7eba-e72f607154fd@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/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.