diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx.h')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx.h | 55 |
1 files changed, 8 insertions, 47 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index c0344e617651..e4e651cca3e4 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h | |||
@@ -736,7 +736,7 @@ struct ahc_syncrate { | |||
736 | #define ST_SXFR 0x010 /* Rate Single Transition Only */ | 736 | #define ST_SXFR 0x010 /* Rate Single Transition Only */ |
737 | #define DT_SXFR 0x040 /* Rate Double Transition Only */ | 737 | #define DT_SXFR 0x040 /* Rate Double Transition Only */ |
738 | uint8_t period; /* Period to send to SCSI target */ | 738 | uint8_t period; /* Period to send to SCSI target */ |
739 | char *rate; | 739 | const char *rate; |
740 | }; | 740 | }; |
741 | 741 | ||
742 | /* Safe and valid period for async negotiations. */ | 742 | /* Safe and valid period for async negotiations. */ |
@@ -1114,7 +1114,7 @@ typedef int (ahc_device_setup_t)(struct ahc_softc *); | |||
1114 | struct ahc_pci_identity { | 1114 | struct ahc_pci_identity { |
1115 | uint64_t full_id; | 1115 | uint64_t full_id; |
1116 | uint64_t id_mask; | 1116 | uint64_t id_mask; |
1117 | char *name; | 1117 | const char *name; |
1118 | ahc_device_setup_t *setup; | 1118 | ahc_device_setup_t *setup; |
1119 | }; | 1119 | }; |
1120 | 1120 | ||
@@ -1133,15 +1133,11 @@ extern const int ahc_num_aic7770_devs; | |||
1133 | 1133 | ||
1134 | /*************************** Function Declarations ****************************/ | 1134 | /*************************** Function Declarations ****************************/ |
1135 | /******************************************************************************/ | 1135 | /******************************************************************************/ |
1136 | u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl); | ||
1137 | void ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl); | ||
1138 | void ahc_busy_tcl(struct ahc_softc *ahc, | ||
1139 | u_int tcl, u_int busyid); | ||
1140 | 1136 | ||
1141 | /***************************** PCI Front End *********************************/ | 1137 | /***************************** PCI Front End *********************************/ |
1142 | struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); | 1138 | const struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); |
1143 | int ahc_pci_config(struct ahc_softc *, | 1139 | int ahc_pci_config(struct ahc_softc *, |
1144 | struct ahc_pci_identity *); | 1140 | const struct ahc_pci_identity *); |
1145 | int ahc_pci_test_register_access(struct ahc_softc *); | 1141 | int ahc_pci_test_register_access(struct ahc_softc *); |
1146 | #ifdef CONFIG_PM | 1142 | #ifdef CONFIG_PM |
1147 | void ahc_pci_resume(struct ahc_softc *ahc); | 1143 | void ahc_pci_resume(struct ahc_softc *ahc); |
@@ -1155,9 +1151,6 @@ int aic7770_config(struct ahc_softc *ahc, | |||
1155 | 1151 | ||
1156 | /************************** SCB and SCB queue management **********************/ | 1152 | /************************** SCB and SCB queue management **********************/ |
1157 | int ahc_probe_scbs(struct ahc_softc *); | 1153 | int ahc_probe_scbs(struct ahc_softc *); |
1158 | void ahc_run_untagged_queues(struct ahc_softc *ahc); | ||
1159 | void ahc_run_untagged_queue(struct ahc_softc *ahc, | ||
1160 | struct scb_tailq *queue); | ||
1161 | void ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, | 1154 | void ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, |
1162 | struct scb *scb); | 1155 | struct scb *scb); |
1163 | int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, | 1156 | int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, |
@@ -1178,22 +1171,8 @@ int ahc_resume(struct ahc_softc *ahc); | |||
1178 | #endif | 1171 | #endif |
1179 | void ahc_set_unit(struct ahc_softc *, int); | 1172 | void ahc_set_unit(struct ahc_softc *, int); |
1180 | void ahc_set_name(struct ahc_softc *, char *); | 1173 | void ahc_set_name(struct ahc_softc *, char *); |
1181 | void ahc_alloc_scbs(struct ahc_softc *ahc); | ||
1182 | void ahc_free(struct ahc_softc *ahc); | 1174 | void ahc_free(struct ahc_softc *ahc); |
1183 | int ahc_reset(struct ahc_softc *ahc, int reinit); | 1175 | int ahc_reset(struct ahc_softc *ahc, int reinit); |
1184 | void ahc_shutdown(void *arg); | ||
1185 | |||
1186 | /*************************** Interrupt Services *******************************/ | ||
1187 | void ahc_clear_intstat(struct ahc_softc *ahc); | ||
1188 | void ahc_run_qoutfifo(struct ahc_softc *ahc); | ||
1189 | #ifdef AHC_TARGET_MODE | ||
1190 | void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused); | ||
1191 | #endif | ||
1192 | void ahc_handle_brkadrint(struct ahc_softc *ahc); | ||
1193 | void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat); | ||
1194 | void ahc_handle_scsiint(struct ahc_softc *ahc, | ||
1195 | u_int intstat); | ||
1196 | void ahc_clear_critical_section(struct ahc_softc *ahc); | ||
1197 | 1176 | ||
1198 | /***************************** Error Recovery *********************************/ | 1177 | /***************************** Error Recovery *********************************/ |
1199 | typedef enum { | 1178 | typedef enum { |
@@ -1214,36 +1193,19 @@ int ahc_search_disc_list(struct ahc_softc *ahc, int target, | |||
1214 | char channel, int lun, u_int tag, | 1193 | char channel, int lun, u_int tag, |
1215 | int stop_on_first, int remove, | 1194 | int stop_on_first, int remove, |
1216 | int save_state); | 1195 | int save_state); |
1217 | void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb); | ||
1218 | int ahc_reset_channel(struct ahc_softc *ahc, char channel, | 1196 | int ahc_reset_channel(struct ahc_softc *ahc, char channel, |
1219 | int initiate_reset); | 1197 | int initiate_reset); |
1220 | int ahc_abort_scbs(struct ahc_softc *ahc, int target, | 1198 | |
1221 | char channel, int lun, u_int tag, | ||
1222 | role_t role, uint32_t status); | ||
1223 | void ahc_restart(struct ahc_softc *ahc); | ||
1224 | void ahc_calc_residual(struct ahc_softc *ahc, | ||
1225 | struct scb *scb); | ||
1226 | /*************************** Utility Functions ********************************/ | 1199 | /*************************** Utility Functions ********************************/ |
1227 | struct ahc_phase_table_entry* | ||
1228 | ahc_lookup_phase_entry(int phase); | ||
1229 | void ahc_compile_devinfo(struct ahc_devinfo *devinfo, | 1200 | void ahc_compile_devinfo(struct ahc_devinfo *devinfo, |
1230 | u_int our_id, u_int target, | 1201 | u_int our_id, u_int target, |
1231 | u_int lun, char channel, | 1202 | u_int lun, char channel, |
1232 | role_t role); | 1203 | role_t role); |
1233 | /************************** Transfer Negotiation ******************************/ | 1204 | /************************** Transfer Negotiation ******************************/ |
1234 | struct ahc_syncrate* ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, | 1205 | const struct ahc_syncrate* ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, |
1235 | u_int *ppr_options, u_int maxsync); | 1206 | u_int *ppr_options, u_int maxsync); |
1236 | u_int ahc_find_period(struct ahc_softc *ahc, | 1207 | u_int ahc_find_period(struct ahc_softc *ahc, |
1237 | u_int scsirate, u_int maxsync); | 1208 | u_int scsirate, u_int maxsync); |
1238 | void ahc_validate_offset(struct ahc_softc *ahc, | ||
1239 | struct ahc_initiator_tinfo *tinfo, | ||
1240 | struct ahc_syncrate *syncrate, | ||
1241 | u_int *offset, int wide, | ||
1242 | role_t role); | ||
1243 | void ahc_validate_width(struct ahc_softc *ahc, | ||
1244 | struct ahc_initiator_tinfo *tinfo, | ||
1245 | u_int *bus_width, | ||
1246 | role_t role); | ||
1247 | /* | 1209 | /* |
1248 | * Negotiation types. These are used to qualify if we should renegotiate | 1210 | * Negotiation types. These are used to qualify if we should renegotiate |
1249 | * even if our goal and current transport parameters are identical. | 1211 | * even if our goal and current transport parameters are identical. |
@@ -1263,7 +1225,7 @@ void ahc_set_width(struct ahc_softc *ahc, | |||
1263 | u_int width, u_int type, int paused); | 1225 | u_int width, u_int type, int paused); |
1264 | void ahc_set_syncrate(struct ahc_softc *ahc, | 1226 | void ahc_set_syncrate(struct ahc_softc *ahc, |
1265 | struct ahc_devinfo *devinfo, | 1227 | struct ahc_devinfo *devinfo, |
1266 | struct ahc_syncrate *syncrate, | 1228 | const struct ahc_syncrate *syncrate, |
1267 | u_int period, u_int offset, | 1229 | u_int period, u_int offset, |
1268 | u_int ppr_options, | 1230 | u_int ppr_options, |
1269 | u_int type, int paused); | 1231 | u_int type, int paused); |
@@ -1305,11 +1267,10 @@ extern uint32_t ahc_debug; | |||
1305 | #define AHC_SHOW_MASKED_ERRORS 0x1000 | 1267 | #define AHC_SHOW_MASKED_ERRORS 0x1000 |
1306 | #define AHC_DEBUG_SEQUENCER 0x2000 | 1268 | #define AHC_DEBUG_SEQUENCER 0x2000 |
1307 | #endif | 1269 | #endif |
1308 | void ahc_print_scb(struct scb *scb); | ||
1309 | void ahc_print_devinfo(struct ahc_softc *ahc, | 1270 | void ahc_print_devinfo(struct ahc_softc *ahc, |
1310 | struct ahc_devinfo *dev); | 1271 | struct ahc_devinfo *dev); |
1311 | void ahc_dump_card_state(struct ahc_softc *ahc); | 1272 | void ahc_dump_card_state(struct ahc_softc *ahc); |
1312 | int ahc_print_register(ahc_reg_parse_entry_t *table, | 1273 | int ahc_print_register(const ahc_reg_parse_entry_t *table, |
1313 | u_int num_entries, | 1274 | u_int num_entries, |
1314 | const char *name, | 1275 | const char *name, |
1315 | u_int address, | 1276 | u_int address, |