aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx.h')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h
index 653fb0b42aea..2cfdbef447db 100644
--- a/drivers/scsi/aic7xxx/aic79xx.h
+++ b/drivers/scsi/aic7xxx/aic79xx.h
@@ -37,7 +37,7 @@
37 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGES. 38 * POSSIBILITY OF SUCH DAMAGES.
39 * 39 *
40 * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#95 $ 40 * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#108 $
41 * 41 *
42 * $FreeBSD$ 42 * $FreeBSD$
43 */ 43 */
@@ -75,8 +75,7 @@ struct scb_platform_data;
75#define INITIATOR_WILDCARD (~0) 75#define INITIATOR_WILDCARD (~0)
76#define SCB_LIST_NULL 0xFF00 76#define SCB_LIST_NULL 0xFF00
77#define SCB_LIST_NULL_LE (ahd_htole16(SCB_LIST_NULL)) 77#define SCB_LIST_NULL_LE (ahd_htole16(SCB_LIST_NULL))
78#define QOUTFIFO_ENTRY_VALID 0x8000 78#define QOUTFIFO_ENTRY_VALID 0x80
79#define QOUTFIFO_ENTRY_VALID_LE (ahd_htole16(0x8000))
80#define SCBID_IS_NULL(scbid) (((scbid) & 0xFF00 ) == SCB_LIST_NULL) 79#define SCBID_IS_NULL(scbid) (((scbid) & 0xFF00 ) == SCB_LIST_NULL)
81 80
82#define SCSIID_TARGET(ahd, scsiid) \ 81#define SCSIID_TARGET(ahd, scsiid) \
@@ -1053,6 +1052,13 @@ typedef uint8_t ahd_mode_state;
1053 1052
1054typedef void ahd_callback_t (void *); 1053typedef void ahd_callback_t (void *);
1055 1054
1055struct ahd_completion
1056{
1057 uint16_t tag;
1058 uint8_t sg_status;
1059 uint8_t valid_tag;
1060};
1061
1056struct ahd_softc { 1062struct ahd_softc {
1057 bus_space_tag_t tags[2]; 1063 bus_space_tag_t tags[2];
1058 bus_space_handle_t bshs[2]; 1064 bus_space_handle_t bshs[2];
@@ -1062,6 +1068,7 @@ struct ahd_softc {
1062 struct scb_data scb_data; 1068 struct scb_data scb_data;
1063 1069
1064 struct hardware_scb *next_queued_hscb; 1070 struct hardware_scb *next_queued_hscb;
1071 struct map_node *next_queued_hscb_map;
1065 1072
1066 /* 1073 /*
1067 * SCBs that have been sent to the controller 1074 * SCBs that have been sent to the controller
@@ -1140,16 +1147,23 @@ struct ahd_softc {
1140 ahd_flag flags; 1147 ahd_flag flags;
1141 struct seeprom_config *seep_config; 1148 struct seeprom_config *seep_config;
1142 1149
1143 /* Values to store in the SEQCTL register for pause and unpause */
1144 uint8_t unpause;
1145 uint8_t pause;
1146
1147 /* Command Queues */ 1150 /* Command Queues */
1151 struct ahd_completion *qoutfifo;
1148 uint16_t qoutfifonext; 1152 uint16_t qoutfifonext;
1149 uint16_t qoutfifonext_valid_tag; 1153 uint16_t qoutfifonext_valid_tag;
1150 uint16_t qinfifonext; 1154 uint16_t qinfifonext;
1151 uint16_t qinfifo[AHD_SCB_MAX]; 1155 uint16_t qinfifo[AHD_SCB_MAX];
1152 uint16_t *qoutfifo; 1156
1157 /*
1158 * Our qfreeze count. The sequencer compares
1159 * this value with its own counter to determine
1160 * whether to allow selections to occur.
1161 */
1162 uint16_t qfreeze_cnt;
1163
1164 /* Values to store in the SEQCTL register for pause and unpause */
1165 uint8_t unpause;
1166 uint8_t pause;
1153 1167
1154 /* Critical Section Data */ 1168 /* Critical Section Data */
1155 struct cs *critical_sections; 1169 struct cs *critical_sections;
@@ -1197,8 +1211,7 @@ struct ahd_softc {
1197 */ 1211 */
1198 bus_dma_tag_t parent_dmat; 1212 bus_dma_tag_t parent_dmat;
1199 bus_dma_tag_t shared_data_dmat; 1213 bus_dma_tag_t shared_data_dmat;
1200 bus_dmamap_t shared_data_dmamap; 1214 struct map_node shared_data_map;
1201 dma_addr_t shared_data_busaddr;
1202 1215
1203 /* Information saved through suspend/resume cycles */ 1216 /* Information saved through suspend/resume cycles */
1204 struct ahd_suspend_state suspend_state; 1217 struct ahd_suspend_state suspend_state;
@@ -1296,9 +1309,9 @@ struct ahd_devinfo {
1296}; 1309};
1297 1310
1298/****************************** PCI Structures ********************************/ 1311/****************************** PCI Structures ********************************/
1299#define AHD_PCI_IOADDR0 PCIR_MAPS /* I/O BAR*/ 1312#define AHD_PCI_IOADDR0 PCIR_BAR(0) /* I/O BAR*/
1300#define AHD_PCI_MEMADDR (PCIR_MAPS + 4) /* Memory BAR */ 1313#define AHD_PCI_MEMADDR PCIR_BAR(1) /* Memory BAR */
1301#define AHD_PCI_IOADDR1 (PCIR_MAPS + 12)/* Second I/O BAR */ 1314#define AHD_PCI_IOADDR1 PCIR_BAR(3) /* Second I/O BAR */
1302 1315
1303typedef int (ahd_device_setup_t)(struct ahd_softc *); 1316typedef int (ahd_device_setup_t)(struct ahd_softc *);
1304 1317