[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAwP0s1KV0gCWXB4-sNDjyVKETGrp9xO8VmAnbJHHCupf4P5pg@mail.gmail.com>
Date: Mon, 2 Jan 2012 19:37:03 +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 2:15 PM, Ben Hutchings <ben@...adent.org.uk> wrote:
> On Fri, 2011-12-30 at 13:58 +0100, Javier Martinez Canillas wrote:
>> 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:
> [...]
>> >> 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. dwein
>>
>> Since the PHY chip is a lan8700, the power-saving seems to be correct.
>
> But the feature may not be supported in the combined chip, the 9221i. I
> would tend to believe the more specific data sheet.
>
>> But the problem is when latter in the open handler a software reset is
>> attempt.
>>
>> Probably I can protect the software reset and only try to reset the
>> device if the PHY is now in a low power mode. But if we don't reset
>> the device at interface bringing up, when should we do a the reset?
>
> You may have to change the order of initialisation of the PHY and MAC so
> that reset works properly.
>
>> I'm not that familiarized with the networking layer, if someone can
>> give me some light I can fix the issue and send a patch.
>
> This really doesn't have much to do with general networking, only phylib
> and the specifics of the SMSC hardware and drivers. The smsc911x driver
> is responsible for calling phylib functions and so the hardware
> initialisation is very much under its control.
>
> Ben.
Hello Ben,
Thanks for your help.
Finally, what I did was to bring to operational mode the integrated
PHY chip by disabling the energy detect power-down mode before doing a
software reset and re-enabling after it.
Does that solution make sense to you? I've sent the patch-set to the
list for review. The patch-set is composed of the following patches:
Javier Martinez Canillas (2):
net: phy: smsc: Move SMSC PHY constants to <linux/smscphy.h>
net/smsc911x: Check if PHY is in operational mode before software reset
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