[538] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: PI card probe clobbers SMC/WD detection...

daemon@ATHENA.MIT.EDU (Paul Gortmaker)
Sun Jun 18 06:23:57 1995

From: Paul Gortmaker <gpg109@rsphy1.anu.edu.au>
To: jmorriso@bogomips.ee.ubc.ca (John Paul Morrison)
Date: Sun, 18 Jun 1995 19:25:17 +1000 (EST)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <m0sN2kT-000TvqC@bogomips.ee.ubc.ca> from "John Paul Morrison" at Jun 17, 95 11:37:37 am

> The PI2 interface card driver does a probe to autodetect the card. But
> if it probes the IO address that an SMC/WD 8xx3 ethernet card is
> living at, then the wd device driver will not detect the ethernet
> card.

The probing in the pi2 driver is truly evil, and breaks Linux's history
of friendly probes. It does no less than *seven* outb's before deciding
that there is no pi2 card there. Probes should *not* write to i/o ports
before verifying the existence of the card that they are probing for,
as this is guaranteed to cause boot lockups and hose other devices (as
you have found).

Thanks to IBM's dain-bramaged design, a wd card (and most cards) at
i/o 0xNNN will appear again at (0xNNN+0x400). So the outb's that
the pi2 code does to ports in the > 0x700 range in hw_probe() stomp all 
over the wd card. (and most likely any other cards in its path...)

> Anyone have some suggestions to make the PI2 driver probe more
> friendly to other ethernet cards, or make the WD driver better at
> detecting cards that got probed by someone else?

Absolutely no changes need to be done to the wd probing scheme at all.
The pi2 probing needs to (at least) do some "safer" inb_p checks on 
some ports that contain pi2 signatures, and bail out if they aren't
found. Somebody with the hardware docos will have to supply these.

In the meantime, if you are using wd and pi2, you can resort to using:
LILO: linux reserve=0x<wd_port>,0x20 ether=0,0x<wd_port>,eth0
which will stop the pi "probe" from beating your wd card senseless.

Hope this helps,
Paul.

home help back first fref pref prev next nref lref last post