netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: netdev@vger.kernel.org, Enric Balletbo i Serra <eballetbo@iseebcn.com>
Subject: Re: [BUG] SIOCSIFFLAGS returns -EIO on SMSC LAN911x
Date: Fri, 30 Dec 2011 14:15:48 +0100	[thread overview]
Message-ID: <1325250948.13595.100.camel@deadeye> (raw)
In-Reply-To: <CAAwP0s0Y329AAXpHW9muOECt5DpgpDm6kefXR7uE1233A1LGWg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

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

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2011-12-30 13:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30  9:44 [BUG] SIOCSIFFLAGS returns -EIO on SMSC LAN911x Javier Martinez Canillas
2011-12-30 10:56 ` Ben Hutchings
2011-12-30 12:04   ` Javier Martinez Canillas
2011-12-30 12:58   ` Javier Martinez Canillas
2011-12-30 13:15     ` Ben Hutchings [this message]
2012-01-02 18:37       ` Javier Martinez Canillas
2012-01-02 19:45         ` Ben Hutchings
2012-01-03  7:44           ` Javier Martinez Canillas

Reply instructions:

You may reply publicly 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1325250948.13595.100.camel@deadeye \
    --to=ben@decadent.org.uk \
    --cc=eballetbo@iseebcn.com \
    --cc=martinez.javier@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).