* [PATCH] 2.6.14.2 Support for 1K I/O space granularity on the Intel P64H2
@ 2005-11-23 18:02 Yeisley, Dan P.
2005-11-23 18:18 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Yeisley, Dan P. @ 2005-11-23 18:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh
The Intel P64H2 PCI bridge has the ability to allocate I/O space with
1KB granularity. I've written a patch against 2.6.14.2 to take
advantage of this option. I've tested it on the latest Unisys
ES7000-600.
Any comments?
--Dan
diff -Naur linux-2.6.14.2/drivers/pci/probe.c
linux-2.6.14.2-en1k/drivers/pci/probe.c
--- linux-2.6.14.2/drivers/pci/probe.c 2005-11-11 00:33:12.000000000
-0500
+++ linux-2.6.14.2-en1k/drivers/pci/probe.c 2005-11-21
08:52:01.000000000 -0500
@@ -251,8 +251,8 @@
res = child->resource[0];
pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo);
pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo);
- base = (io_base_lo & PCI_IO_RANGE_MASK) << 8;
- limit = (io_limit_lo & PCI_IO_RANGE_MASK) << 8;
+ base = (io_base_lo & (PCI_IO_RANGE_MASK | 0x0c) ) << 8;
+ limit = (io_limit_lo & (PCI_IO_RANGE_MASK | 0x0c) ) << 8;
if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) ==
PCI_IO_RANGE_TYPE_32) {
u16 io_base_hi, io_limit_hi;
@@ -266,6 +266,19 @@
res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) |
IORESOURCE_IO;
res->start = base;
res->end = limit + 0xfff;
+
+ /*
+ ** See if the 1k granularity option is enabled on the
Intel P64H2
+ */
+ if (dev->vendor == PCI_VENDOR_ID_INTEL && dev->device
== 0x1460) {
+ u16 en1k;
+ pci_read_config_word(dev, 0x40, &en1k);
+
+ if(en1k & 0x200) {
+ res->end = limit + 0x3ff;
+ printk(KERN_INFO "PCI: Enable I/O Space
to 1 KB Granularity\n");
+ }
+ }
}
res = child->resource[1];
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [PATCH] 2.6.14.2 Support for 1K I/O space granularity on the Intel P64H2
@ 2005-11-23 18:57 Yeisley, Dan P.
0 siblings, 0 replies; 3+ messages in thread
From: Yeisley, Dan P. @ 2005-11-23 18:57 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
The problem with implementing this with a quirk is this line:
res->end = limit + 0xfff;
That hard coded value of 0xfff is the problem. I suppose I could make
it a variable and initialize it to 0xfff and then set it to 0x3ff in the
quirk.
I'll take a look at doing it that way (and try to fix my line wrap
problem).
Thanks,
Dan
-----Original Message-----
From: Greg KH [mailto:gregkh@suse.de]
Sent: Wednesday, November 23, 2005 13:18
To: Yeisley, Dan P.
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.6.14.2 Support for 1K I/O space granularity on
the Intel P64H2
On Wed, Nov 23, 2005 at 01:02:52PM -0500, Yeisley, Dan P. wrote:
> The Intel P64H2 PCI bridge has the ability to allocate I/O space with
> 1KB granularity. I've written a patch against 2.6.14.2 to take
> advantage of this option. I've tested it on the latest Unisys
> ES7000-600.
Shouldn't this be made into a pci quirk somehow?
> linux-2.6.14.2-en1k/drivers/pci/probe.c
> --- linux-2.6.14.2/drivers/pci/probe.c 2005-11-11
00:33:12.000000000
> -0500
Your patch is linewrapped and can't be applied :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-23 18:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-23 18:02 [PATCH] 2.6.14.2 Support for 1K I/O space granularity on the Intel P64H2 Yeisley, Dan P.
2005-11-23 18:18 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-11-23 18:57 Yeisley, Dan P.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox