lkml.org 
[lkml]   [2000]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI-PCI bridges mess in 2.4.x
Setting bit 1 in dev->resource[x].start, below, seems incorrect.  Should
you be programming the PCI BAR directly, instead?

> +static void __init
> +quirk_cypress_ide_ports(struct pci_dev *dev)
> +{
> + if (dev->class >> 8 != PCI_CLASS_STORAGE_IDE)
> + return;
> + dev->resource[1].start |= 2;
> + dev->resource[1].end = dev->resource[1].start;
> + pci_claim_resource(dev, 0);
> + pci_claim_resource(dev, 1);
> +}


I wonder about this code:

> + /* ??? Reserve some resources for CardBus */
> + if (dev->class >> 8 == PCI_CLASS_BRIDGE_CARDBUS) {
> + io_reserved += 8*1024;
> + mem_reserved += 32*1024*1024;
> + continue;
> + }


I think "pdev_enable_device" is a poorly-chosen name, since "pdev_" is
not a common prefix, and we already have pci_enable_device.

Also, should we be setting PCI_CACHE_LINE_SIZE for PCI devices as well
as bridges?

Jeff


--
Jeff Garzik | "When I do this, my computer freezes."
Building 1024 | -user
MandrakeSoft | "Don't do that."
| -level 1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.069 / U:8.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site