aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-05-22 14:28:35 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-22 14:28:35 -0400
commit9bd7de51ee8537094656149eaf45338cadb7d7d4 (patch)
treea691987319dfcdb07de2bce619746f88d26882c4 /drivers/ide/ide-lib.c
parente4b636366c00738b9609cda307014d71b1225b7f (diff)
parent6a44587ee716ac911082cbdec766e5b3f051c071 (diff)
Merge branch 'master' into for-2.6.31
Conflicts: drivers/ide/ide-io.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 05b7fbc7ead5..e386a32dc9ba 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -31,24 +31,6 @@ void ide_toggle_bounce(ide_drive_t *drive, int on)
31 blk_queue_bounce_limit(drive->queue, addr); 31 blk_queue_bounce_limit(drive->queue, addr);
32} 32}
33 33
34static void ide_dump_opcode(ide_drive_t *drive)
35{
36 struct request *rq = drive->hwif->rq;
37 struct ide_cmd *cmd = NULL;
38
39 if (!rq)
40 return;
41
42 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
43 cmd = rq->special;
44
45 printk(KERN_ERR "ide: failed opcode was: ");
46 if (cmd == NULL)
47 printk(KERN_CONT "unknown\n");
48 else
49 printk(KERN_CONT "0x%02x\n", cmd->tf.command);
50}
51
52u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) 34u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48)
53{ 35{
54 struct ide_taskfile *tf = &cmd->tf; 36 struct ide_taskfile *tf = &cmd->tf;
@@ -91,7 +73,7 @@ static void ide_dump_sector(ide_drive_t *drive)
91 73
92static void ide_dump_ata_error(ide_drive_t *drive, u8 err) 74static void ide_dump_ata_error(ide_drive_t *drive, u8 err)
93{ 75{
94 printk(KERN_ERR "{ "); 76 printk(KERN_CONT "{ ");
95 if (err & ATA_ABORTED) 77 if (err & ATA_ABORTED)
96 printk(KERN_CONT "DriveStatusError "); 78 printk(KERN_CONT "DriveStatusError ");
97 if (err & ATA_ICRC) 79 if (err & ATA_ICRC)
@@ -121,7 +103,7 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err)
121 103
122static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) 104static void ide_dump_atapi_error(ide_drive_t *drive, u8 err)
123{ 105{
124 printk(KERN_ERR "{ "); 106 printk(KERN_CONT "{ ");
125 if (err & ATAPI_ILI) 107 if (err & ATAPI_ILI)
126 printk(KERN_CONT "IllegalLengthIndication "); 108 printk(KERN_CONT "IllegalLengthIndication ");
127 if (err & ATAPI_EOM) 109 if (err & ATAPI_EOM)
@@ -179,7 +161,10 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat)
179 else 161 else
180 ide_dump_atapi_error(drive, err); 162 ide_dump_atapi_error(drive, err);
181 } 163 }
182 ide_dump_opcode(drive); 164
165 printk(KERN_ERR "%s: possibly failed opcode: 0x%02x\n",
166 drive->name, drive->hwif->cmd.tf.command);
167
183 return err; 168 return err;
184} 169}
185EXPORT_SYMBOL(ide_dump_status); 170EXPORT_SYMBOL(ide_dump_status);