From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-pci@atrey.karlin.mff.cuni.cz, Andrew Morton <akpm@osdl.org>,
Greg KH <greg@kroah.com>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Subject: [RFC][PATCH 2/4] PCI legacy I/O port free driver - Update Documantion/pci.txt
Date: Tue, 14 Feb 2006 15:07:51 +0900 [thread overview]
Message-ID: <43F173B7.3030905@jp.fujitsu.com> (raw)
In-Reply-To: <43F172BA.1020405@jp.fujitsu.com>
This patch adds the description about pci_select_resource() into
Documenation/pci.txt.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Documentation/pci.txt | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+)
Index: linux-2.6.16-rc3/Documentation/pci.txt
===================================================================
--- linux-2.6.16-rc3.orig/Documentation/pci.txt 2006-01-03 12:21:10.000000000 +0900
+++ linux-2.6.16-rc3/Documentation/pci.txt 2006-02-14 12:28:03.000000000 +0900
@@ -169,6 +169,31 @@
needed and wakes up the device if it was in suspended state. Please note
that this function can fail.
+ If you want to enable only the specific type of regions of the device,
+you can tell it to the kernel by calling pci_set_bar_mask() or
+pci_set_bar_mask_by_resource() before calling pci_enable_device(). Once
+you tell it to the kernel, the following pci_enable_device() and
+pci_request_regions() call will handles only the regions you specified.
+The kernel will enables all regions of the device if you don't use
+pci_set_bar_mask*(). The pci_set_bar_mask*() would be needed to make some
+drivers legacy I/O port free. On the large servers, I/O port resource could
+not be assigned to all PCI devices because it is limited (64KB on Intel
+Architecture[1]) and it would be fragmented (I/O base register of
+PCI-to-PCI bridge will usually be aligned to a 4KB boundary[2]). In this
+case, pci_enable_device() for those devices will fail if you try to enable
+all the regions. However, it is a problem for some PCI devices that provide
+both I/O port and MMIO interface because some of them can be handled
+without using I/O port interface. The reason why such devices provide I/O
+port interface is for compatibility to legacy OSs. So this kind of devices
+should work even if enough I/O port resources are not assigned. The "PCI
+Local Bus Specification Revision 3.0" also mentions about this topic
+(Please see p.44, "IMPLEMENTATION NOTE"). You can solve this problem by
+using pci_set_bar_mask*(). Please note that the information specified
+through pci_set_bar_mask*() will be cleared at pci_disable_device() time.
+---
+[1] Some machines support 64KB I/O port space per PCI segment.
+[2] Some P2P bridges support optional 1KB aligned I/O base.
+
If you want to use the device in bus mastering mode, call pci_set_master()
which enables the bus master bit in PCI_COMMAND register and also fixes
the latency timer value if it's set to something bogus by the BIOS.
next prev parent reply other threads:[~2006-02-14 6:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-14 6:03 [RFC][PATCH 0/4] PCI legacy I/O port free driver Kenji Kaneshige
2006-02-14 6:06 ` [RFC][PATCH 1/4] PCI legacy I/O port free driver - Introduce pci_set_bar_mask*() Kenji Kaneshige
2006-02-15 5:07 ` Andrew Morton
2006-02-15 6:03 ` Kenji Kaneshige
2006-02-15 9:07 ` Russell King
2006-02-15 12:33 ` Kenji Kaneshige
2006-02-14 6:07 ` Kenji Kaneshige [this message]
2006-02-14 6:09 ` [RFC][PATCH 3/4] PCI legacy I/O port free driver - Make Intel e1000 driver legacy I/O port free Kenji Kaneshige
2006-02-14 6:10 ` [RFC][PATCH 4/4] PCI legacy I/O port free driver - Make Emulex lpfc " Kenji Kaneshige
2006-02-14 9:32 ` [RFC][PATCH 0/4] PCI legacy I/O port free driver Andi Kleen
2006-02-15 3:16 ` Kenji Kaneshige
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43F173B7.3030905@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.