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>
Subject: [RFC][PATCH 0/4] PCI legacy I/O port free driver
Date: Tue, 14 Feb 2006 15:03:38 +0900 [thread overview]
Message-ID: <43F172BA.1020405@jp.fujitsu.com> (raw)
Hi,
I encountered a problem that some PCI devices don't work on my system
which have huge number of PCI devices.
It is mandatory for all PCI device drivers to enable the device by
calling pci_enable_device() which enables all regions probed from the
device's BARs. If pci_enable_device() failes to enable any regions
probed from BARs, it returns as error. 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, the devices which have no I/O port
resource assigned don't work because pci_enable_device() for those
devices failes. This is what happened on my machine.
---
[1]: Some machines support 64KB I/O port space per PCI segment.
[2]: Some P2P bridges support optional 1KB aligned I/O base.
Here, there are many PCI devices that provide both I/O port and MMIO
interface, and some of those devices 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"). On the current linux,
unfortunately, this kind of devices don't work if I/O port resources
are not assigned, because pci_enable_device() for those devices fails.
To solve this problem, this series of patches introduces a new
interface pci_set_bar_mask() and pci_set_bar_mask_by_resource() for
PCI device drivers to tell the kernel what regions they really want to
use. Once the driver call pci_set_bar_mask*(), following
pci_enable_device() and pci_request_regions() call handles only the
specific regions. If the driver doesn't use pci_set_bar_mask*(),
pci_enable_device() and pci_request_regions() handle all regions as
they currently are. By using pci_set_bar_mask*(), we can make PCI
drivers legacy I/O port free with very small change.
I'm attaching the following four patches:
[patch 1/4] Inntroduce pci_set_bar_mask*()
[patch 2/4] Update Documantion/pci.txt
[patch 3/4] Make Intel e1000 driver legacy I/O port free
[patch 4/4] Make Emulex lpfc driver legacy I/O port free
I would very much appreciate giving me any comments and suggestions.
Thanks,
Kenji Kaneshige
next reply other threads:[~2006-02-14 6:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-14 6:03 Kenji Kaneshige [this message]
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 ` [RFC][PATCH 2/4] PCI legacy I/O port free driver - Update Documantion/pci.txt Kenji Kaneshige
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=43F172BA.1020405@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox