diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-10 23:30:27 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-10 23:30:27 -0500 |
commit | cfad589f565bdaa69d45fb1c0db124727a6eaf6e (patch) | |
tree | 0582935064aa9e6ba0c80efaf6c0ef35ff8c3867 /drivers | |
parent | bc625f20c08c5a5438a9fa3bb6d67fd84b1bab4b (diff) | |
parent | 437105f2a7f23899fd647e7ada683ba8dacf11ba (diff) |
Merge branch 'linux-2.6' into for-2.6.25
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/probe.c | 48 |
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, ®ion, &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, ®ion, &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, ®ion, &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, ®ion, &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; |