diff options
author | msmith <msmith@FreeBSD.org> | 2002-03-07 09:55:41 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2002-03-07 09:55:41 +0000 |
commit | eea0ae24b995a9c7c9132c8ed91df3e2f640ef18 (patch) | |
tree | aacb41e66b3d51310841948ae91276de9e3db52f /sys/dev/twe/twereg.h | |
parent | 955b896bbcf515a09eb75d0fc1b6d859e8c39f8e (diff) | |
download | FreeBSD-src-eea0ae24b995a9c7c9132c8ed91df3e2f640ef18.zip FreeBSD-src-eea0ae24b995a9c7c9132c8ed91df3e2f640ef18.tar.gz |
Update for the 6.9 firmware family (6xxx controllers), as well as for
the upcoming 7.4 family (7xxx controllers).
- improved error reporting and handling
- more diagnostic output
- add extra command packet definitions
- merge sources again with -stable
Diffstat (limited to 'sys/dev/twe/twereg.h')
-rw-r--r-- | sys/dev/twe/twereg.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/dev/twe/twereg.h b/sys/dev/twe/twereg.h index e7136df..12ce0d6 100644 --- a/sys/dev/twe/twereg.h +++ b/sys/dev/twe/twereg.h @@ -47,6 +47,8 @@ #define TWE_CONTROL_ENABLE_INTERRUPTS 0x00000080 #define TWE_CONTROL_DISABLE_INTERRUPTS 0x00000040 #define TWE_CONTROL_ISSUE_HOST_INTERRUPT 0x00000020 +#define TWE_CONTROL_CLEAR_PARITY_ERROR 0x00800000 +#define TWE_CONTROL_CLEAR_PCI_ABORT 0x00100000 #define TWE_SOFT_RESET(sc) TWE_CONTROL(sc, TWE_CONTROL_ISSUE_SOFT_RESET | \ TWE_CONTROL_CLEAR_HOST_INTERRUPT | \ @@ -100,6 +102,8 @@ #define TWE_VENDOR_ID 0x13C1 #define TWE_DEVICE_ID 0x1000 #define TWE_DEVICE_ID_ASIC 0x1001 +#define TWE_PCI_CLEAR_PARITY_ERROR 0xc100 +#define TWE_PCI_CLEAR_PCI_ABORT 0x2000 /* command packet opcodes */ #define TWE_OP_NOP 0x00 @@ -123,6 +127,8 @@ #define TWE_OP_SECTOR_INFO 0x1a #define TWE_OP_AEN_LISTEN 0x1c #define TWE_OP_CMD_PACKET 0x1d +#define TWE_OP_ATA_PASSTHROUGH 0x1e +#define TWE_OP_CMD_WITH_DATA 0x1f /* command status values */ #define TWE_STATUS_RESET 0xff /* controller requests reset */ @@ -138,6 +144,8 @@ #define TWE_SHUTDOWN_MESSAGE_CREDITS 0x001 #define TWE_INIT_COMMAND_PACKET_SIZE 0x3 #define TWE_MAX_SGL_LENGTH 62 +#define TWE_MAX_ATA_SGL_LENGTH 60 +#define TWE_MAX_PASSTHROUGH 4096 #define TWE_Q_LENGTH TWE_INIT_MESSAGE_CREDITS #define TWE_Q_START 0 #define TWE_MAX_RESET_TRIES 3 @@ -272,6 +280,26 @@ typedef struct u_int8_t unit:4; u_int8_t host_id:4; u_int8_t status; + u_int16_t param; + u_int16_t features; + u_int16_t sector_count; + u_int16_t sector_num; + u_int16_t cylinder_lo; + u_int16_t cylinder_hi; + u_int8_t drive_head; + u_int8_t command; + TWE_SG_Entry sgl[TWE_MAX_ATA_SGL_LENGTH]; +} TWE_Command_ATA __attribute__ ((packed)); + +typedef struct +{ + u_int8_t opcode:5; + u_int8_t sgl_offset:3; + u_int8_t size; + u_int8_t request_id; + u_int8_t unit:4; + u_int8_t host_id:4; + u_int8_t status; u_int8_t flags; #define TWE_FLAGS_SUCCESS 0x00 #define TWE_FLAGS_INFORMATIONAL 0x01 @@ -290,6 +318,7 @@ typedef union TWE_Command_CHECKSTATUS checkstatus; TWE_Command_REBUILDUNIT rebuildunit; TWE_Command_SETATAFEATURE setatafeature; + TWE_Command_ATA ata; TWE_Command_Generic generic; u_int8_t pad[512]; } TWE_Command; @@ -460,3 +489,4 @@ typedef struct u_int8_t parameter_size_bytes; u_int8_t data[0]; } TWE_Param __attribute__ ((packed)); + |