Re: [BUG] SIOCSIFFLAGS returns -EIO on SMSC LAN911x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Fri, 2011-12-30 at 10:44 +0100, Javier Martinez Canillas wrote:
> Hello,
> 
> We have an issue with the SMSC LAN911x driver with today linux-2.6 [1]
> executing on an IGEPv2 [2] board using omap2plus_defconfig.
> 
> When I try to bring up the network interface, the ioctl set interface
> flags command (SIOCSIFFLAGS)  fails returning -EIO:
[...]
> By doing a git bisect we found that this strange behavior exists when
> the Kconfig tristate compilation condition SMSC_PHY has the value yes
> to be compiled built-in:
> 
> SMSC_PHY=y
> 
> If this config symbol has the value module (m) or not build at all,
> then bringing up the network interface never fails.

So the PHY driver is doing something that interferes with soft reset.

The data sheet for this part
<http://www.smsc.com/media/Downloads_Public/Data_Sheets/9221.pdf> says
that soft reset does not work if the PHY is in certain states.  Also, it
doesn't seem to specify a maximum time for soft reset to complete,
though it does say that PHY reset takes 100 us.

> Did anyone have the same problem?
> 
> The problem is really strange to me, especially since we are sure that
> all the requirements to software reset the device are meet in both
> cases (with SMSC_PHY compiled built-in and without it)

I don't know about that.  smsc_phy_config_init() attempts to enable
power-saving on the PHY, but it is writing to a bit that is reserved
according to the data sheet for the combined MAC/PHY chip.  You might
want to try reverting:

commit 698244ace8b63896565022143ab19f141bc48993
Author: Giuseppe Cavallaro <peppe.cavallaro@xxxxxx>
Date:   Wed Jan 6 20:35:14 2010 -0800

    phy: SMSC device Energy Detect power-down mode

Ben.

> [1]: HEAD on commit 371de6e4e0042adf4f9b54c414154f57414ddd37 drm/i915:
> Disable RC6 on Sandybridge by default
> [2]: https://wiki.linaro.org/Boards/Igep
> 
> Thank you and best regards,
> 

-- 
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein

Attachment: signature.asc
Description: This is a digitally signed message part


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux