From 7fd6875fc53b4f3ea6d0600018b39f34c8e297b0 Mon Sep 17 00:00:00 2001 From: Remko Lodder Date: Sat, 27 Jan 2007 21:15:59 +0000 Subject: [PATCH] Add the SMART command to the ATA instruction set. When the disk has an error, it will now print SMART instead of 'Unknown CMD'. PR: kern/93368 Submitted by: Garry Belka Approved by: sos --- sys/dev/ata/ata-queue.c | 1 + sys/sys/ata.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index f9ba4cb39b87..3649a26497ce 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -704,6 +704,7 @@ ata_cmd2str(struct ata_request *request) case 0xa0: return ("PACKET_CMD"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); + case 0xb0: return ("SMART"); case 0xc0: return ("CFA ERASE"); case 0xc4: return ("READ_MUL"); case 0xc5: return ("WRITE_MUL"); diff --git a/sys/sys/ata.h b/sys/sys/ata.h index 36f2558b9254..43b8e837461f 100644 --- a/sys/sys/ata.h +++ b/sys/sys/ata.h @@ -243,6 +243,7 @@ struct ata_params { #define ATA_PACKET_CMD 0xa0 /* packet command */ #define ATA_ATAPI_IDENTIFY 0xa1 /* get ATAPI params*/ #define ATA_SERVICE 0xa2 /* service command */ +#define ATA_SMART_CMD 0xb0 /* SMART command */ #define ATA_CFA_ERASE 0xc0 /* CFA erase */ #define ATA_READ_MUL 0xc4 /* read multi */ #define ATA_WRITE_MUL 0xc5 /* write multi */