lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAwP0s0SdsPhLL1LzcAzDEnJou_FWQeaGg=h9Du6Sxw99JRwRQ@mail.gmail.com>
Date:	Fri, 30 Dec 2011 13:04:31 +0100
From:	Javier Martinez Canillas <martinez.javier@...il.com>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	netdev@...r.kernel.org,
	Enric Balletbo i Serra <eballetbo@...ebcn.com>
Subject: Re: [BUG] SIOCSIFFLAGS returns -EIO on SMSC LAN911x

On Fri, Dec 30, 2011 at 11:56 AM, Ben Hutchings <ben@...adent.org.uk> wrote:
> 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.
>

Hello Ben, thanks for answering.

> 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.
>

Yes, it seems that the PHY driver is the responsible of that.

Something I forgot to mention, the ethernet chip we are using is a
SMSC LAN 9221i.

>> 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@...com>
> Date:   Wed Jan 6 20:35:14 2010 -0800
>
>    phy: SMSC device Energy Detect power-down mode
>
> Ben.

Thanks a lot, reverting that patch solves the issue.

I've looked at that patch before but since we are using the smsc911x
and that patch made an exception for the lan911x phy_driver I thought
it wasn't the responsible for this:

+static int lan911x_config_init(struct phy_device *phydev)
+{
+       return smsc_phy_ack_interrupt(phydev);
+}

@@ -147,7 +164,7 @@ static struct phy_driver lan911x_int_driver = {
        /* basic functions */
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
-       .config_init    = smsc_phy_config_init,
+       .config_init    = lan911x_config_init,

But now I realized that the lan911x phy driver is not being used but
the lan8700_driver phy_driver, and the modified smsc_phy_config_init
was executed.

thanks a lot and best regards,

-- 
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ