diff options
Diffstat (limited to 'drivers/ide/hpt366.c')
-rw-r--r-- | drivers/ide/hpt366.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index 45163693f737..58c51cddc100 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * | 12 | * |
13 | * | 13 | * |
14 | * HighPoint has its own drivers (open source except for the RAID part) | 14 | * HighPoint has its own drivers (open source except for the RAID part) |
15 | * available from http://www.highpoint-tech.com/BIOS%20+%20Driver/. | 15 | * available from http://www.highpoint-tech.com/USA_new/service_support.htm |
16 | * This may be useful to anyone wanting to work on this driver, however do not | 16 | * This may be useful to anyone wanting to work on this driver, however do not |
17 | * trust them too much since the code tends to become less and less meaningful | 17 | * trust them too much since the code tends to become less and less meaningful |
18 | * as the time passes... :-/ | 18 | * as the time passes... :-/ |
@@ -838,7 +838,7 @@ static void hpt3xxn_set_clock(ide_hwif_t *hwif, u8 mode) | |||
838 | 838 | ||
839 | static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq) | 839 | static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq) |
840 | { | 840 | { |
841 | hpt3xxn_set_clock(drive->hwif, rq_data_dir(rq) ? 0x23 : 0x21); | 841 | hpt3xxn_set_clock(drive->hwif, rq_data_dir(rq) ? 0x21 : 0x23); |
842 | } | 842 | } |
843 | 843 | ||
844 | /** | 844 | /** |
@@ -1173,8 +1173,9 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | |||
1173 | u16 mcr; | 1173 | u16 mcr; |
1174 | 1174 | ||
1175 | pci_read_config_word(dev, mcr_addr, &mcr); | 1175 | pci_read_config_word(dev, mcr_addr, &mcr); |
1176 | pci_write_config_word(dev, mcr_addr, (mcr | 0x8000)); | 1176 | pci_write_config_word(dev, mcr_addr, mcr | 0x8000); |
1177 | /* now read cable id register */ | 1177 | /* Debounce, then read cable ID register */ |
1178 | udelay(10); | ||
1178 | pci_read_config_byte(dev, 0x5a, &scr1); | 1179 | pci_read_config_byte(dev, 0x5a, &scr1); |
1179 | pci_write_config_word(dev, mcr_addr, mcr); | 1180 | pci_write_config_word(dev, mcr_addr, mcr); |
1180 | } else if (chip_type >= HPT370) { | 1181 | } else if (chip_type >= HPT370) { |
@@ -1185,10 +1186,11 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | |||
1185 | u8 scr2 = 0; | 1186 | u8 scr2 = 0; |
1186 | 1187 | ||
1187 | pci_read_config_byte(dev, 0x5b, &scr2); | 1188 | pci_read_config_byte(dev, 0x5b, &scr2); |
1188 | pci_write_config_byte(dev, 0x5b, (scr2 & ~1)); | 1189 | pci_write_config_byte(dev, 0x5b, scr2 & ~1); |
1189 | /* now read cable id register */ | 1190 | /* Debounce, then read cable ID register */ |
1191 | udelay(10); | ||
1190 | pci_read_config_byte(dev, 0x5a, &scr1); | 1192 | pci_read_config_byte(dev, 0x5a, &scr1); |
1191 | pci_write_config_byte(dev, 0x5b, scr2); | 1193 | pci_write_config_byte(dev, 0x5b, scr2); |
1192 | } else | 1194 | } else |
1193 | pci_read_config_byte(dev, 0x5a, &scr1); | 1195 | pci_read_config_byte(dev, 0x5a, &scr1); |
1194 | 1196 | ||