diff options
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 25 |
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) | |||
454 | static void ide_dump_opcode(ide_drive_t *drive) | 454 | static 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 | ||
488 | u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48) | 477 | u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48) |