Re: PCI Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Kirill Messel <kirill.messel@mtu-net.ru> 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?
> 

To determine whether to write a char driver or a block driver,
determine how your PCI device transfers data.  If it transfers data
in variable length "streams", write a char driver.  If it transfers
data in fixed size "chunks", otherwise known as blocks, write a block
driver.

In reality, most drivers are char drivers.  Typically, only those
devices which meet some form of the ATA/ATAPI spec...such as hard
drives, CD-ROMs/DVDs and Tapes use block drivers.  Block drivers are
*special*...resist wrting one until you *have* to.  Trust me.

See http://www.linuxhq.com/kernel/v2.4/doc/pci.txt.html

Also, remember that Rubini and Corbet and online at
http://www.xml.com/ldd/chapter/book/index.html

Harmony,

--Christine


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux