diff options
author | Harry Zhang <harry.zhang@amd.com> | 2010-04-23 05:28:38 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-14 17:35:51 -0400 |
commit | c06231661e4fb5f2f50c73ff33702937a11764cf (patch) | |
tree | e82300639ad09429fb3a6881bb6985363dd9ddbe /drivers/ata/ahci.h | |
parent | 008dbd61ebee3e647f63bbe8315192e1331cd75f (diff) |
ahci: add "em_buffer" attribute for AHCI hosts
Add "em_buffer" attribute for SATA AHCI hosts to provide a way for
userland to access AHCI EM (enclosure management) buffer directly if the
host supports EM.
AHCI driver should support SGPIO EM messages. However the SATA/AHCI
specs did not define the SGPIO message format filled in EM buffer.
Different HW vendors may have different definitions. The mainly purpose
of this attribute is to solve this issue by allowing HW vendors to
provide userland drivers and tools for their SGPIO initiators.
Signed-off-by: Harry Zhang <harry.zhang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/ahci.h')
-rw-r--r-- | drivers/ata/ahci.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 5edce4447d84..7113c5724471 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
@@ -224,9 +224,12 @@ enum { | |||
224 | EM_MAX_RETRY = 5, | 224 | EM_MAX_RETRY = 5, |
225 | 225 | ||
226 | /* em_ctl bits */ | 226 | /* em_ctl bits */ |
227 | EM_CTL_RST = (1 << 9), /* Reset */ | 227 | EM_CTL_RST = (1 << 9), /* Reset */ |
228 | EM_CTL_TM = (1 << 8), /* Transmit Message */ | 228 | EM_CTL_TM = (1 << 8), /* Transmit Message */ |
229 | EM_CTL_ALHD = (1 << 26), /* Activity LED */ | 229 | EM_CTL_MR = (1 << 0), /* Message Recieved */ |
230 | EM_CTL_ALHD = (1 << 26), /* Activity LED */ | ||
231 | EM_CTL_XMT = (1 << 25), /* Transmit Only */ | ||
232 | EM_CTL_SMB = (1 << 24), /* Single Message Buffer */ | ||
230 | 233 | ||
231 | /* em message type */ | 234 | /* em message type */ |
232 | EM_MSG_TYPE_LED = (1 << 0), /* LED */ | 235 | EM_MSG_TYPE_LED = (1 << 0), /* LED */ |
@@ -288,6 +291,7 @@ struct ahci_host_priv { | |||
288 | u32 saved_cap2; /* saved initial cap2 */ | 291 | u32 saved_cap2; /* saved initial cap2 */ |
289 | u32 saved_port_map; /* saved initial port_map */ | 292 | u32 saved_port_map; /* saved initial port_map */ |
290 | u32 em_loc; /* enclosure management location */ | 293 | u32 em_loc; /* enclosure management location */ |
294 | u32 em_buf_sz; /* EM buffer size in byte */ | ||
291 | u32 em_msg_type; /* EM message type */ | 295 | u32 em_msg_type; /* EM message type */ |
292 | }; | 296 | }; |
293 | 297 | ||