summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-12-15 20:43:17 +0000
committersos <sos@FreeBSD.org>2003-12-15 20:43:17 +0000
commita1979e4f7e164437f89f892976c3a660e1ffcfc4 (patch)
treeb6820e3db218db5f8a2282291af4d7c81cf0ae16 /sys/dev/ata
parent21f25335e6605ad9cc191b3e5de3fb45e39ed973 (diff)
downloadFreeBSD-src-a1979e4f7e164437f89f892976c3a660e1ffcfc4.zip
FreeBSD-src-a1979e4f7e164437f89f892976c3a660e1ffcfc4.tar.gz
Print the LBA on failing R/W commands.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-queue.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index fbf1a72..62b9cfc 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -247,11 +247,13 @@ ata_completed(void *context, int pending)
request->error, "\20\10ICRC\7UNCORRECTABLE"
"\6MEDIA_CHANGED\5NID_NOT_FOUND\4MEDIA_CHANGE_REQEST"
"\3ABORTED\2NO_MEDIA\1ILLEGAL_LENGTH");
- if (request->flags & ATA_R_DMA &&
- request->dmastat & ATA_BMSTAT_ERROR)
- printf(" dma=0x%02x\n", request->dmastat);
- else
- printf("\n");
+ if ((request->flags & ATA_R_DMA) &&
+ (request->dmastat & ATA_BMSTAT_ERROR))
+ printf(" dma=0x%02x", request->dmastat);
+ if (!(request->flags & ATA_R_ATAPI) &&
+ !(request->flags & ATA_R_CONTROL))
+ printf(" LBA=%lld", request->u.ata.lba);
+ printf("\n");
}
/* SOS this could be more precise ? XXX */
OpenPOWER on IntegriCloud