From owner-freebsd-questions Wed Oct 31 6:25:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id 4EEA737B405 for ; Wed, 31 Oct 2001 06:25:40 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id f9VEPd750942; Wed, 31 Oct 2001 08:25:39 -0600 (CST) (envelope-from tinguely) Date: Wed, 31 Oct 2001 08:25:39 -0600 (CST) From: mark tinguely Message-Id: <200110311425.f9VEPd750942@web.cs.ndsu.nodak.edu> To: questions@FreeBSD.ORG, suvarna@indranetworks.com Subject: Re: Problem for detecting a PCI device. In-Reply-To: <001101c16160$98708470$1100a8c0@indranet> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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