aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/it821x.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
committerLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
commitb2576e1d4408e134e2188c967b1f28af39cd79d4 (patch)
tree004f3c82faab760f304ce031d6d2f572e7746a50 /drivers/ide/it821x.c
parent3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff)
parent2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff)
Merge branch 'linus' into release
Diffstat (limited to 'drivers/ide/it821x.c')
-rw-r--r--drivers/ide/it821x.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
index ef004089761b..0be27ac1f077 100644
--- a/drivers/ide/it821x.c
+++ b/drivers/ide/it821x.c
@@ -167,12 +167,10 @@ static void it821x_clock_strategy(ide_drive_t *drive)
167 ide_hwif_t *hwif = drive->hwif; 167 ide_hwif_t *hwif = drive->hwif;
168 struct pci_dev *dev = to_pci_dev(hwif->dev); 168 struct pci_dev *dev = to_pci_dev(hwif->dev);
169 struct it821x_dev *itdev = ide_get_hwifdata(hwif); 169 struct it821x_dev *itdev = ide_get_hwifdata(hwif);
170 ide_drive_t *pair; 170 ide_drive_t *pair = ide_get_pair_dev(drive);
171 int clock, altclock, sel = 0; 171 int clock, altclock, sel = 0;
172 u8 unit = drive->dn & 1, v; 172 u8 unit = drive->dn & 1, v;
173 173
174 pair = &hwif->drives[1 - unit];
175
176 if(itdev->want[0][0] > itdev->want[1][0]) { 174 if(itdev->want[0][0] > itdev->want[1][0]) {
177 clock = itdev->want[0][1]; 175 clock = itdev->want[0][1];
178 altclock = itdev->want[1][1]; 176 altclock = itdev->want[1][1];
@@ -239,15 +237,13 @@ static void it821x_set_pio_mode(ide_drive_t *drive, const u8 pio)
239{ 237{
240 ide_hwif_t *hwif = drive->hwif; 238 ide_hwif_t *hwif = drive->hwif;
241 struct it821x_dev *itdev = ide_get_hwifdata(hwif); 239 struct it821x_dev *itdev = ide_get_hwifdata(hwif);
242 ide_drive_t *pair; 240 ide_drive_t *pair = ide_get_pair_dev(drive);
243 u8 unit = drive->dn & 1, set_pio = pio; 241 u8 unit = drive->dn & 1, set_pio = pio;
244 242
245 /* Spec says 89 ref driver uses 88 */ 243 /* Spec says 89 ref driver uses 88 */
246 static u16 pio_timings[]= { 0xAA88, 0xA382, 0xA181, 0x3332, 0x3121 }; 244 static u16 pio_timings[]= { 0xAA88, 0xA382, 0xA181, 0x3332, 0x3121 };
247 static u8 pio_want[] = { ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY }; 245 static u8 pio_want[] = { ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY };
248 246
249 pair = &hwif->drives[1 - unit];
250
251 /* 247 /*
252 * Compute the best PIO mode we can for a given device. We must 248 * Compute the best PIO mode we can for a given device. We must
253 * pick a speed that does not cause problems with the other device 249 * pick a speed that does not cause problems with the other device
@@ -279,7 +275,7 @@ static void it821x_set_pio_mode(ide_drive_t *drive, const u8 pio)
279 * the shared MWDMA/PIO timing register. 275 * the shared MWDMA/PIO timing register.
280 */ 276 */
281 277
282static void it821x_tune_mwdma (ide_drive_t *drive, byte mode_wanted) 278static void it821x_tune_mwdma(ide_drive_t *drive, u8 mode_wanted)
283{ 279{
284 ide_hwif_t *hwif = drive->hwif; 280 ide_hwif_t *hwif = drive->hwif;
285 struct pci_dev *dev = to_pci_dev(hwif->dev); 281 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -316,7 +312,7 @@ static void it821x_tune_mwdma (ide_drive_t *drive, byte mode_wanted)
316 * controller when doing UDMA modes in pass through. 312 * controller when doing UDMA modes in pass through.
317 */ 313 */
318 314
319static void it821x_tune_udma (ide_drive_t *drive, byte mode_wanted) 315static void it821x_tune_udma(ide_drive_t *drive, u8 mode_wanted)
320{ 316{
321 ide_hwif_t *hwif = drive->hwif; 317 ide_hwif_t *hwif = drive->hwif;
322 struct pci_dev *dev = to_pci_dev(hwif->dev); 318 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -516,6 +512,7 @@ static struct ide_dma_ops it821x_pass_through_dma_ops = {
516 .dma_test_irq = ide_dma_test_irq, 512 .dma_test_irq = ide_dma_test_irq,
517 .dma_timeout = ide_dma_timeout, 513 .dma_timeout = ide_dma_timeout,
518 .dma_lost_irq = ide_dma_lost_irq, 514 .dma_lost_irq = ide_dma_lost_irq,
515 .dma_sff_read_status = ide_dma_sff_read_status,
519}; 516};
520 517
521/** 518/**