Netdev Archive on
 help / color / Atom feed
From: Florian Fainelli <>
To: Heiner Kallweit <>,
	Vladimir Oltean <>,,,
Cc:, Alex Marginean <>
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
Message-ID: <> (raw)
In-Reply-To: <>

On 1/16/20 12:47 PM, Heiner Kallweit wrote:
> On 16.01.2020 18:46, Vladimir Oltean wrote:
>> From: Alex Marginean <>
>> 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.

      reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 17:46 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]

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netdev Archive on

Archives are clonable:
	git clone --mirror netdev/git/0.git
	git clone --mirror netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ \
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone