diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index e69f3df2ea39..3771eb83875f 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1433,16 +1433,38 @@ static void ata_eh_report(struct ata_port *ap) | |||
1433 | } | 1433 | } |
1434 | 1434 | ||
1435 | for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { | 1435 | for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { |
1436 | static const char *dma_str[] = { | ||
1437 | [DMA_BIDIRECTIONAL] = "bidi", | ||
1438 | [DMA_TO_DEVICE] = "out", | ||
1439 | [DMA_FROM_DEVICE] = "in", | ||
1440 | [DMA_NONE] = "", | ||
1441 | }; | ||
1436 | struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); | 1442 | struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); |
1443 | struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; | ||
1444 | unsigned int nbytes; | ||
1437 | 1445 | ||
1438 | if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) | 1446 | if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) |
1439 | continue; | 1447 | continue; |
1440 | 1448 | ||
1441 | ata_dev_printk(qc->dev, KERN_ERR, "tag %d cmd 0x%x " | 1449 | nbytes = qc->nbytes; |
1442 | "Emask 0x%x stat 0x%x err 0x%x (%s)\n", | 1450 | if (!nbytes) |
1443 | qc->tag, qc->tf.command, qc->err_mask, | 1451 | nbytes = qc->nsect << 9; |
1444 | qc->result_tf.command, qc->result_tf.feature, | 1452 | |
1445 | ata_err_string(qc->err_mask)); | 1453 | ata_dev_printk(qc->dev, KERN_ERR, |
1454 | "cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " | ||
1455 | "tag %d data %u %s\n " | ||
1456 | "res %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " | ||
1457 | "Emask 0x%x (%s)\n", | ||
1458 | cmd->command, cmd->feature, cmd->nsect, | ||
1459 | cmd->lbal, cmd->lbam, cmd->lbah, | ||
1460 | cmd->hob_feature, cmd->hob_nsect, | ||
1461 | cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah, | ||
1462 | cmd->device, qc->tag, nbytes, dma_str[qc->dma_dir], | ||
1463 | res->command, res->feature, res->nsect, | ||
1464 | res->lbal, res->lbam, res->lbah, | ||
1465 | res->hob_feature, res->hob_nsect, | ||
1466 | res->hob_lbal, res->hob_lbam, res->hob_lbah, | ||
1467 | res->device, qc->err_mask, ata_err_string(qc->err_mask)); | ||
1446 | } | 1468 | } |
1447 | } | 1469 | } |
1448 | 1470 | ||