aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-devsets.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-devsets.c')
-rw-r--r--drivers/ide/ide-devsets.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c
index 1099bf7cf96..c6935c78757 100644
--- a/drivers/ide/ide-devsets.c
+++ b/drivers/ide/ide-devsets.c
@@ -105,15 +105,17 @@ static int set_pio_mode(ide_drive_t *drive, int arg)
105 return -ENOSYS; 105 return -ENOSYS;
106 106
107 if (set_pio_mode_abuse(drive->hwif, arg)) { 107 if (set_pio_mode_abuse(drive->hwif, arg)) {
108 drive->pio_mode = arg + XFER_PIO_0;
109
108 if (arg == 8 || arg == 9) { 110 if (arg == 8 || arg == 9) {
109 unsigned long flags; 111 unsigned long flags;
110 112
111 /* take lock for IDE_DFLAG_[NO_]UNMASK/[NO_]IO_32BIT */ 113 /* take lock for IDE_DFLAG_[NO_]UNMASK/[NO_]IO_32BIT */
112 spin_lock_irqsave(&hwif->lock, flags); 114 spin_lock_irqsave(&hwif->lock, flags);
113 port_ops->set_pio_mode(drive, arg); 115 port_ops->set_pio_mode(hwif, drive);
114 spin_unlock_irqrestore(&hwif->lock, flags); 116 spin_unlock_irqrestore(&hwif->lock, flags);
115 } else 117 } else
116 port_ops->set_pio_mode(drive, arg); 118 port_ops->set_pio_mode(hwif, drive);
117 } else { 119 } else {
118 int keep_dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); 120 int keep_dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
119 121