diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 10:11:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 10:11:11 -0700 |
commit | e6423407d01168f7760cdee7270d9f51d1240301 (patch) | |
tree | 979795cfa8f6946238ab31f544159142f3e7df93 /drivers/ide/opti621.c | |
parent | 7f8189068726492950bf1a2dcfd9b51314560abf (diff) | |
parent | 39c58f37a10198054c656c28202fb1e6d22fd505 (diff) |
Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (34 commits)
ide-cd: prevent null pointer deref via cdrom_newpc_intr
ide: BUG() on unknown requests
ide: filter out invalid DMA xfer mode changes in HDIO_DRIVE_CMD ioctl handler
ide: do not access ide_drive_t 'drive_data' field directly
sl82c105: implement test_irq() method
siimage: implement test_irq() method
pdc202xx_old: implement test_irq() method (take 2)
cmd64x: implement test_irq() method
cmd640: implement test_irq() method
ide: move ack_intr() method into 'struct ide_port_ops' (take 2)
ide: move IRQ clearing from ack_intr() method to clear_irq() method (take 2)
siimage: use ide_dma_test_irq() (take 2)
cmd64x: implement clear_irq() method (take 2)
ide: call clear_irq() method in ide_timer_expiry()
sgiioc4: coding style cleanup
ide: don't enable IORDY at a probe time
ide: IORDY handling fixes
ata: add ata_id_pio_need_iordy() helper (v2)
ide-tape: fix build issue
ide: unify interrupt reason checking
...
Diffstat (limited to 'drivers/ide/opti621.c')
-rw-r--r-- | drivers/ide/opti621.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c index 6048eda3cd6..f1d70d6630f 100644 --- a/drivers/ide/opti621.c +++ b/drivers/ide/opti621.c @@ -138,6 +138,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) ide_hwif_t *hwif = drive->hwif; ide_drive_t *pair = ide_get_pair_dev(drive); unsigned long flags; + unsigned long mode = XFER_PIO_0 + pio, pair_mode; u8 tim, misc, addr_pio = pio, clk; /* DRDY is default 2 (by OPTi Databook) */ @@ -150,11 +151,12 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) { 0x48, 0x34, 0x21, 0x10, 0x10 } /* 25 MHz */ }; - drive->drive_data = XFER_PIO_0 + pio; + ide_set_drivedata(drive, (void *)mode); if (pair) { - if (pair->drive_data && pair->drive_data < drive->drive_data) - addr_pio = pair->drive_data - XFER_PIO_0; + pair_mode = (unsigned long)ide_get_drivedata(pair); + if (pair_mode && pair_mode < mode) + addr_pio = pair_mode - XFER_PIO_0; } spin_lock_irqsave(&opti621_lock, flags); |