aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_sis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_sis.c')
-rw-r--r--drivers/ata/pata_sis.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 657b1ee2f5c1..9a829a7cbc60 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -931,9 +931,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
931 if (host != NULL) { 931 if (host != NULL) {
932 chipset = sets; /* Match found */ 932 chipset = sets; /* Match found */
933 if (sets->device == 0x630) { /* SIS630 */ 933 if (sets->device == 0x630) { /* SIS630 */
934 u8 host_rev; 934 if (host->revision >= 0x30) /* 630 ET */
935 pci_read_config_byte(host, PCI_REVISION_ID, &host_rev);
936 if (host_rev >= 0x30) /* 630 ET */
937 chipset = &sis100_early; 935 chipset = &sis100_early;
938 } 936 }
939 break; 937 break;
@@ -977,7 +975,6 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
977 u16 trueid; 975 u16 trueid;
978 u8 prefctl; 976 u8 prefctl;
979 u8 idecfg; 977 u8 idecfg;
980 u8 sbrev;
981 978
982 /* Try the second unmasking technique */ 979 /* Try the second unmasking technique */
983 pci_read_config_byte(pdev, 0x4a, &idecfg); 980 pci_read_config_byte(pdev, 0x4a, &idecfg);
@@ -990,11 +987,10 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
990 lpc_bridge = pci_get_slot(pdev->bus, 0x10); /* Bus 0 Dev 2 Fn 0 */ 987 lpc_bridge = pci_get_slot(pdev->bus, 0x10); /* Bus 0 Dev 2 Fn 0 */
991 if (lpc_bridge == NULL) 988 if (lpc_bridge == NULL)
992 break; 989 break;
993 pci_read_config_byte(lpc_bridge, PCI_REVISION_ID, &sbrev);
994 pci_read_config_byte(pdev, 0x49, &prefctl); 990 pci_read_config_byte(pdev, 0x49, &prefctl);
995 pci_dev_put(lpc_bridge); 991 pci_dev_put(lpc_bridge);
996 992
997 if (sbrev == 0x10 && (prefctl & 0x80)) { 993 if (lpc_bridge->revision == 0x10 && (prefctl & 0x80)) {
998 chipset = &sis133_early; 994 chipset = &sis133_early;
999 break; 995 break;
1000 } 996 }