aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-10 10:40:54 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-10 10:40:54 -0500
commitaf1bff4f1d117f99ad8a88e6532baff475fb44a5 (patch)
tree8ef0d23ec3c42e5ad190f1dc7ef1acb832040362 /drivers
parent6d98bda79bea0e1be26c0767d0e9923ad3b72f2e (diff)
Revert "PCI: fix IDE legacy mode resources"
This reverts commit fd6e732186ab522c812ab19c2c5e5befb8ec8115, which helped up things on MIPS, but was wrong for everything else. As Ralf Baechle puts it: "It seems the whole MIPS resource managment is complicated enough (out of necessity) that only a few people actually grok it. Ioports being actually memory mapped on MIPS only makes the confusion worse, sigh." Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Alan Cox <alan@redhat.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/probe.c48
1 files changed, 12 insertions, 36 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 463a5a9d583d..c2f8a78c894c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -743,46 +743,22 @@ static int pci_setup_device(struct pci_dev * dev)
743 */ 743 */
744 if (class == PCI_CLASS_STORAGE_IDE) { 744 if (class == PCI_CLASS_STORAGE_IDE) {
745 u8 progif; 745 u8 progif;
746 struct pci_bus_region region;
747
748 pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); 746 pci_read_config_byte(dev, PCI_CLASS_PROG, &progif);
749 if ((progif & 1) == 0) { 747 if ((progif & 1) == 0) {
750 struct resource resource = { 748 dev->resource[0].start = 0x1F0;
751 .start = 0x1F0, 749 dev->resource[0].end = 0x1F7;
752 .end = 0x1F7, 750 dev->resource[0].flags = LEGACY_IO_RESOURCE;
753 .flags = LEGACY_IO_RESOURCE, 751 dev->resource[1].start = 0x3F6;
754 }; 752 dev->resource[1].end = 0x3F6;
755 753 dev->resource[1].flags = LEGACY_IO_RESOURCE;
756 pcibios_resource_to_bus(dev, &region, &resource);
757 dev->resource[0].start = region.start;
758 dev->resource[0].end = region.end;
759 dev->resource[0].flags = resource.flags;
760 resource.start = 0x3F6;
761 resource.end = 0x3F6;
762 resource.flags = LEGACY_IO_RESOURCE;
763 pcibios_resource_to_bus(dev, &region, &resource);
764 dev->resource[1].start = region.start;
765 dev->resource[1].end = region.end;
766 dev->resource[1].flags = resource.flags;
767 } 754 }
768 if ((progif & 4) == 0) { 755 if ((progif & 4) == 0) {
769 struct resource resource = { 756 dev->resource[2].start = 0x170;
770 .start = 0x170, 757 dev->resource[2].end = 0x177;
771 .end = 0x177, 758 dev->resource[2].flags = LEGACY_IO_RESOURCE;
772 .flags = LEGACY_IO_RESOURCE, 759 dev->resource[3].start = 0x376;
773 }; 760 dev->resource[3].end = 0x376;
774 761 dev->resource[3].flags = LEGACY_IO_RESOURCE;
775 pcibios_resource_to_bus(dev, &region, &resource);
776 dev->resource[2].start = region.start;
777 dev->resource[2].end = region.end;
778 dev->resource[2].flags = resource.flags;
779 resource.start = 0x376;
780 resource.end = 0x376;
781 resource.flags = LEGACY_IO_RESOURCE;
782 pcibios_resource_to_bus(dev, &region, &resource);
783 dev->resource[3].start = region.start;
784 dev->resource[3].end = region.end;
785 dev->resource[3].flags = resource.flags;
786 } 762 }
787 } 763 }
788 break; 764 break;