Messages in this thread | | | From | (Alan Cox) | Subject | Re: PCI driver with IRQ+DMA problems | Date | Fri, 13 Nov 1998 19:13:23 +0000 (GMT) |
| |
> esccp-p based on Siemens 82532 chip, it's a serial communication > controller with 2 channel that go up to 10 Mb/s). It's my first
Nice.
> When a PCI device reports an IRQ number (IRQ 11 in my case), can it > IRQ be used directly, that is using > request_irq( pic_irq_number, > irq_handler, > SA_INTERRUPT, > "my_driver", NULL) ?
Yes.
Eg in 2.1.x its generally done as
if(request_irq(pci_dev->irq , my_irq, SA_INTERRUPT, "me", my_dev)) { printk(KERN_ERR "%s: unable to allocate irq %d.\n", my_dev->name); return -EBUSY; }
and freed with
free_irq(pci_dev->irq, my_dev);
> And can I use any DMA number ? For instance, now I use
Those are ISA DMA channels, PCI DMA is different. Unless Im very mistaken you never need to allocate any DMA channel resources for this.
> What part of the kernel sources I should look to get examples of > IRQ+DMA+PCI (most probably scsi and network cards) ?
drivers/net/tulip.c is large but the PCI and IRQ handling is clean and easy to read. You may find drivers/net/z85230.c,syncppp.c, hostess_sv11.c useful for a picture of how to plug the sync stuff into 2.1.x networking.
Thats a generic PPP and cisoc HDLC implementation thats available for all sync drivers to use, and a Z85230 chip driver + comtrol board driver.
Alan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |