Date: Mon, 16 Feb 1998 21:42:55 +0100 From: Stefan Esser <se@FreeBSD.ORG> To: "Daniel O'Connor" <doconnor@gsoft.com.au>, hackers@FreeBSD.ORG Cc: =?iso-8859-1?Q?Stefan_E=DFer?= <se@FreeBSD.ORG> Subject: Re: PCI LKM's? Message-ID: <19980216214255.33660@mi.uni-koeln.de> In-Reply-To: <199802130130.MAA09978@cain.gsoft.com.au>; from Daniel O'Connor on Fri, Feb 13, 1998 at 12:00:24PM %2B1030 References: <199802130130.MAA09978@cain.gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1998-02-13 12:00 +1030, Daniel O'Connor <doconnor@gsoft.com.au> wrote: > Hi, > I am trying to convert a static PCI device driver to an LKM, but I can't fiure > out how to probe it.. If its an ISA device I run the probe routine with the > config info, but for a PCI device I don't know how to tell if it is inthe > machine or not after boot time. > > I tried looking in /usr/src/sys/pci/* for examples, but pcisupport.c was the > only thing with any LKM stuff and it didn't help :( > > Can anyone help me? > (I am running 2.2.5-STABLE) I added PCI LKM support to the PCI code more than one year ago, but never put it into the "official" 2.2.x repository. If you want patches, I can provide you with them, but if there is sufficient interest, I can also commit that code to -stable. The interface is very simple: int pci_register_lkm (struct pci_device *dvp, int if_revision) Call that function with the address of the pci_device struct (the XXX argument of the "DATA_SET(pcidevice_set, XXX);" for the compiled in driver case) and an interface revision value of 0, and everything else will be taken care of automagically. I added a support function to pciconf (or rather the underlying ioctl()), which reported whether a driver had been attached to a device. This allowed the loading of PCI LKMs from a script called from /etc/rc, controlled by the PCI vendor and device IDs. Regards, STefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980216214255.33660>