Re: [PATCH 09/19] usbnet: smsc95xx: Connect to phydev

From: Marek Vasut <marex@denx.de>
Date: 2019-01-04 02:18:14
Also in: linux-usb

On 1/3/19 2:22 PM, Andrew Lunn wrote:
On Thu, Jan 03, 2019 at 02:10:30AM +0100, Marek Vasut wrote:
quoted
Add code to detect and connect to PHY. The internal PHY of the SMSC95xx
is a regular SMSC LAN8700 and the driver only supports the internal PHY,
so just use the SMSC PHY driver to configure the PHY. Note that the
driver does a lot of extra configuration of the PHY, which is left in
to avoid breakage. Some of the extra configuration is sorted out by
later patches in this series.
Hi Marek

A MAC driver is not expected to touch the PHY at all.
Well, sure, that's not how the SMSC95xx driver is implemented. This
series tries to make that a bit better.
Please try to
remove as much of the extra configuration as possible, adding it to
the LAN8700 PHY driver as needed.
Sure, that's the plan.
You also have to be careful of locking. phylib takes the phydev lock
when calling into the PHY driver. Anything the MAC does to the PHY is
not going to be done with this lock held. So bad things can happen.
I think I can add a patch which grabs the lock in the MDIO accessors
used by the SMSC95xx driver, at least temporarily, until it is fully
migrated to phydev ? Or is there a better option ?

-- 
Best regards,
Marek Vasut
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help