* Re: Sample PCI Linux Device Driver
2009-10-08 18:58 ` Sample PCI Linux Device Driver mankan srinivas
@ 2009-10-08 21:38 ` Bryan Donlan
2009-10-09 17:48 ` Grant Grundler
2009-10-12 21:42 ` Heiko J Schick
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Donlan @ 2009-10-08 21:38 UTC (permalink / raw)
To: mankan srinivas; +Cc: linux-pci, linux-kernel
On Thu, Oct 8, 2009 at 2:58 PM, mankan srinivas <s_mankan@hotmail.com> wrote:
>
> <BAY138-W201EAB14A34CDEFC5AFFCBE5CC0@phx.gbl>
>
>
> <20091008162203.GA13403@kroah.com>
> Content-Type: text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> MIME-Version: 1.0
First, please fix your mail client - it's munging your mails rather
badly, as you can see.
> Hello=2C
> =20
> I am working on developing PCI based Linux Device Driver. Could you please =
> send me few sample code. I am looking for the code which has more informati=
> on about low-level driver code talks to the hardware. Any real example code=
> is greatly appreciated.
The entire linux kernel is open source - just look under drivers/ for
plenty of example code. If you're stuck, a 'grep linux/pci.h -R
drivers' should find you PCI drivers. (Note that drivers/pci contains
pci core code, which is probably not what you want)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sample PCI Linux Device Driver
2009-10-08 18:58 ` Sample PCI Linux Device Driver mankan srinivas
2009-10-08 21:38 ` Bryan Donlan
@ 2009-10-09 17:48 ` Grant Grundler
2009-10-12 21:42 ` Heiko J Schick
2 siblings, 0 replies; 4+ messages in thread
From: Grant Grundler @ 2009-10-09 17:48 UTC (permalink / raw)
To: mankan srinivas; +Cc: linux-pci, linux-kernel
On Thu, Oct 08, 2009 at 06:58:01PM +0000, mankan srinivas wrote:
> I am working on developing PCI based Linux Device Driver. Could you
> please send me few sample code. I am looking for the code which has more
> information about low-level driver code talks to the hardware. Any real
> example code is greatly appreciated.
Please start by reading Documentation/PCI/pci.txt and MSI-HOWTO.txt
Lots more useful info in Documentation/ that should help you out
(e.g. suspend/resume, hotplug, DMA API, etc)
Here are some specific driver examples:
drivers/net/forcedeth.c
drivers/net/e1000e/
drivers/scsi/mpt2sas/
drivers/ata/sata_sil24.c
drivers/ata/sata_mv.c
hth,
grant
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Sample PCI Linux Device Driver
2009-10-08 18:58 ` Sample PCI Linux Device Driver mankan srinivas
2009-10-08 21:38 ` Bryan Donlan
2009-10-09 17:48 ` Grant Grundler
@ 2009-10-12 21:42 ` Heiko J Schick
2 siblings, 0 replies; 4+ messages in thread
From: Heiko J Schick @ 2009-10-12 21:42 UTC (permalink / raw)
To: mankan srinivas; +Cc: linux-pci, linux-kernel
On Oct 8, 2009, at 8:58 PM, mankan srinivas wrote:
> I am working on developing PCI based Linux Device Driver. Could you
> please =
> send me few sample code. I am looking for the code which has more
> informati=
> on about low-level driver code talks to the hardware. Any real
> example code=
> is greatly appreciated.
Chapter 12 from the Linux Device Driver book might be useful, too.
http://lwn.net/images/pdf/LDD3/ch12.pdf
Regards, Heiko
^ permalink raw reply [flat|nested] 4+ messages in thread