Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[safe/jmp/linux-2.6] / drivers / ide / ide-floppy.c
index 800c83a..4713bdc 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/major.h>
 #include <linux/errno.h>
 #include <linux/genhd.h>
-#include <linux/slab.h>
 #include <linux/cdrom.h>
 #include <linux/ide.h>
 #include <linux/hdreg.h>
@@ -269,10 +268,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
        } else if (blk_pc_request(rq)) {
                pc = &floppy->queued_pc;
                idefloppy_blockpc_cmd(floppy, pc, rq);
-       } else {
-               blk_dump_rq_flags(rq, PFX "unsupported command in queue");
-               goto out_end;
-       }
+       } else
+               BUG();
 
        ide_prep_sense(drive, rq);
 
@@ -295,7 +292,7 @@ out_end:
        drive->failed_pc = NULL;
        if (blk_fs_request(rq) == 0 && rq->errors == 0)
                rq->errors = -EIO;
-       ide_complete_rq(drive, -EIO, ide_rq_bytes(rq));
+       ide_complete_rq(drive, -EIO, blk_rq_bytes(rq));
        return ide_stopped;
 }
 
@@ -488,7 +485,7 @@ static void ide_floppy_setup(ide_drive_t *drive)
                drive->atapi_flags |= IDE_AFLAG_ZIP_DRIVE;
                /* This value will be visible in the /proc/ide/hdx/settings */
                drive->pc_delay = IDEFLOPPY_PC_DELAY;
-               blk_queue_max_sectors(drive->queue, 64);
+               blk_queue_max_hw_sectors(drive->queue, 64);
        }
 
        /*
@@ -496,7 +493,7 @@ static void ide_floppy_setup(ide_drive_t *drive)
         * nasty clicking noises without it, so please don't remove this.
         */
        if (strncmp((char *)&id[ATA_ID_PROD], "IOMEGA Clik!", 11) == 0) {
-               blk_queue_max_sectors(drive->queue, 64);
+               blk_queue_max_hw_sectors(drive->queue, 64);
                drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE;
                /* IOMEGA Clik! drives do not support lock/unlock commands */
                drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;