aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index adbe9f76a505..8ccee9c769f8 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -588,7 +588,7 @@ static int idefloppy_do_end_request(ide_drive_t *drive, int uptodate, int nsecs)
588 /* Why does this happen? */ 588 /* Why does this happen? */
589 if (!rq) 589 if (!rq)
590 return 0; 590 return 0;
591 if (!(rq->flags & REQ_SPECIAL)) { //if (!IDEFLOPPY_RQ_CMD (rq->cmd)) { 591 if (!blk_special_request(rq)) {
592 /* our real local end request function */ 592 /* our real local end request function */
593 ide_end_request(drive, uptodate, nsecs); 593 ide_end_request(drive, uptodate, nsecs);
594 return 0; 594 return 0;
@@ -689,7 +689,7 @@ static void idefloppy_queue_pc_head (ide_drive_t *drive,idefloppy_pc_t *pc,struc
689 689
690 ide_init_drive_cmd(rq); 690 ide_init_drive_cmd(rq);
691 rq->buffer = (char *) pc; 691 rq->buffer = (char *) pc;
692 rq->flags = REQ_SPECIAL; //rq->cmd = IDEFLOPPY_PC_RQ; 692 rq->cmd_type = REQ_TYPE_SPECIAL;
693 rq->rq_disk = floppy->disk; 693 rq->rq_disk = floppy->disk;
694 (void) ide_do_drive_cmd(drive, rq, ide_preempt); 694 (void) ide_do_drive_cmd(drive, rq, ide_preempt);
695} 695}
@@ -1250,7 +1250,7 @@ static void idefloppy_create_rw_cmd (idefloppy_floppy_t *floppy, idefloppy_pc_t
1250 pc->callback = &idefloppy_rw_callback; 1250 pc->callback = &idefloppy_rw_callback;
1251 pc->rq = rq; 1251 pc->rq = rq;
1252 pc->b_count = cmd == READ ? 0 : rq->bio->bi_size; 1252 pc->b_count = cmd == READ ? 0 : rq->bio->bi_size;
1253 if (rq->flags & REQ_RW) 1253 if (rq->cmd_flags & REQ_RW)
1254 set_bit(PC_WRITING, &pc->flags); 1254 set_bit(PC_WRITING, &pc->flags);
1255 pc->buffer = NULL; 1255 pc->buffer = NULL;
1256 pc->request_transfer = pc->buffer_size = blocks * floppy->block_size; 1256 pc->request_transfer = pc->buffer_size = blocks * floppy->block_size;
@@ -1281,8 +1281,7 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
1281 idefloppy_pc_t *pc; 1281 idefloppy_pc_t *pc;
1282 unsigned long block = (unsigned long)block_s; 1282 unsigned long block = (unsigned long)block_s;
1283 1283
1284 debug_log(KERN_INFO "rq_status: %d, dev: %s, flags: %lx, errors: %d\n", 1284 debug_log(KERN_INFO "dev: %s, flags: %lx, errors: %d\n",
1285 rq->rq_status,
1286 rq->rq_disk ? rq->rq_disk->disk_name : "?", 1285 rq->rq_disk ? rq->rq_disk->disk_name : "?",
1287 rq->flags, rq->errors); 1286 rq->flags, rq->errors);
1288 debug_log(KERN_INFO "sector: %ld, nr_sectors: %ld, " 1287 debug_log(KERN_INFO "sector: %ld, nr_sectors: %ld, "
@@ -1303,7 +1302,7 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
1303 idefloppy_do_end_request(drive, 0, 0); 1302 idefloppy_do_end_request(drive, 0, 0);
1304 return ide_stopped; 1303 return ide_stopped;
1305 } 1304 }
1306 if (rq->flags & REQ_CMD) { 1305 if (blk_fs_request(rq)) {
1307 if (((long)rq->sector % floppy->bs_factor) || 1306 if (((long)rq->sector % floppy->bs_factor) ||
1308 (rq->nr_sectors % floppy->bs_factor)) { 1307 (rq->nr_sectors % floppy->bs_factor)) {
1309 printk("%s: unsupported r/w request size\n", 1308 printk("%s: unsupported r/w request size\n",
@@ -1313,9 +1312,9 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
1313 } 1312 }
1314 pc = idefloppy_next_pc_storage(drive); 1313 pc = idefloppy_next_pc_storage(drive);
1315 idefloppy_create_rw_cmd(floppy, pc, rq, block); 1314 idefloppy_create_rw_cmd(floppy, pc, rq, block);
1316 } else if (rq->flags & REQ_SPECIAL) { 1315 } else if (blk_special_request(rq)) {
1317 pc = (idefloppy_pc_t *) rq->buffer; 1316 pc = (idefloppy_pc_t *) rq->buffer;
1318 } else if (rq->flags & REQ_BLOCK_PC) { 1317 } else if (blk_pc_request(rq)) {
1319 pc = idefloppy_next_pc_storage(drive); 1318 pc = idefloppy_next_pc_storage(drive);
1320 if (idefloppy_blockpc_cmd(floppy, pc, rq)) { 1319 if (idefloppy_blockpc_cmd(floppy, pc, rq)) {
1321 idefloppy_do_end_request(drive, 0, 0); 1320 idefloppy_do_end_request(drive, 0, 0);
@@ -1343,7 +1342,7 @@ static int idefloppy_queue_pc_tail (ide_drive_t *drive,idefloppy_pc_t *pc)
1343 1342
1344 ide_init_drive_cmd (&rq); 1343 ide_init_drive_cmd (&rq);
1345 rq.buffer = (char *) pc; 1344 rq.buffer = (char *) pc;
1346 rq.flags = REQ_SPECIAL; // rq.cmd = IDEFLOPPY_PC_RQ; 1345 rq.cmd_type = REQ_TYPE_SPECIAL;
1347 rq.rq_disk = floppy->disk; 1346 rq.rq_disk = floppy->disk;
1348 1347
1349 return ide_do_drive_cmd(drive, &rq, ide_wait); 1348 return ide_do_drive_cmd(drive, &rq, ide_wait);