linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Eugene Surovegin <ebs@ebshome.net>
Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org
Subject: Re: shared config registers and locking
Date: Wed, 06 Dec 2006 16:16:29 +1100	[thread overview]
Message-ID: <1165382189.5469.76.camel@localhost.localdomain> (raw)
In-Reply-To: <1165381847.5469.70.camel@localhost.localdomain>

> On my work in porting emac over to arch/powerpc (and make it work on SMP
> platforms since there's at least one coming, possibly too), I ended up
> with a problem with things like the workarounds for the EMAC loss of RX
> clock (CONFIG_IBM_EMAC_PHY_RX_CLK_FIX) that I think uncovers a more
> generic problem about access global system wide configuration registers
> in a race free way.

BTW, Eugene, in the specific case of this RX clock problem causing the
transmitter to stall...

I've had this problem with sungem in the past and a few other drivers
have to deal with it as well. The general approach seems to be a bit
different, and if you think it can work for EMAC, I'll implement it that
way in the driver I'm working on.

The idea is rather to try to find magic bits to force the chip clocks on
when there is no link, simply ack the fact that when there is no link,
nothing gets transmitted and thus ignore tx timeouts. Doing
netif_carrier_off() (which is the right thing to do when the link is
down anyway) should cause the net stack to ignore them.

Now, some chips (like GEM) have a problem recovering when the link
finally comes back up and thus can have the transmitter stuck. That's
why drivers like this will simply reset the TX side when the link is
back up.

That should be simpler and avoid the need for the workaround, don't you
think ?

Cheers,
Ben.

  reply	other threads:[~2006-12-06  5:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06  5:10 shared config registers and locking Benjamin Herrenschmidt
2006-12-06  5:16 ` Benjamin Herrenschmidt [this message]
2006-12-06  6:06   ` Eugene Surovegin
2006-12-06  6:36     ` Benjamin Herrenschmidt
2006-12-06 21:57 ` Roger Larsson
2006-12-06 22:57   ` Benjamin Herrenschmidt
2006-12-06 23:14     ` Michael Galassi
2006-12-06 23:34       ` Benjamin Herrenschmidt
2006-12-07  1:22         ` Roger Larsson
2006-12-07  2:47           ` Benjamin Herrenschmidt
2006-12-07 18:18             ` Roger Larsson

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=1165382189.5469.76.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=ebs@ebshome.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.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).