Date: Thu, 31 Jul 1997 00:36:12 -0700 (PDT) From: Vinay Bannai <vinay@agni.nuko.com> To: durham@w2xo.pgh.pa.us (Jim Durham) Cc: hackers@FreeBSD.ORG Subject: Re: Generic PCI ethernet card Message-ID: <199707310736.AAA09741@agni.nuko.com> In-Reply-To: <33E001D9.446B9B3D@w2xo.pgh.pa.us> from "Jim Durham" at "Jul 30, 97 11:09:13 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
According to Jim Durham: > I have a "generic" (read "cheap") PCI ethernet > card here that purports to be able to use the > NE2000 driver. > > I notice when I boot the system that the PCI stuff > is all OK, but, apparently, the ID code on the card > is not recognized, and no driver is assigned. The pci_configure()/pci_bus_config() in pci.c program check for the configuration registers. Baed on the bus #, device number and function associated with the device it will look up the device's probe routine from a location in its symbol table. This happens only if the device driver struct for pci is defined for this particular device and registered with DATA_SET macro. Normally if it does not find a probe() routine(because the driver is not registered with the kernel) you should still be able to see the device number, vendor id and the function number displayed (without turning on the verbose during your boot). > > Is this just a matter of adding the ID code to > the driver in if_ed_p.c, where it lists RealTek 8029, > ProLan, and etc...and I guess I have to boot the > system and see what code is returned...or am I off > on the wrong path? Also, how does the system know to > even have if_ed_p.c scan for a code if it doesn't know > what kind of card it is dealing with? Is this handed > down from the bios? Lotsa questions... > > regards, > Jim Durham Also registering the pcidevice struct with the symbol table entry corresponding to the pci devices is required before your device is completely recognised by the OS. This is done by a macro DATA_SET. Check any of the pci drivers and you will find answers to most of your questions... Vinay -- Vinay Bannai E-mail: vinay@agni.nuko.com (408)-526-0280 x 275 (Work) http://agni.nuko.com/~vinay
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707310736.AAA09741>