aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:13 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:13 -0500
commit7267c3377443322588cddaf457cf106839a60463 (patch)
tree5471cd70b6275999500103f0a6b49bbc5557c692 /drivers/ide/ide-lib.c
parent5a9e77af970f14a94482a6d4dca5c48efb70deb2 (diff)
ide: remove REQ_TYPE_ATA_CMD
Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index a3bd8e8ed6b0..9b44fbdfe41f 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -454,8 +454,7 @@ int ide_set_xfer_rate(ide_drive_t *drive, u8 rate)
454static void ide_dump_opcode(ide_drive_t *drive) 454static void ide_dump_opcode(ide_drive_t *drive)
455{ 455{
456 struct request *rq; 456 struct request *rq;
457 u8 opcode = 0; 457 ide_task_t *task = NULL;
458 int found = 0;
459 458
460 spin_lock(&ide_lock); 459 spin_lock(&ide_lock);
461 rq = NULL; 460 rq = NULL;
@@ -464,25 +463,15 @@ static void ide_dump_opcode(ide_drive_t *drive)
464 spin_unlock(&ide_lock); 463 spin_unlock(&ide_lock);
465 if (!rq) 464 if (!rq)
466 return; 465 return;
467 if (rq->cmd_type == REQ_TYPE_ATA_CMD) { 466
468 char *args = rq->buffer; 467 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
469 if (args) { 468 task = rq->special;
470 opcode = args[0];
471 found = 1;
472 }
473 } else if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
474 ide_task_t *args = rq->special;
475 if (args) {
476 opcode = args->tf.command;
477 found = 1;
478 }
479 }
480 469
481 printk("ide: failed opcode was: "); 470 printk("ide: failed opcode was: ");
482 if (!found) 471 if (task == NULL)
483 printk("unknown\n"); 472 printk(KERN_CONT "unknown\n");
484 else 473 else
485 printk("0x%02x\n", opcode); 474 printk(KERN_CONT "0x%02x\n", task->tf.command);
486} 475}
487 476
488u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48) 477u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48)