From: Florian Fainelli <f.fainelli@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
davem@davemloft.net, linux@armlinux.org.uk, andrew@lunn.ch
Cc: netdev@vger.kernel.org, Alex Marginean <alexandru.marginean@nxp.com>
Subject: Re: [PATCH net-next] net: phy: don't crash in phy_read/_write_mmd without a PHY driver
Date: Thu, 16 Jan 2020 12:51:18 -0800 [thread overview]
Message-ID: <b6abe5b0-a731-fcd5-45b5-3412506572f7@gmail.com> (raw)
In-Reply-To: <45b0aaad-839a-95e6-2785-118dd844efbc@gmail.com>
On 1/16/20 12:47 PM, Heiner Kallweit wrote:
> On 16.01.2020 18:46, Vladimir Oltean wrote:
>> From: Alex Marginean <alexandru.marginean@nxp.com>
>>
>> The APIs can be used by Ethernet drivers without actually loading a PHY
>> driver. This may become more widespread in the future with 802.3z
>> compatible MAC PCS devices being locally driven by the MAC driver when
>> configuring for a PHY mode with in-band negotiation.
>>
>> Check that drv is not NULL before reading from it.
>>
> If there's no dedicated PHY driver, then the genphy driver is bound.
> I think therefore we don't face issues with the current code.
> But the change looks reasonable.
You can unbind the driver from sysfs and observe the problem.
--
Florian
next prev parent reply other threads:[~2020-01-16 20:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 17:46 [PATCH net-next] net: phy: don't crash in phy_read/_write_mmd without a PHY driver Vladimir Oltean
2020-01-16 17:48 ` Vladimir Oltean
2020-01-16 17:52 ` Florian Fainelli
2020-01-16 20:47 ` Heiner Kallweit
2020-01-16 20:51 ` Florian Fainelli [this message]
2020-01-20 9:08 ` 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=b6abe5b0-a731-fcd5-45b5-3412506572f7@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@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 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).