Date: Wed, 31 Oct 2001 08:25:39 -0600 (CST) From: mark tinguely <tinguely@web.cs.ndsu.nodak.edu> To: questions@FreeBSD.ORG, suvarna@indranetworks.com Subject: Re: Problem for detecting a PCI device. Message-ID: <200110311425.f9VEPd750942@web.cs.ndsu.nodak.edu> In-Reply-To: <001101c16160$98708470$1100a8c0@indranet>
next in thread | previous in thread | raw e-mail | index | archive | help
I do not know which version of FreeBSD the skeleton code you were using
since FreeBSD < 4.x had a different probe return code on sucesss, namely
a non-NULL character string meant success, now 0 means success:
static device_method_t yourdrvr_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, yourdrvr_pci_probe),
DEVMETHOD(device_attach, yourdrvr_pci_attach),
DEVMETHOD(device_detach, yourdrvr_pci_detach),
DEVMETHOD(device_shutdown, yourdrvr_pci_shutdown),
DEVMETHOD(bus_alloc_resource, yourdrvr_alloc_resource),
DEVMETHOD(bus_release_resource, yourdrvr_release_resource),
DEVMETHOD(bus_setup_intr, yourdrvr_setup_intr),
{ 0, 0 }
};
static driver_t yourdrvr_pci_driver = {
"yourdrvr",
yourdrvr_methods,
sizeof(struct yourdrvr_softc)
};
devclass_t yourdrvr_devclass;
DRIVER_MODULE(yourdrvr, pci, yourdrvr_pci_driver, yourdrvr_devclass, 0, 0);
/*
* detect the Green Spring PCI40A Industry Pack Carrier Board
*/
static int
yourdrvr_pci_probe(device_t dev)
{
if ((pci_get_vendor(dev) == YOUR_VENDOR) &&
(pci_get_device(dev) == YOUR_DEVICE)) {
device_set_desc(dev, "Your Device Name");
return(0);
}
return(ENXIO);
}
the YOUR_VENDOR and YOUR_DEVICE can be gotten from the card's documentation
or the output of scanpci.
Do you have the "rl" driver compiled into the kernel to support the
RealTek 8139?
--mark tinguely
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110311425.f9VEPd750942>
