[vortex] 3c905CX things

Andrew Morton andrewm@uow.edu.au
Fri, 05 Jan 2001 19:32:28 +1100


Bogdan Costescu wrote:
> 
> On Mon, 1 Jan 2001, Andrew Morton wrote:
> 
> > ... however he wouldn't have exercised the other
> > RxReset in vortex_error().
> 
> Why should this be different ?

Well, the chip is in a different state.  It could be that
the RxReset in this state is quick.  Dunno.

> > It _is_ safe to schedule() within vortex_up().  It's not safe
> > to schedule() in vortex_probe() because of the probe/open race.
> > So long-term, a schedule_timeout(1) is a better approach to handling
> > the RxReset timer.
> 
> So you want a timer to take care of this case ?

Basically, yes.  Busywaiting for tens of milliseconds is rude.

> How about vortex_error which is called from ISR ?

We'd have to busywait, or turn the driver inside out.

> 
> > The change to the MII scan order works fine.  In fact, this is
> > what 3com recommend in the 905C document: look at index 24 first.
> 
> Still, the code is checking 24, 1->23, 0, 25-31. I think that 24, 1->31, 0
> is better. Code is in:
> 
> http://www.scyld.com/pipermail/vortex/2000-December/000845.html

3com say to check 24, then 0->31, skipping 24.  So:

            /*
             * For the 3c905CX we look at index 24 first, because it bogusly
             * reports an external PHY at all indices
             */
            if (phy == 0)
                phyx = 24;
            else if (phy <= 24)
                phyx = phy - 1;
            else
                phyx = phy;

> and it should also make obsolete the mdio_read(ioaddr, 24, 1) just before
> the MII scanning.

Why was that ever needed?