Messages in this thread | | | From | Bret Indrelee <> | Subject | Kernel 2.2.13 patch: Documentation/pci.txt | Date | Wed, 17 Nov 1999 17:14:35 -0600 |
| |
Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] wrote: > > Shall I resubmit them as a patch to 2.2 documentation, > taking out the stuff > > about check_/request_/release_*_region? Or am I still > misunderstanding > > something in the 2.2 kernel? > > By all means. The only reason the last one didnt go into > 2.2.14pre btw was > that patch decided it didnt like the diff
Try this one. I've added in Jeff's comments about having to mask the base_address[] before passing it to ioremap() and a comment about needing a unique dev_id for request_irq() as well.
Let me know if this doesn't apply cleanly. I'm not sure that I'm doing it correctly.
I am using the source that RedHat distributes in RedHat 6.1 as my source tree for 2.2.13. Since this is only the Documention directory I wouldn't expect that to cause any problems.
-Bret
------------------------------------------------------------- SBS Technologies, Connectivity Products ... solutions for real-time connectivity
Bret Indrelee, Engineer SBS Technologies, Inc., Connectivity Products 1284 Corporate Center Drive, St. Paul MN 55121 Direct: (651) 905-4731 Main: (651) 905-4700 Fax: (651) 905-4701 E-mail: bindrelee@sbs-cp.com http://www.sbs.com -------------------------------------------------------------
*** linux-2.2.13/Documentation/pci.txt Tue Apr 28 16:22:04 1998 --- linux/Documentation/pci.txt Wed Nov 17 16:59:44 1999 *************** *** 51,56 **** --- 51,78 ---- config space. You should use the values in the pci_dev structure as they might have been remapped by the kernel. + If your PCI device uses PCI I/O space, you need to use the check_region(), + request_region() and release_region() routines. These prevent devices from + having conflicting I/O regions. + + You use ioremap() to create a cookie mapping to your PCI device. The + value from (struct pci_dev *) dev->base_address[] must be masked by either + PCI_BASE_ADDRESS_IO_MASK or PCI_BASE_ADDRESS_MEM_MASK before passing it + into ioremap(). + + This cookie is passed to the readb(), readw(), readl(), writeb(), writew(), + and writel() routines when accessing PCI space. You must always use these + routines when accessing PCI space from the kernel. Not all architechures allow + memory-mapped access to PCI memory from the kernel. + + DMA device drivers should review the IO-mapping.txt file for information + about converting between the various address spaces. + + PCI interrupt routines are always SA_SHIRQ and should use the value from + (struct pci_dev *) dev->irq field for the interrupt number passed into + request_irq(). Since it is a shared interrupt, you must also always pass in + a unique dev_id to request_irq(). + 4. Obsolete functions ~~~~~~~~~~~~~~~~~~~~~ <linux/bios32.h> is obsolete and should not be included in new code.
| |