summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-26 22:54:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-26 22:54:32 -0800
commit1c7c2cdec3a6b2873439096983794a550d7ff65b (patch)
tree10ea67846407e9882d50e95a9db675140dd423eb /drivers/ide/ide-lib.c
parent0444fa78751260b38f0db3418e001bf86593f05f (diff)
parent7267c3377443322588cddaf457cf106839a60463 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (63 commits) ide: remove REQ_TYPE_ATA_CMD ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests ide: fix final status check in drive_cmd_intr() ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr() ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2) ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE ide: initialize rq->cmd_type in ide_init_drive_cmd() callers ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2) ide: kill DATA_READY define ide: task_end_request() fix ide: use rq->nr_sectors in task_end_request() ide: remove needless ->cursg clearing from task_end_request() ide: set IDE_TFLAG_IN_* flags before queuing/executing command ide-tape: fix handling of non-special requests in ->end_request method ide: fix final status check in task_in_intr() ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd() ide: fix ->io_32bit race in ide_taskfile_ioctl() cmd64x: remove /proc/ide/cmd64x ide: remove broken disk byte-swapping support ...
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)
static void ide_dump_opcode(ide_drive_t *drive)
{
struct request *rq;
- u8 opcode = 0;
- int found = 0;
+ ide_task_t *task = NULL;
spin_lock(&ide_lock);
rq = NULL;
@@ -464,25 +463,15 @@ static void ide_dump_opcode(ide_drive_t *drive)
spin_unlock(&ide_lock);
if (!rq)
return;
- if (rq->cmd_type == REQ_TYPE_ATA_CMD) {
- char *args = rq->buffer;
- if (args) {
- opcode = args[0];
- found = 1;
- }
- } else if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
- ide_task_t *args = rq->special;
- if (args) {
- opcode = args->tf.command;
- found = 1;
- }
- }
+
+ if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
+ task = rq->special;
printk("ide: failed opcode was: ");
- if (!found)
- printk("unknown\n");
+ if (task == NULL)
+ printk(KERN_CONT "unknown\n");
else
- printk("0x%02x\n", opcode);
+ printk(KERN_CONT "0x%02x\n", task->tf.command);
}
u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48)