Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDing the 905c in software?




On 1/23/2000 8:20 PM Robert Thompson robertt@stargate.cs.swau.edu wrote:
>I'm making some changes to the n3c90xutil code. Is there an easy way to
>detect that you're talking to a 905c or a 905b?

It's not probably what you'd call "easy", but there is certainly code 
around that scans the PCI bus and can locate cards.

Here's a URL to Donald Becker's diag page, which has a number of ethernet 
card diag programs. These programs have quite a few functions to deal 
with PCI cards.

  http://cesdis.gsfc.nasa.gov/linux/diag/

If you link his programs with "LIBFLASH" defined, it can also do flash 
eprom operations for cards.  He has a program to deal with 3C905x with 
flash operations.

I believe the pcitools package for Linux is also open-source.  The 
/proc/pci pseudo file makes life much easier, if you're running under 
Linux, of course :-)

>I've merged the B and C versions of the program, but it's kind of
>disgusting to make the user specify on the commandline whether the card is
>a 'b' or a 'c' revision card... Unfortunately, I don't have the technotes
>handy. Any hints?

Have a look at etherboot-4.4.1/src/pci.[ch] for some examples of talking 
to your PCI bus and checking card status.  Since you already have to 
specify the IOADDR for the card, your job is much simplified.  You could, 
if you were feeling industrious scan the PCI bus yourself, checking the 
VENDOR_ID_CODE and the DEVICE_ID_CODE of the devices you find on the bus, 
and compare them with a table of known IDs.  This is basically what 
Etherboot does.  

Check out the "eepro100_probe" routine "in src/eepro100.c".  It has code 
that scans the bus for improperly initialized PCI cards.  Some other 
drivers seem to do similar actions.

It's great you're hacking on this.  Let us know how it goes.

Regards,

Marty

---
   Name: Martin D. Connor
US Mail: Entity Cyber, Inc.; P.O. Box 391827; Cambridge, MA 02139; USA
  Voice: (617) 491-6935, Fax: (617) 491-7046 
  Email: mdc@thinguin.org
    Web: http://www.thinguin.org/


===========================================================================
This Mail was sent to netboot mailing list by:
Marty Connor <mdc@thinguin.org>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.