Kernel 2.2.13 patch: Documentation/pci.txt

Bret Indrelee (bindrelee@sbs-cp.com)
Wed, 17 Nov 1999 17:14:35 -0600


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01BF3151.87256BD0
Content-Type: text/plain;
charset="iso-8859-1"

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
-------------------------------------------------------------

------_=_NextPart_000_01BF3151.87256BD0
Content-Type: text/plain;
name="pci-doc-patch.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="pci-doc-patch.txt"

*** linux-2.2.13/Documentation/pci.txt Tue Apr 28 16:22:04 1998=0A=
--- linux/Documentation/pci.txt Wed Nov 17 16:59:44 1999=0A=
***************=0A=
*** 51,56 ****=0A=
--- 51,78 ----=0A=
config space. You should use the values in the pci_dev structure as =
they might=0A=
have been remapped by the kernel.=0A=
=0A=
+ If your PCI device uses PCI I/O space, you need to use the =
check_region(),=0A=
+ request_region() and release_region() routines. These prevent devices =
from =0A=
+ having conflicting I/O regions.=0A=
+ =0A=
+ You use ioremap() to create a cookie mapping to your PCI device. =
The =0A=
+ value from (struct pci_dev *) dev->base_address[] must be masked by =
either =0A=
+ PCI_BASE_ADDRESS_IO_MASK or PCI_BASE_ADDRESS_MEM_MASK before passing =
it =0A=
+ into ioremap().=0A=
+ =0A=
+ This cookie is passed to the readb(), readw(), readl(), writeb(), =
writew(), =0A=
+ and writel() routines when accessing PCI space. You must always use =
these =0A=
+ routines when accessing PCI space from the kernel. Not all =
architechures allow =0A=
+ memory-mapped access to PCI memory from the kernel.=0A=
+ =0A=
+ DMA device drivers should review the IO-mapping.txt file for =
information =0A=
+ about converting between the various address spaces.=0A=
+ =0A=
+ PCI interrupt routines are always SA_SHIRQ and should use the =
value from=0A=
+ (struct pci_dev *) dev->irq field for the interrupt number passed =
into =0A=
+ request_irq(). Since it is a shared interrupt, you must also always =
pass in =0A=
+ a unique dev_id to request_irq().=0A=
+ =0A=
4. Obsolete functions=0A=
~~~~~~~~~~~~~~~~~~~~~=0A=
<linux/bios32.h> is obsolete and should not be included in new =
code.=0A=

------_=_NextPart_000_01BF3151.87256BD0--

-
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/