]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/ide/ide-devsets.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / ide / ide-devsets.c
index 1099bf7cf968ac216818e7ed0b6973e6cd6741ce..9e98122f646e3190c85dc3d2813102f5a00f49ec 100644 (file)
@@ -1,5 +1,6 @@
 
 #include <linux/kernel.h>
+#include <linux/gfp.h>
 #include <linux/ide.h>
 
 DEFINE_MUTEX(ide_setting_mtx);
@@ -105,15 +106,17 @@ static int set_pio_mode(ide_drive_t *drive, int arg)
                return -ENOSYS;
 
        if (set_pio_mode_abuse(drive->hwif, arg)) {
+               drive->pio_mode = arg + XFER_PIO_0;
+
                if (arg == 8 || arg == 9) {
                        unsigned long flags;
 
                        /* take lock for IDE_DFLAG_[NO_]UNMASK/[NO_]IO_32BIT */
                        spin_lock_irqsave(&hwif->lock, flags);
-                       port_ops->set_pio_mode(drive, arg);
+                       port_ops->set_pio_mode(hwif, drive);
                        spin_unlock_irqrestore(&hwif->lock, flags);
                } else
-                       port_ops->set_pio_mode(drive, arg);
+                       port_ops->set_pio_mode(hwif, drive);
        } else {
                int keep_dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);