Are u writing a user level driver or a kernel level driver? To have an access to the actual devices, you always need a kernel agent, otherwise you would be violating the protection law on the i386 architecture. You can use PCI function calls being in kernel only. To understand data interaction between kernel & user space explore copy_to_user() and copy_from_user() Thanks, Sumit Kirill Messel wrote: > > Hi, > Ok , i have undestood, but from user space i can't use pci_find_device(). > If i directly in module write, read pci register it is work. How can i > read this data from kernel space to user? > > Thanks > > Sumit Agarwal wrote: > > >You have to write a character device driver. > >pci_find_device() can be used to find the device on the pci > >bus. By looking at the card specification manual, you can > >know about the vendor id, model id .. e.t.c. If the > >configuration data returned by pci_find_devices() matches > >that of your specification then you have found the right > >device. Thereafter, allocate the various resources to your > >device (interrupt line, addresses e.t.c). Your card is ready > >for the specific initializations. > > > >For more information on Configuration Space of the PCI, > >please refer the > >PCI local bus specifications. > > > >Thanks, > >Sumit > > > >Kirill Messel wrote: > > > >>Hi, > >> > >>I have a pci card. But i don't understand how can i write driver for it. > >>Should it be char device, block device, or proc device or anything else? > >>For example, can use in user programm "pci_find_device" function and how > >>can i? > >> > >>Thanks > >> > >> > >>Vinay wrote: > >> > >>>Hi , > >>>PCI based drivers are for the PCI based device . If u'r > >>>device is a PCI compliant then u can write a driver for > >>>that . > >>> > >>>Regards, > >>>Vinay > >>>----- Original Message ----- > >>>From: "Kirill Messel" <kirill.messel@mtu-net.ru> > >>>To: "Kernel" <kernelnewbies@nl.linux.org> > >>>Sent: Thursday, July 04, 2002 2:27 PM > >>>Subject: PCI Driver > >>> > >>> > >>>>Hi All, > >>>> > >>>>I have written char driver. Can i extend this simple example to PCI > >>>> > >>>driver? > >>> > >>>>Thanks > >>>> > >>>> > >>>>-- > >>>>Kernelnewbies: Help each other learn about the Linux kernel. > >>>>Archive: http://mail.nl.linux.org/kernelnewbies/ > >>>>FAQ: http://kernelnewbies.org/faq/ > >>>> > >>> > >>> > >>-- > >>Kernelnewbies: Help each other learn about the Linux kernel. > >>Archive: http://mail.nl.linux.org/kernelnewbies/ > >>FAQ: http://kernelnewbies.org/faq/ > >> > > > > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/