lkml.org 
[lkml]   [2004]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] WIN_* -> ATA_CMD_* conversion: add new entries to ata.h
Jeff Garzik wrote:
> Chris Wedgwood wrote:
>
>> ===== include/linux/ata.h 1.19 vs edited =====
>> --- 1.19/include/linux/ata.h 2004-11-02 11:32:44 -08:00
>> +++ edited/include/linux/ata.h 2004-11-05 19:04:41 -08:00
>> @@ -122,6 +122,27 @@
>> ATA_CMD_SET_FEATURES = 0xEF,
>> ATA_CMD_PACKET = 0xA0,
>>
>> + /* ATA devices commands (used by legacy IDE code) */
>> + ATA_CMD_NOP = 0x00,
>> + ATA_CMD_SRST = 0x08,
>> + ATA_CMD_RESTORE = 0x10,
>> + ATA_CMD_MULTREAD_EXT = 0x29,
>> + ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
>> + ATA_CMD_MULTWRITE_EXT = 0x39,
>> + ATA_CMD_SPECIFY = 0x91, /* set geom */
>> + ATA_CMD_SMART = 0xB0,
>> + ATA_CMD_MULTREAD = 0xC4,
>> + ATA_CMD_MULTWRITE = 0xC5,
>> + ATA_CMD_MULTSET = 0xC6,
>> + ATA_CMD_DOORLOCK = 0xDE,
>> + ATA_CMD_DOORUNLOCK = 0xDF,
>> + ATA_CMD_STANDBYNOW1 = 0xE0,
>> + ATA_CMD_IDLEIMMEDIATE = 0xE1,
>> + ATA_CMD_ID_ATA_DMA = 0xEE,
>> + ATA_CMD_READ_NATIVE_MAX = 0xF8,
>> + ATA_CMD_SET_MAX = 0xF9,
>> + ATA_CMD_SET_MAX_EXT = 0x37,

oh, also:

Please check with ATA/ATAPI-7 command names, rather than just using the
WIN_xxx names with a new prefix. Sometimes the IDE author (from ages
past) would pick names that suited them or the code, but diverged from
the common T13 command name.

Examples:
1) WIN_DIAGNOSE -> ATA_CMD_EDD
2) WIN_QUEUED_SERVICE -> ATA_CMD_SERVICE
3) WIN_STANDBYNOW1 -> ATA_CMD_STANDBY_IMMED
4) WIN_SETIDLE1 -> ATA_CMD_IDLE
5) WIN_CHECKPOWERMODE1 -> ATA_CMD_CHK_PWR_MODE
6) WIN_SLEEPNOW1 -> ATA_CMD_SLEEP
7) some are old ATA-2-era commands, some are vendor-specific commands.
Not much you can do about the naming of these.
8) remove all xxx_ONCE that are not used
9) hdreg.h lists commands in opcode value order
10) Kill WIN_SRST (dups properly named WIN_DEVICE_RESET)

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.313 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site