diff options
Diffstat (limited to 'drivers/scsi/esp_scsi.h')
-rw-r--r-- | drivers/scsi/esp_scsi.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h index cd68805e8d78..84dcbe4a6268 100644 --- a/drivers/scsi/esp_scsi.h +++ b/drivers/scsi/esp_scsi.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* esp_scsi.h: Defines and structures for the ESP drier. | 1 | /* esp_scsi.h: Defines and structures for the ESP driver. |
2 | * | 2 | * |
3 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
@@ -25,6 +25,7 @@ | |||
25 | #define ESP_CTEST 0x0aUL /* wo Chip test register 0x28 */ | 25 | #define ESP_CTEST 0x0aUL /* wo Chip test register 0x28 */ |
26 | #define ESP_CFG2 0x0bUL /* rw Second cfg register 0x2c */ | 26 | #define ESP_CFG2 0x0bUL /* rw Second cfg register 0x2c */ |
27 | #define ESP_CFG3 0x0cUL /* rw Third cfg register 0x30 */ | 27 | #define ESP_CFG3 0x0cUL /* rw Third cfg register 0x30 */ |
28 | #define ESP_CFG4 0x0dUL /* rw Fourth cfg register 0x34 */ | ||
28 | #define ESP_TCHI 0x0eUL /* rw High bits transf count 0x38 */ | 29 | #define ESP_TCHI 0x0eUL /* rw High bits transf count 0x38 */ |
29 | #define ESP_UID ESP_TCHI /* ro Unique ID code 0x38 */ | 30 | #define ESP_UID ESP_TCHI /* ro Unique ID code 0x38 */ |
30 | #define FAS_RLO ESP_TCHI /* rw HME extended counter 0x38 */ | 31 | #define FAS_RLO ESP_TCHI /* rw HME extended counter 0x38 */ |
@@ -76,6 +77,18 @@ | |||
76 | #define ESP_CONFIG3_IMS 0x80 /* ID msg chk'ng (esp/fas236) */ | 77 | #define ESP_CONFIG3_IMS 0x80 /* ID msg chk'ng (esp/fas236) */ |
77 | #define ESP_CONFIG3_OBPUSH 0x80 /* Push odd-byte to dma (hme) */ | 78 | #define ESP_CONFIG3_OBPUSH 0x80 /* Push odd-byte to dma (hme) */ |
78 | 79 | ||
80 | /* ESP config register 4 read-write, found only on am53c974 chips */ | ||
81 | #define ESP_CONFIG4_RADE 0x04 /* Active negation */ | ||
82 | #define ESP_CONFIG4_RAE 0x08 /* Active negation on REQ and ACK */ | ||
83 | #define ESP_CONFIG4_PWD 0x20 /* Reduced power feature */ | ||
84 | #define ESP_CONFIG4_GE0 0x40 /* Glitch eater bit 0 */ | ||
85 | #define ESP_CONFIG4_GE1 0x80 /* Glitch eater bit 1 */ | ||
86 | |||
87 | #define ESP_CONFIG_GE_12NS (0) | ||
88 | #define ESP_CONFIG_GE_25NS (ESP_CONFIG_GE1) | ||
89 | #define ESP_CONFIG_GE_35NS (ESP_CONFIG_GE0) | ||
90 | #define ESP_CONFIG_GE_0NS (ESP_CONFIG_GE0 | ESP_CONFIG_GE1) | ||
91 | |||
79 | /* ESP command register read-write */ | 92 | /* ESP command register read-write */ |
80 | /* Group 1 commands: These may be sent at any point in time to the ESP | 93 | /* Group 1 commands: These may be sent at any point in time to the ESP |
81 | * chip. None of them can generate interrupts 'cept | 94 | * chip. None of them can generate interrupts 'cept |
@@ -254,6 +267,7 @@ enum esp_rev { | |||
254 | FAS100A = 0x04, | 267 | FAS100A = 0x04, |
255 | FAST = 0x05, | 268 | FAST = 0x05, |
256 | FASHME = 0x06, | 269 | FASHME = 0x06, |
270 | PCSCSI = 0x07, /* AM53c974 */ | ||
257 | }; | 271 | }; |
258 | 272 | ||
259 | struct esp_cmd_entry { | 273 | struct esp_cmd_entry { |
@@ -269,6 +283,7 @@ struct esp_cmd_entry { | |||
269 | #define ESP_CMD_FLAG_WRITE 0x01 /* DMA is a write */ | 283 | #define ESP_CMD_FLAG_WRITE 0x01 /* DMA is a write */ |
270 | #define ESP_CMD_FLAG_ABORT 0x02 /* being aborted */ | 284 | #define ESP_CMD_FLAG_ABORT 0x02 /* being aborted */ |
271 | #define ESP_CMD_FLAG_AUTOSENSE 0x04 /* Doing automatic REQUEST_SENSE */ | 285 | #define ESP_CMD_FLAG_AUTOSENSE 0x04 /* Doing automatic REQUEST_SENSE */ |
286 | #define ESP_CMD_FLAG_RESIDUAL 0x08 /* AM53c974 BLAST residual */ | ||
272 | 287 | ||
273 | u8 tag[2]; | 288 | u8 tag[2]; |
274 | u8 orig_tag[2]; | 289 | u8 orig_tag[2]; |
@@ -283,7 +298,6 @@ struct esp_cmd_entry { | |||
283 | struct completion *eh_done; | 298 | struct completion *eh_done; |
284 | }; | 299 | }; |
285 | 300 | ||
286 | /* XXX make this configurable somehow XXX */ | ||
287 | #define ESP_DEFAULT_TAGS 16 | 301 | #define ESP_DEFAULT_TAGS 16 |
288 | 302 | ||
289 | #define ESP_MAX_TARGET 16 | 303 | #define ESP_MAX_TARGET 16 |
@@ -445,7 +459,7 @@ struct esp { | |||
445 | u8 prev_soff; | 459 | u8 prev_soff; |
446 | u8 prev_stp; | 460 | u8 prev_stp; |
447 | u8 prev_cfg3; | 461 | u8 prev_cfg3; |
448 | u8 __pad; | 462 | u8 num_tags; |
449 | 463 | ||
450 | struct list_head esp_cmd_pool; | 464 | struct list_head esp_cmd_pool; |
451 | 465 | ||
@@ -466,6 +480,7 @@ struct esp { | |||
466 | u8 bursts; | 480 | u8 bursts; |
467 | u8 config1; | 481 | u8 config1; |
468 | u8 config2; | 482 | u8 config2; |
483 | u8 config4; | ||
469 | 484 | ||
470 | u8 scsi_id; | 485 | u8 scsi_id; |
471 | u32 scsi_id_mask; | 486 | u32 scsi_id_mask; |
@@ -479,6 +494,7 @@ struct esp { | |||
479 | #define ESP_FLAG_WIDE_CAPABLE 0x00000008 | 494 | #define ESP_FLAG_WIDE_CAPABLE 0x00000008 |
480 | #define ESP_FLAG_QUICKIRQ_CHECK 0x00000010 | 495 | #define ESP_FLAG_QUICKIRQ_CHECK 0x00000010 |
481 | #define ESP_FLAG_DISABLE_SYNC 0x00000020 | 496 | #define ESP_FLAG_DISABLE_SYNC 0x00000020 |
497 | #define ESP_FLAG_USE_FIFO 0x00000040 | ||
482 | 498 | ||
483 | u8 select_state; | 499 | u8 select_state; |
484 | #define ESP_SELECT_NONE 0x00 /* Not selecting */ | 500 | #define ESP_SELECT_NONE 0x00 /* Not selecting */ |