aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx.h')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx.h49
1 files changed, 5 insertions, 44 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h
index c0344e617651..862e0fbffa42 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. */
@@ -1133,10 +1133,6 @@ extern const int ahc_num_aic7770_devs;
1133 1133
1134/*************************** Function Declarations ****************************/ 1134/*************************** Function Declarations ****************************/
1135/******************************************************************************/ 1135/******************************************************************************/
1136u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl);
1137void ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl);
1138void ahc_busy_tcl(struct ahc_softc *ahc,
1139 u_int tcl, u_int busyid);
1140 1136
1141/***************************** PCI Front End *********************************/ 1137/***************************** PCI Front End *********************************/
1142struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); 1138struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t);
@@ -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 **********************/
1157int ahc_probe_scbs(struct ahc_softc *); 1153int ahc_probe_scbs(struct ahc_softc *);
1158void ahc_run_untagged_queues(struct ahc_softc *ahc);
1159void ahc_run_untagged_queue(struct ahc_softc *ahc,
1160 struct scb_tailq *queue);
1161void ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, 1154void ahc_qinfifo_requeue_tail(struct ahc_softc *ahc,
1162 struct scb *scb); 1155 struct scb *scb);
1163int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, 1156int 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
1179void ahc_set_unit(struct ahc_softc *, int); 1172void ahc_set_unit(struct ahc_softc *, int);
1180void ahc_set_name(struct ahc_softc *, char *); 1173void ahc_set_name(struct ahc_softc *, char *);
1181void ahc_alloc_scbs(struct ahc_softc *ahc);
1182void ahc_free(struct ahc_softc *ahc); 1174void ahc_free(struct ahc_softc *ahc);
1183int ahc_reset(struct ahc_softc *ahc, int reinit); 1175int ahc_reset(struct ahc_softc *ahc, int reinit);
1184void ahc_shutdown(void *arg);
1185
1186/*************************** Interrupt Services *******************************/
1187void ahc_clear_intstat(struct ahc_softc *ahc);
1188void ahc_run_qoutfifo(struct ahc_softc *ahc);
1189#ifdef AHC_TARGET_MODE
1190void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused);
1191#endif
1192void ahc_handle_brkadrint(struct ahc_softc *ahc);
1193void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat);
1194void ahc_handle_scsiint(struct ahc_softc *ahc,
1195 u_int intstat);
1196void ahc_clear_critical_section(struct ahc_softc *ahc);
1197 1176
1198/***************************** Error Recovery *********************************/ 1177/***************************** Error Recovery *********************************/
1199typedef enum { 1178typedef 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);
1217void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
1218int ahc_reset_channel(struct ahc_softc *ahc, char channel, 1196int ahc_reset_channel(struct ahc_softc *ahc, char channel,
1219 int initiate_reset); 1197 int initiate_reset);
1220int 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);
1223void ahc_restart(struct ahc_softc *ahc);
1224void ahc_calc_residual(struct ahc_softc *ahc,
1225 struct scb *scb);
1226/*************************** Utility Functions ********************************/ 1199/*************************** Utility Functions ********************************/
1227struct ahc_phase_table_entry*
1228 ahc_lookup_phase_entry(int phase);
1229void ahc_compile_devinfo(struct ahc_devinfo *devinfo, 1200void 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 ******************************/
1234struct ahc_syncrate* ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, 1205const 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);
1236u_int ahc_find_period(struct ahc_softc *ahc, 1207u_int ahc_find_period(struct ahc_softc *ahc,
1237 u_int scsirate, u_int maxsync); 1208 u_int scsirate, u_int maxsync);
1238void 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);
1243void 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);
1264void ahc_set_syncrate(struct ahc_softc *ahc, 1226void 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
1308void ahc_print_scb(struct scb *scb);
1309void ahc_print_devinfo(struct ahc_softc *ahc, 1270void ahc_print_devinfo(struct ahc_softc *ahc,
1310 struct ahc_devinfo *dev); 1271 struct ahc_devinfo *dev);
1311void ahc_dump_card_state(struct ahc_softc *ahc); 1272void ahc_dump_card_state(struct ahc_softc *ahc);
1312int ahc_print_register(ahc_reg_parse_entry_t *table, 1273int 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,