kern/159284: [ata] Update ATA command-to-string definitions

Jeremy Chadwick freebsd at jdc.parodius.com
Fri Jul 29 05:40:08 UTC 2011


>Number:         159284
>Category:       kern
>Synopsis:       [ata] Update ATA command-to-string definitions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 29 05:40:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Jun 25 20:56:03 PDT 2011 root at icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64
>Description:
	Update ata-queue.c to have knowledge of newer ATA commands and
	what their related titles/strings are per T13/1699-D Revision 6a
	working draft specification.

	While I'm here, change space to underscore on command 0xc0 (for
	consistency), and fix typo in command 0xf5 (FREEZE not FREE).

	Can probably kick this one over to mav@ for approve/reject.
>How-To-Repeat:
	n/a
>Fix:
	Apply below patch.  Intended for RELENG_8 source dated 2011/07/28.
	Patch will also be available on the web here once I get a PR number:

	http://jdc.parodius.com/freebsd/{PRnum}/


--- src/sys/dev/ata/ata-queue.c.orig	2010-05-02 05:40:54.000000000 -0700
+++ src/sys/dev/ata/ata-queue.c	2011-07-28 22:17:16.957972544 -0700
@@ -726,6 +726,7 @@
     else {
 	switch (request->u.ata.command) {
 	case 0x00: return ("NOP");
+	case 0x03: return ("CFA_REQUEST_EXTENDED_ERR");
 	case 0x08: return ("DEVICE_RESET");
 	case 0x20: return ("READ");
 	case 0x24: return ("READ48");
@@ -733,18 +734,43 @@
 	case 0x26: return ("READ_DMA_QUEUED48");
 	case 0x27: return ("READ_NATIVE_MAX_ADDRESS48");
 	case 0x29: return ("READ_MUL48");
+	case 0x2a: return ("READ_STREAM_DMA48");
+	case 0x2b: return ("READ_STREAM48");
+	case 0x2f: return ("READ_LOG48");
 	case 0x30: return ("WRITE");
 	case 0x34: return ("WRITE48");
 	case 0x35: return ("WRITE_DMA48");
 	case 0x36: return ("WRITE_DMA_QUEUED48");
 	case 0x37: return ("SET_MAX_ADDRESS48");
+	case 0x38: return ("CFA_WRITE_NO_ERASE");
 	case 0x39: return ("WRITE_MUL48");
+	case 0x3a: return ("WRITE_STREAM_DMA48");
+	case 0x3b: return ("WRITE_STREAM48");
+	case 0x3d: return ("WRITE_DMA_FUA48");
+	case 0x3e: return ("WRITE_DMA_QUEUED_FUA48");
+	case 0x3f: return ("WRITE_LOG48");
+	case 0x40: return ("READ_VERIFY");
+	case 0x42: return ("READ_VERIFY48");
+	case 0x45: return ("WRITE_UNCORRECTABLE48");
+	case 0x47: return ("READ_LOG_DMA48");
+	case 0x51: return ("CONFIGURE_STREAM");
+	case 0x57: return ("WRITE_LOG_DMA48");
+	case 0x5b: return ("TRUSTED_NONDATA");
+	case 0x5c: return ("TRUSTED_RECEIVE");
+	case 0x5d: return ("TRUSTED_RECEIVE_DMA");
+	case 0x5e: return ("TRUSTED_SEND");
+	case 0x5f: return ("TRUSTED_SEND_DMA");
+	case 0x60: return ("READ_FPDMA_QUEUED");
+	case 0x61: return ("WRITE_FPDMA_QUEUED");
 	case 0x70: return ("SEEK");
+	case 0x87: return ("CFA_TRANSLATE");
+	case 0x90: return ("EXEC_DEVICE_DIAGNOSTIC");
+	case 0x92: return ("DOWNLOAD_MICROCODE");
 	case 0xa0: return ("PACKET_CMD");
 	case 0xa1: return ("ATAPI_IDENTIFY");
 	case 0xa2: return ("SERVICE");
 	case 0xb0: return ("SMART");
-	case 0xc0: return ("CFA ERASE");
+	case 0xc0: return ("CFA_ERASE");
 	case 0xc4: return ("READ_MUL");
 	case 0xc5: return ("WRITE_MUL");
 	case 0xc6: return ("SET_MULTI");
@@ -752,8 +778,18 @@
 	case 0xc8: return ("READ_DMA");
 	case 0xca: return ("WRITE_DMA");
 	case 0xcc: return ("WRITE_DMA_QUEUED");
+	case 0xcd: return ("CFA_WRITE_MUL_NO_ERASE");
+	case 0xce: return ("WRITE_MUL_FUA48");
+	case 0xd1: return ("CHECK_MEDIA_CARD_TYPE");
+	case 0xe0: return ("STANDBY_IMMEDIATE");
+	case 0xe1: return ("IDLE_IMMEDIATE");
+	case 0xe2: return ("STANDBY");
+	case 0xe3: return ("IDLE");
+	case 0xe4: return ("READ_BUFFER");
+	case 0xe5: return ("CHECK_POWER_MODE");
 	case 0xe6: return ("SLEEP");
 	case 0xe7: return ("FLUSHCACHE");
+	case 0xe8: return ("WRITE_BUFFER");
 	case 0xea: return ("FLUSHCACHE48");
 	case 0xec: return ("ATA_IDENTIFY");
 	case 0xef:
@@ -766,7 +802,12 @@
 	    }
 	    sprintf(buffer, "SETFEATURES 0x%02x", request->u.ata.feature);
 	    return buffer;
-	case 0xf5: return ("SECURITY_FREE_LOCK");
+	case 0xf1: return ("SECURITY_SET_PASSWORD");
+	case 0xf2: return ("SECURITY_UNLOCK");
+	case 0xf3: return ("SECURITY_ERASE_PREPARE");
+	case 0xf4: return ("SECURITY_ERASE_UNIT");
+	case 0xf5: return ("SECURITY_FREEZE_LOCK");
+	case 0xf6: return ("SECURITY_DISABLE_PASSWORD");
 	case 0xf8: return ("READ_NATIVE_MAX_ADDRESS");
 	case 0xf9: return ("SET_MAX_ADDRESS");
 	}
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list