ahd                71 drivers/scsi/aic7xxx/aic79xx.h #define SCSIID_TARGET(ahd, scsiid)	\
ahd                75 drivers/scsi/aic7xxx/aic79xx.h #define SCSIID_CHANNEL(ahd, scsiid) ('A')
ahd                76 drivers/scsi/aic7xxx/aic79xx.h #define	SCB_IS_SCSIBUS_B(ahd, scb) (0)
ahd                79 drivers/scsi/aic7xxx/aic79xx.h #define	SCB_GET_TARGET(ahd, scb) \
ahd                80 drivers/scsi/aic7xxx/aic79xx.h 	SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
ahd                81 drivers/scsi/aic7xxx/aic79xx.h #define	SCB_GET_CHANNEL(ahd, scb) \
ahd                82 drivers/scsi/aic7xxx/aic79xx.h 	SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
ahd                85 drivers/scsi/aic7xxx/aic79xx.h #define SCB_GET_TARGET_OFFSET(ahd, scb)	\
ahd                86 drivers/scsi/aic7xxx/aic79xx.h 	SCB_GET_TARGET(ahd, scb)
ahd                87 drivers/scsi/aic7xxx/aic79xx.h #define SCB_GET_TARGET_MASK(ahd, scb) \
ahd                88 drivers/scsi/aic7xxx/aic79xx.h 	(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
ahd               120 drivers/scsi/aic7xxx/aic79xx.h #define AHD_GET_SCB_COL_IDX(ahd, scb)				\
ahd               121 drivers/scsi/aic7xxx/aic79xx.h 	((SCB_GET_LUN(scb) << 4) | SCB_GET_TARGET(ahd, scb))
ahd               959 drivers/scsi/aic7xxx/aic79xx.h int		ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
ahd               962 drivers/scsi/aic7xxx/aic79xx.h int		ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
ahd               965 drivers/scsi/aic7xxx/aic79xx.h int		ahd_acquire_seeprom(struct ahd_softc *ahd);
ahd               966 drivers/scsi/aic7xxx/aic79xx.h void		ahd_release_seeprom(struct ahd_softc *ahd);
ahd              1257 drivers/scsi/aic7xxx/aic79xx.h #define AHD_SET_SLEWRATE(ahd, new_slew)					\
ahd              1259 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_SLEWRATE_MASK;	\
ahd              1260 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |=			\
ahd              1264 drivers/scsi/aic7xxx/aic79xx.h #define AHD_SET_PRECOMP(ahd, new_pcomp)					\
ahd              1266 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_PRECOMP_MASK;	\
ahd              1267 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |=			\
ahd              1271 drivers/scsi/aic7xxx/aic79xx.h #define AHD_SET_AMPLITUDE(ahd, new_amp)					\
ahd              1273 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] &= ~AHD_AMPLITUDE_MASK;	\
ahd              1274 drivers/scsi/aic7xxx/aic79xx.h     (ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] |=				\
ahd              1339 drivers/scsi/aic7xxx/aic79xx.h void		ahd_qinfifo_requeue_tail(struct ahd_softc *ahd,
ahd              1345 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_controller_info(struct ahd_softc *ahd, char *buf);
ahd              1346 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_init(struct ahd_softc *ahd);
ahd              1348 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_suspend(struct ahd_softc *ahd);
ahd              1349 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_resume(struct ahd_softc *ahd);
ahd              1351 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_default_config(struct ahd_softc *ahd);
ahd              1352 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_parse_vpddata(struct ahd_softc *ahd,
ahd              1354 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_parse_cfgdata(struct ahd_softc *ahd,
ahd              1356 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_intr_enable(struct ahd_softc *ahd, int enable);
ahd              1357 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_pause_and_flushwork(struct ahd_softc *ahd);
ahd              1360 drivers/scsi/aic7xxx/aic79xx.h struct scb		*ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
ahd              1361 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
ahd              1362 drivers/scsi/aic7xxx/aic79xx.h void			 ahd_free(struct ahd_softc *ahd);
ahd              1363 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_reset(struct ahd_softc *ahd, int reinit);
ahd              1364 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_write_flexport(struct ahd_softc *ahd,
ahd              1366 drivers/scsi/aic7xxx/aic79xx.h int			 ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
ahd              1376 drivers/scsi/aic7xxx/aic79xx.h int			ahd_search_qinfifo(struct ahd_softc *ahd, int target,
ahd              1380 drivers/scsi/aic7xxx/aic79xx.h int			ahd_search_disc_list(struct ahd_softc *ahd, int target,
ahd              1384 drivers/scsi/aic7xxx/aic79xx.h int			ahd_reset_channel(struct ahd_softc *ahd, char channel,
ahd              1392 drivers/scsi/aic7xxx/aic79xx.h void			ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
ahd              1408 drivers/scsi/aic7xxx/aic79xx.h void			ahd_set_width(struct ahd_softc *ahd,
ahd              1411 drivers/scsi/aic7xxx/aic79xx.h void			ahd_set_syncrate(struct ahd_softc *ahd,
ahd              1426 drivers/scsi/aic7xxx/aic79xx.h void		ahd_handle_en_lun(struct ahd_softc *ahd,
ahd              1428 drivers/scsi/aic7xxx/aic79xx.h cam_status	ahd_find_tmode_devs(struct ahd_softc *ahd,
ahd              1459 drivers/scsi/aic7xxx/aic79xx.h void			ahd_print_devinfo(struct ahd_softc *ahd,
ahd              1461 drivers/scsi/aic7xxx/aic79xx.h void			ahd_dump_card_state(struct ahd_softc *ahd);
ahd                98 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_transmission_error(struct ahd_softc *ahd);
ahd                99 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_lqiphase_error(struct ahd_softc *ahd,
ahd               101 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_handle_pkt_busfree(struct ahd_softc *ahd,
ahd               103 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_handle_nonpkt_busfree(struct ahd_softc *ahd);
ahd               104 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_proto_violation(struct ahd_softc *ahd);
ahd               105 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_force_renegotiation(struct ahd_softc *ahd,
ahd               109 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_alloc_tstate(struct ahd_softc *ahd,
ahd               112 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_free_tstate(struct ahd_softc *ahd,
ahd               115 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_devlimited_syncrate(struct ahd_softc *ahd,
ahd               120 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_update_neg_table(struct ahd_softc *ahd,
ahd               123 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_update_pending_scbs(struct ahd_softc *ahd);
ahd               124 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_fetch_devinfo(struct ahd_softc *ahd,
ahd               126 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_scb_devinfo(struct ahd_softc *ahd,
ahd               129 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_setup_initiator_msgout(struct ahd_softc *ahd,
ahd               132 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_build_transfer_msg(struct ahd_softc *ahd,
ahd               134 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_construct_sdtr(struct ahd_softc *ahd,
ahd               137 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_construct_wdtr(struct ahd_softc *ahd,
ahd               140 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_construct_ppr(struct ahd_softc *ahd,
ahd               144 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_clear_msg_state(struct ahd_softc *ahd);
ahd               145 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_message_phase(struct ahd_softc *ahd);
ahd               151 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_sent_msg(struct ahd_softc *ahd, ahd_msgtype type,
ahd               153 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_parse_msg(struct ahd_softc *ahd,
ahd               155 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_handle_msg_reject(struct ahd_softc *ahd,
ahd               157 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_ign_wide_residue(struct ahd_softc *ahd,
ahd               159 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_reinitialize_dataptrs(struct ahd_softc *ahd);
ahd               160 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_devreset(struct ahd_softc *ahd,
ahd               165 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_setup_target_msgin(struct ahd_softc *ahd,
ahd               170 drivers/scsi/aic7xxx/aic79xx_core.c static u_int		ahd_sglist_size(struct ahd_softc *ahd);
ahd               171 drivers/scsi/aic7xxx/aic79xx_core.c static u_int		ahd_sglist_allocsize(struct ahd_softc *ahd);
ahd               174 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_initialize_hscbs(struct ahd_softc *ahd);
ahd               175 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_init_scbdata(struct ahd_softc *ahd);
ahd               176 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_fini_scbdata(struct ahd_softc *ahd);
ahd               177 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_setup_iocell_workaround(struct ahd_softc *ahd);
ahd               178 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_iocell_first_selection(struct ahd_softc *ahd);
ahd               179 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_add_col_list(struct ahd_softc *ahd,
ahd               181 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_rem_col_list(struct ahd_softc *ahd,
ahd               183 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_chip_init(struct ahd_softc *ahd);
ahd               184 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_qinfifo_requeue(struct ahd_softc *ahd,
ahd               187 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_qinfifo_count(struct ahd_softc *ahd);
ahd               188 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_search_scb_list(struct ahd_softc *ahd, int target,
ahd               194 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_stitch_tid_list(struct ahd_softc *ahd,
ahd               197 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_add_scb_to_free_list(struct ahd_softc *ahd,
ahd               199 drivers/scsi/aic7xxx/aic79xx_core.c static u_int		ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid,
ahd               201 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_reset_current_bus(struct ahd_softc *ahd);
ahd               204 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_dumpseq(struct ahd_softc *ahd);
ahd               206 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_loadseq(struct ahd_softc *ahd);
ahd               207 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_check_patch(struct ahd_softc *ahd,
ahd               210 drivers/scsi/aic7xxx/aic79xx_core.c static u_int		ahd_resolve_seqaddr(struct ahd_softc *ahd,
ahd               212 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_download_instr(struct ahd_softc *ahd,
ahd               214 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_probe_stack_size(struct ahd_softc *ahd);
ahd               215 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_scb_active_in_fifo(struct ahd_softc *ahd,
ahd               217 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_run_data_fifo(struct ahd_softc *ahd,
ahd               221 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_queue_lstate_event(struct ahd_softc *ahd,
ahd               226 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_update_scsiid(struct ahd_softc *ahd,
ahd               228 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_handle_target_cmd(struct ahd_softc *ahd,
ahd               232 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_abort_scbs(struct ahd_softc *ahd, int target,
ahd               235 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_alloc_scbs(struct ahd_softc *ahd);
ahd               236 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_busy_tcl(struct ahd_softc *ahd, u_int tcl,
ahd               238 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_calc_residual(struct ahd_softc *ahd,
ahd               240 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_clear_critical_section(struct ahd_softc *ahd);
ahd               241 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_clear_intstat(struct ahd_softc *ahd);
ahd               242 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_enable_coalescing(struct ahd_softc *ahd,
ahd               244 drivers/scsi/aic7xxx/aic79xx_core.c static u_int		ahd_find_busy_tcl(struct ahd_softc *ahd, u_int tcl);
ahd               245 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_freeze_devq(struct ahd_softc *ahd,
ahd               247 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_scb_status(struct ahd_softc *ahd,
ahd               251 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_update_coalescing_values(struct ahd_softc *ahd,
ahd               256 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_wait_seeprom(struct ahd_softc *ahd);
ahd               257 drivers/scsi/aic7xxx/aic79xx_core.c static int		ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
ahd               261 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_reset_cmds_pending(struct ahd_softc *ahd);
ahd               264 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_run_qoutfifo(struct ahd_softc *ahd);
ahd               266 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_run_tqinfifo(struct ahd_softc *ahd, int paused);
ahd               268 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_hwerrint(struct ahd_softc *ahd);
ahd               269 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat);
ahd               270 drivers/scsi/aic7xxx/aic79xx_core.c static void		ahd_handle_scsiint(struct ahd_softc *ahd,
ahd               275 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
ahd               277 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->src_mode == src && ahd->dst_mode == dst)
ahd               280 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->src_mode == AHD_MODE_UNKNOWN
ahd               281 drivers/scsi/aic7xxx/aic79xx_core.c 	 || ahd->dst_mode == AHD_MODE_UNKNOWN)
ahd               284 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Setting mode 0x%x\n", ahd_name(ahd),
ahd               285 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_build_mode_state(ahd, src, dst));
ahd               287 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MODE_PTR, ahd_build_mode_state(ahd, src, dst));
ahd               288 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->src_mode = src;
ahd               289 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->dst_mode = dst;
ahd               293 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_modes(struct ahd_softc *ahd)
ahd               299 drivers/scsi/aic7xxx/aic79xx_core.c 	mode_ptr = ahd_inb(ahd, MODE_PTR);
ahd               304 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_extract_mode_state(ahd, mode_ptr, &src, &dst);
ahd               305 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_known_modes(ahd, src, dst);
ahd               309 drivers/scsi/aic7xxx/aic79xx_core.c ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode,
ahd               313 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((srcmode & AHD_MK_MSK(ahd->src_mode)) == 0
ahd               314 drivers/scsi/aic7xxx/aic79xx_core.c 	 || (dstmode & AHD_MK_MSK(ahd->dst_mode)) == 0) {
ahd               316 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), file, line);
ahd               321 drivers/scsi/aic7xxx/aic79xx_core.c #define AHD_ASSERT_MODES(ahd, source, dest) \
ahd               322 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_assert_modes(ahd, source, dest, __FILE__, __LINE__);
ahd               325 drivers/scsi/aic7xxx/aic79xx_core.c ahd_save_modes(struct ahd_softc *ahd)
ahd               327 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->src_mode == AHD_MODE_UNKNOWN
ahd               328 drivers/scsi/aic7xxx/aic79xx_core.c 	 || ahd->dst_mode == AHD_MODE_UNKNOWN)
ahd               329 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_modes(ahd);
ahd               331 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_build_mode_state(ahd, ahd->src_mode, ahd->dst_mode));
ahd               335 drivers/scsi/aic7xxx/aic79xx_core.c ahd_restore_modes(struct ahd_softc *ahd, ahd_mode_state state)
ahd               340 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_extract_mode_state(ahd, state, &src, &dst);
ahd               341 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, src, dst);
ahd               349 drivers/scsi/aic7xxx/aic79xx_core.c ahd_is_paused(struct ahd_softc *ahd)
ahd               351 drivers/scsi/aic7xxx/aic79xx_core.c 	return ((ahd_inb(ahd, HCNTRL) & PAUSE) != 0);
ahd               362 drivers/scsi/aic7xxx/aic79xx_core.c ahd_pause(struct ahd_softc *ahd)
ahd               364 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNTRL, ahd->pause);
ahd               370 drivers/scsi/aic7xxx/aic79xx_core.c 	while (ahd_is_paused(ahd) == 0)
ahd               385 drivers/scsi/aic7xxx/aic79xx_core.c ahd_unpause(struct ahd_softc *ahd)
ahd               391 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->saved_src_mode != AHD_MODE_UNKNOWN
ahd               392 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ahd->saved_dst_mode != AHD_MODE_UNKNOWN) {
ahd               393 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->flags & AHD_UPDATE_PEND_CMDS) != 0)
ahd               394 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_reset_cmds_pending(ahd);
ahd               395 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode);
ahd               398 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, INTSTAT) & ~CMDCMPLT) == 0)
ahd               399 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, HCNTRL, ahd->unpause);
ahd               401 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_known_modes(ahd, AHD_MODE_UNKNOWN, AHD_MODE_UNKNOWN);
ahd               406 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
ahd               411 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
ahd               430 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
ahd               451 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb)
ahd               456 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
ahd               470 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->flags & AHD_39BIT_ADDRESSING) != 0) {
ahd               488 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb)
ahd               497 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr)
ahd               502 drivers/scsi/aic7xxx/aic79xx_core.c 	sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd));
ahd               507 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg)
ahd               513 drivers/scsi/aic7xxx/aic79xx_core.c 		  - ahd_sg_size(ahd);
ahd               519 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op)
ahd               521 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_sync(ahd, ahd->scb_data.hscb_dmat,
ahd               528 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op)
ahd               533 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_sync(ahd, ahd->scb_data.sg_dmat,
ahd               535 drivers/scsi/aic7xxx/aic79xx_core.c 			/*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd),
ahd               536 drivers/scsi/aic7xxx/aic79xx_core.c 			/*len*/ahd_sg_size(ahd) * scb->sg_count, op);
ahd               540 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op)
ahd               542 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_sync(ahd, ahd->scb_data.sense_dmat,
ahd               550 drivers/scsi/aic7xxx/aic79xx_core.c ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index)
ahd               552 drivers/scsi/aic7xxx/aic79xx_core.c 	return (((uint8_t *)&ahd->targetcmds[index])
ahd               553 drivers/scsi/aic7xxx/aic79xx_core.c 	       - (uint8_t *)ahd->qoutfifo);
ahd               563 drivers/scsi/aic7xxx/aic79xx_core.c ahd_fetch_transinfo(struct ahd_softc *ahd, char channel, u_int our_id,
ahd               574 drivers/scsi/aic7xxx/aic79xx_core.c 	*tstate = ahd->enabled_targets[our_id];
ahd               579 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inw(struct ahd_softc *ahd, u_int port)
ahd               586 drivers/scsi/aic7xxx/aic79xx_core.c 	uint16_t r = ahd_inb(ahd, port+1) << 8;
ahd               587 drivers/scsi/aic7xxx/aic79xx_core.c 	return r | ahd_inb(ahd, port);
ahd               591 drivers/scsi/aic7xxx/aic79xx_core.c ahd_outw(struct ahd_softc *ahd, u_int port, u_int value)
ahd               597 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port, value & 0xFF);
ahd               598 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+1, (value >> 8) & 0xFF);
ahd               602 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inl(struct ahd_softc *ahd, u_int port)
ahd               604 drivers/scsi/aic7xxx/aic79xx_core.c 	return ((ahd_inb(ahd, port))
ahd               605 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+1) << 8)
ahd               606 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+2) << 16)
ahd               607 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+3) << 24));
ahd               611 drivers/scsi/aic7xxx/aic79xx_core.c ahd_outl(struct ahd_softc *ahd, u_int port, uint32_t value)
ahd               613 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port, (value) & 0xFF);
ahd               614 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+1, ((value) >> 8) & 0xFF);
ahd               615 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+2, ((value) >> 16) & 0xFF);
ahd               616 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+3, ((value) >> 24) & 0xFF);
ahd               620 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inq(struct ahd_softc *ahd, u_int port)
ahd               622 drivers/scsi/aic7xxx/aic79xx_core.c 	return ((ahd_inb(ahd, port))
ahd               623 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+1) << 8)
ahd               624 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+2) << 16)
ahd               625 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb(ahd, port+3) << 24)
ahd               626 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (((uint64_t)ahd_inb(ahd, port+4)) << 32)
ahd               627 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (((uint64_t)ahd_inb(ahd, port+5)) << 40)
ahd               628 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (((uint64_t)ahd_inb(ahd, port+6)) << 48)
ahd               629 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (((uint64_t)ahd_inb(ahd, port+7)) << 56));
ahd               633 drivers/scsi/aic7xxx/aic79xx_core.c ahd_outq(struct ahd_softc *ahd, u_int port, uint64_t value)
ahd               635 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port, value & 0xFF);
ahd               636 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+1, (value >> 8) & 0xFF);
ahd               637 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+2, (value >> 16) & 0xFF);
ahd               638 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+3, (value >> 24) & 0xFF);
ahd               639 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+4, (value >> 32) & 0xFF);
ahd               640 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+5, (value >> 40) & 0xFF);
ahd               641 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+6, (value >> 48) & 0xFF);
ahd               642 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, port+7, (value >> 56) & 0xFF);
ahd               646 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_scbptr(struct ahd_softc *ahd)
ahd               648 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd               650 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inb(ahd, SCBPTR) | (ahd_inb(ahd, SCBPTR + 1) << 8));
ahd               654 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr)
ahd               656 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd               658 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCBPTR, scbptr & 0xFF);
ahd               659 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCBPTR+1, (scbptr >> 8) & 0xFF);
ahd               664 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_hnscb_qoff(struct ahd_softc *ahd)
ahd               666 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inw_atomic(ahd, HNSCB_QOFF));
ahd               671 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value)
ahd               673 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw_atomic(ahd, HNSCB_QOFF, value);
ahd               678 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_hescb_qoff(struct ahd_softc *ahd)
ahd               680 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inb(ahd, HESCB_QOFF));
ahd               685 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value)
ahd               687 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HESCB_QOFF, value);
ahd               691 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_snscb_qoff(struct ahd_softc *ahd)
ahd               695 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               696 drivers/scsi/aic7xxx/aic79xx_core.c 	oldvalue = ahd_inw(ahd, SNSCB_QOFF);
ahd               697 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, SNSCB_QOFF, oldvalue);
ahd               702 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value)
ahd               704 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               705 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, SNSCB_QOFF, value);
ahd               710 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_sescb_qoff(struct ahd_softc *ahd)
ahd               712 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               713 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inb(ahd, SESCB_QOFF));
ahd               718 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value)
ahd               720 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               721 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SESCB_QOFF, value);
ahd               726 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_sdscb_qoff(struct ahd_softc *ahd)
ahd               728 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               729 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inb(ahd, SDSCB_QOFF) | (ahd_inb(ahd, SDSCB_QOFF + 1) << 8));
ahd               734 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value)
ahd               736 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd               737 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SDSCB_QOFF, value & 0xFF);
ahd               738 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SDSCB_QOFF+1, (value >> 8) & 0xFF);
ahd               742 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inb_scbram(struct ahd_softc *ahd, u_int offset)
ahd               760 drivers/scsi/aic7xxx/aic79xx_core.c 	value = ahd_inb(ahd, offset);
ahd               761 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PCIX_SCBRAM_RD_BUG) != 0)
ahd               762 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_inb(ahd, MODE_PTR);
ahd               767 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inw_scbram(struct ahd_softc *ahd, u_int offset)
ahd               769 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inb_scbram(ahd, offset)
ahd               770 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb_scbram(ahd, offset+1) << 8));
ahd               774 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inl_scbram(struct ahd_softc *ahd, u_int offset)
ahd               776 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inw_scbram(ahd, offset)
ahd               777 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inw_scbram(ahd, offset+2) << 16));
ahd               781 drivers/scsi/aic7xxx/aic79xx_core.c ahd_inq_scbram(struct ahd_softc *ahd, u_int offset)
ahd               783 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd_inl_scbram(ahd, offset)
ahd               784 drivers/scsi/aic7xxx/aic79xx_core.c 	      | ((uint64_t)ahd_inl_scbram(ahd, offset+4)) << 32);
ahd               788 drivers/scsi/aic7xxx/aic79xx_core.c ahd_lookup_scb(struct ahd_softc *ahd, u_int tag)
ahd               794 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd->scb_data.scbindex[tag];
ahd               796 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sync_scb(ahd, scb,
ahd               802 drivers/scsi/aic7xxx/aic79xx_core.c ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb)
ahd               820 drivers/scsi/aic7xxx/aic79xx_core.c 	q_hscb = ahd->next_queued_hscb;
ahd               821 drivers/scsi/aic7xxx/aic79xx_core.c 	q_hscb_map = ahd->next_queued_hscb_map;
ahd               828 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->next_queued_hscb = scb->hscb;
ahd               829 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->next_queued_hscb_map = scb->hscb_map;
ahd               834 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
ahd               841 drivers/scsi/aic7xxx/aic79xx_core.c ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb)
ahd               843 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_swap_with_next_hscb(ahd, scb);
ahd               852 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
ahd               853 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifonext++;
ahd               856 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_setup_data_scb(ahd, scb);
ahd               858 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_setup_noxfer_scb(ahd, scb);
ahd               859 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_setup_scb_common(ahd, scb);
ahd               865 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
ahd               873 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd),
ahd               882 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_hnscb_qoff(ahd, ahd->qinfifonext);
ahd               887 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sync_qoutfifo(struct ahd_softc *ahd, int op)
ahd               889 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap,
ahd               895 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sync_tqinfifo(struct ahd_softc *ahd, int op)
ahd               898 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_TARGETROLE) != 0) {
ahd               899 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_sync(ahd, ahd->shared_data_dmat,
ahd               900 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->shared_data_map.dmamap,
ahd               901 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_targetcmd_offset(ahd, 0),
ahd               915 drivers/scsi/aic7xxx/aic79xx_core.c ahd_check_cmdcmpltqueues(struct ahd_softc *ahd)
ahd               920 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap,
ahd               921 drivers/scsi/aic7xxx/aic79xx_core.c 			/*offset*/ahd->qoutfifonext * sizeof(*ahd->qoutfifo),
ahd               922 drivers/scsi/aic7xxx/aic79xx_core.c 			/*len*/sizeof(*ahd->qoutfifo), BUS_DMASYNC_POSTREAD);
ahd               923 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->qoutfifo[ahd->qoutfifonext].valid_tag
ahd               924 drivers/scsi/aic7xxx/aic79xx_core.c 	  == ahd->qoutfifonext_valid_tag)
ahd               927 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_TARGETROLE) != 0
ahd               928 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd->flags & AHD_TQINFIFO_BLOCKED) == 0) {
ahd               929 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_sync(ahd, ahd->shared_data_dmat,
ahd               930 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->shared_data_map.dmamap,
ahd               931 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_targetcmd_offset(ahd, ahd->tqinfifofnext),
ahd               934 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->targetcmds[ahd->tqinfifonext].cmd_valid != 0)
ahd               945 drivers/scsi/aic7xxx/aic79xx_core.c ahd_intr(struct ahd_softc *ahd)
ahd               949 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->pause & INTEN) == 0) {
ahd               965 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_ALL_INTERRUPTS) == 0
ahd               966 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_check_cmdcmpltqueues(ahd) != 0))
ahd               969 drivers/scsi/aic7xxx/aic79xx_core.c 		intstat = ahd_inb(ahd, INTSTAT);
ahd               975 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRCMDINT);
ahd               985 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) {
ahd               986 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd_is_paused(ahd)) {
ahd               992 drivers/scsi/aic7xxx/aic79xx_core.c 				if (ahd_inb(ahd, SEQINTCODE) != NO_SEQINT)
ahd               996 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_flush_device_writes(ahd);
ahd               998 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_run_qoutfifo(ahd);
ahd               999 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket]++;
ahd              1000 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->cmdcmplt_total++;
ahd              1002 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->flags & AHD_TARGETROLE) != 0)
ahd              1003 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_run_tqinfifo(ahd, /*paused*/FALSE);
ahd              1011 drivers/scsi/aic7xxx/aic79xx_core.c 	if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0) {
ahd              1014 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_hwerrint(ahd);
ahd              1016 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->bus_intr(ahd);
ahd              1020 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_handle_seqint(ahd, intstat);
ahd              1023 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_handle_scsiint(ahd, intstat);
ahd              1030 drivers/scsi/aic7xxx/aic79xx_core.c ahd_assert_atn(struct ahd_softc *ahd)
ahd              1032 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISIGO, ATNO);
ahd              1042 drivers/scsi/aic7xxx/aic79xx_core.c ahd_currently_packetized(struct ahd_softc *ahd)
ahd              1047 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              1048 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PKTIZED_STATUS_BUG) != 0) {
ahd              1054 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              1055 drivers/scsi/aic7xxx/aic79xx_core.c 		packetized = ahd_inb(ahd, LQISTATE) != 0;
ahd              1057 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              1058 drivers/scsi/aic7xxx/aic79xx_core.c 		packetized = ahd_inb(ahd, LQISTAT2) & PACKETIZED;
ahd              1060 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              1065 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_active_fifo(struct ahd_softc *ahd)
ahd              1069 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              1070 drivers/scsi/aic7xxx/aic79xx_core.c 	active_fifo = ahd_inb(ahd, DFFSTAT) & CURRFIFO;
ahd              1074 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, active_fifo, active_fifo);
ahd              1082 drivers/scsi/aic7xxx/aic79xx_core.c ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
ahd              1084 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL);
ahd              1092 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
ahd              1098 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_calc_residual(ahd, scb);
ahd              1102 drivers/scsi/aic7xxx/aic79xx_core.c ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
ahd              1108 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_scb_status(ahd, scb);
ahd              1110 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_done(ahd, scb);
ahd              1119 drivers/scsi/aic7xxx/aic79xx_core.c ahd_restart(struct ahd_softc *ahd)
ahd              1122 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_pause(ahd);
ahd              1124 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              1127 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_msg_state(ahd);
ahd              1128 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISIGO, 0);		/* De-assert BSY */
ahd              1129 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MSG_OUT, MSG_NOOP);	/* No message to send */
ahd              1130 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SXFRCTL1, ahd_inb(ahd, SXFRCTL1) & ~BITBUCKET);
ahd              1131 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQINTCTL, 0);
ahd              1132 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, LASTPHASE, P_BUSFREE);
ahd              1133 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQ_FLAGS, 0);
ahd              1134 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SAVED_SCSIID, 0xFF);
ahd              1135 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SAVED_LUN, 0xFF);
ahd              1144 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, TQINPOS, ahd->tqinfifonext);
ahd              1147 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ1,
ahd              1148 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_inb(ahd, SCSISEQ_TEMPLATE) & (ENSELI|ENRSELI|ENAUTOATNP));
ahd              1149 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              1156 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSEQINT);
ahd              1158 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQCTL0, FASTMODE|SEQRESET);
ahd              1159 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_unpause(ahd);
ahd              1163 drivers/scsi/aic7xxx/aic79xx_core.c ahd_clear_fifo(struct ahd_softc *ahd, u_int fifo)
ahd              1169 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Clearing FIFO %d\n", ahd_name(ahd), fifo);
ahd              1171 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              1172 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, fifo, fifo);
ahd              1173 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DFFSXFRCTL, RSTCHN|CLRSHCNT);
ahd              1174 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SG_STATE) & FETCH_INPROG) != 0)
ahd              1175 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CCSGCTL, CCSGRESET);
ahd              1176 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, LONGJMP_ADDR + 1, INVALID_ADDR);
ahd              1177 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SG_STATE, 0);
ahd              1178 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              1187 drivers/scsi/aic7xxx/aic79xx_core.c ahd_flush_qoutfifo(struct ahd_softc *ahd)
ahd              1196 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              1201 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              1202 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scbptr = ahd_get_scbptr(ahd);
ahd              1203 drivers/scsi/aic7xxx/aic79xx_core.c 	while ((ahd_inb(ahd, LQISTAT2) & LQIGSAVAIL) != 0) {
ahd              1207 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_inw(ahd, GSFIFO);
ahd              1208 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1211 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              1224 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_modes(ahd, fifo_mode, fifo_mode);
ahd              1226 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd_scb_active_in_fifo(ahd, scb) == 0)
ahd              1229 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_run_data_fifo(ahd, scb);
ahd              1248 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              1249 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              1250 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb_scbram(ahd, SCB_SGPTR) & SG_LIST_NULL) == 0
ahd              1251 drivers/scsi/aic7xxx/aic79xx_core.c 		 && ((ahd_inb_scbram(ahd, SCB_SGPTR) & SG_FULL_RESID) != 0
ahd              1252 drivers/scsi/aic7xxx/aic79xx_core.c 		  || (ahd_inb_scbram(ahd, SCB_RESIDUAL_SGPTR)
ahd              1262 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_SCSI_STATUS, 0);
ahd              1263 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_SGPTR,
ahd              1264 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb_scbram(ahd, SCB_SGPTR)
ahd              1266 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, SCB_TAG, scbid);
ahd              1267 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, SCB_NEXT_COMPLETE, SCB_LIST_NULL);
ahd              1268 drivers/scsi/aic7xxx/aic79xx_core.c 			comp_head = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
ahd              1270 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, COMPLETE_DMA_SCB_HEAD, scbid);
ahd              1271 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, COMPLETE_DMA_SCB_TAIL, scbid);
ahd              1275 drivers/scsi/aic7xxx/aic79xx_core.c 				tail = ahd_inw(ahd, COMPLETE_DMA_SCB_TAIL);
ahd              1276 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_set_scbptr(ahd, tail);
ahd              1277 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, SCB_NEXT_COMPLETE, scbid);
ahd              1278 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, COMPLETE_DMA_SCB_TAIL, scbid);
ahd              1279 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_set_scbptr(ahd, scbid);
ahd              1282 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_complete_scb(ahd, scb);
ahd              1284 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scbptr);
ahd              1289 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              1295 drivers/scsi/aic7xxx/aic79xx_core.c 	while (((ccscbctl = ahd_inb(ahd, CCSCBCTL)) & (CCARREN|CCSCBEN)) != 0) {
ahd              1312 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CCSCBCTL, ccscbctl & ~(CCARREN|CCSCBEN));
ahd              1318 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_run_qoutfifo(ahd);
ahd              1320 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scbptr = ahd_get_scbptr(ahd);
ahd              1325 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
ahd              1330 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              1331 drivers/scsi/aic7xxx/aic79xx_core.c 		next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              1332 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1335 drivers/scsi/aic7xxx/aic79xx_core.c 			       "SCB %d invalid\n", ahd_name(ahd), scbid);
ahd              1340 drivers/scsi/aic7xxx/aic79xx_core.c 			*hscb_ptr++ = ahd_inb_scbram(ahd, SCB_BASE + i);
ahd              1342 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_complete_scb(ahd, scb);
ahd              1345 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_DMA_SCB_HEAD, SCB_LIST_NULL);
ahd              1346 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_DMA_SCB_TAIL, SCB_LIST_NULL);
ahd              1348 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_inw(ahd, COMPLETE_ON_QFREEZE_HEAD);
ahd              1351 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              1352 drivers/scsi/aic7xxx/aic79xx_core.c 		next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              1353 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1356 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              1360 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_complete_scb(ahd, scb);
ahd              1363 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_ON_QFREEZE_HEAD, SCB_LIST_NULL);
ahd              1365 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_inw(ahd, COMPLETE_SCB_HEAD);
ahd              1368 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              1369 drivers/scsi/aic7xxx/aic79xx_core.c 		next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              1370 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1373 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              1377 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_complete_scb(ahd, scb);
ahd              1380 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_SCB_HEAD, SCB_LIST_NULL);
ahd              1385 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scbptr);
ahd              1386 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              1387 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_UPDATE_PEND_CMDS;
ahd              1395 drivers/scsi/aic7xxx/aic79xx_core.c ahd_scb_active_in_fifo(struct ahd_softc *ahd, struct scb *scb)
ahd              1404 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_get_scbptr(ahd) != SCB_GET_TAG(scb)
ahd              1405 drivers/scsi/aic7xxx/aic79xx_core.c 	 || ((ahd_inb(ahd, LONGJMP_ADDR+1) & INVALID_ADDR) != 0
ahd              1406 drivers/scsi/aic7xxx/aic79xx_core.c 	  && (ahd_inb(ahd, SEQINTSRC) & (CFG4DATA|SAVEPTRS)) == 0))
ahd              1424 drivers/scsi/aic7xxx/aic79xx_core.c ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *scb)
ahd              1428 drivers/scsi/aic7xxx/aic79xx_core.c 	seqintsrc = ahd_inb(ahd, SEQINTSRC);
ahd              1436 drivers/scsi/aic7xxx/aic79xx_core.c 		sgptr = ahd_inl_scbram(ahd, SCB_SGPTR) & ~SG_FULL_RESID;
ahd              1437 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_SGPTR, sgptr);
ahd              1442 drivers/scsi/aic7xxx/aic79xx_core.c 		datacnt = ahd_inl_scbram(ahd, SCB_DATACNT);
ahd              1445 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SG_STATE, 0);
ahd              1447 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SG_STATE, LOADING_NEEDED);
ahd              1448 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outq(ahd, HADDR, ahd_inq_scbram(ahd, SCB_DATAPTR));
ahd              1449 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, HCNT, datacnt & AHD_SG_LEN_MASK);
ahd              1450 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SG_CACHE_PRE, sgptr);
ahd              1451 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFCNTRL, PRELOADEN|SCSIEN|HDMAEN);
ahd              1456 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_RESIDUAL_DATACNT+3, datacnt >> 24);
ahd              1457 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr & SG_PTR_MASK);
ahd              1462 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_FIFO_USE_COUNT,
ahd              1463 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT) + 1);
ahd              1468 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, LONGJMP_ADDR, 0);
ahd              1474 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSEQINTSRC, CLRCFG4DATA);
ahd              1479 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, LONGJMP_ADDR+1)&INVALID_ADDR) != 0) {
ahd              1492 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, SG_STATE) & FETCH_INPROG) != 0)
ahd              1493 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CCSGCTL, 0);
ahd              1494 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SG_STATE, 0);
ahd              1500 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFCNTRL, ahd_inb(ahd, DFCNTRL) | FIFOFLUSH);
ahd              1505 drivers/scsi/aic7xxx/aic79xx_core.c 		sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
ahd              1506 drivers/scsi/aic7xxx/aic79xx_core.c 		resid = ahd_inl(ahd, SHCNT);
ahd              1507 drivers/scsi/aic7xxx/aic79xx_core.c 		resid |= ahd_inb_scbram(ahd, SCB_RESIDUAL_DATACNT+3) << 24;
ahd              1508 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, SCB_RESIDUAL_DATACNT, resid);
ahd              1509 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, SG_CACHE_SHADOW) & LAST_SEG) == 0) {
ahd              1517 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd_inb(ahd, SG_CACHE_SHADOW) & 0x80) != 0
ahd              1521 drivers/scsi/aic7xxx/aic79xx_core.c 			sgptr |= ahd_inb(ahd, SG_CACHE_SHADOW)
ahd              1523 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
ahd              1524 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_RESIDUAL_DATACNT + 3, 0);
ahd              1526 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_RESIDUAL_SGPTR,
ahd              1532 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outq(ahd, SCB_DATAPTR, ahd_inq(ahd, SHADDR));
ahd              1533 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, SCB_DATACNT, resid);
ahd              1534 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, SCB_SGPTR, sgptr);
ahd              1535 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSEQINTSRC, CLRSAVEPTRS);
ahd              1536 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEQIMODE,
ahd              1537 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb(ahd, SEQIMODE) | ENSAVEPTRS);
ahd              1542 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, DFCNTRL) & DIRECTION) != 0)
ahd              1544 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if ((ahd_inb(ahd, SG_STATE) & LOADING_NEEDED) != 0) {
ahd              1555 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, SG_STATE) & FETCH_INPROG) != 0) {
ahd              1556 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CCSGCTL, 0);
ahd              1557 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SG_STATE, LOADING_NEEDED);
ahd              1566 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, DFSTATUS) & PRELOAD_AVAIL) != 0
ahd              1567 drivers/scsi/aic7xxx/aic79xx_core.c 		 && (ahd_inb(ahd, DFCNTRL) & HDMAENACK) != 0) {
ahd              1573 drivers/scsi/aic7xxx/aic79xx_core.c 			sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
ahd              1575 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
ahd              1578 drivers/scsi/aic7xxx/aic79xx_core.c 				sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              1585 drivers/scsi/aic7xxx/aic79xx_core.c 				sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              1596 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_RESIDUAL_DATACNT+3, data_len >> 24);
ahd              1597 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
ahd              1604 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, SG_STATE, 0);
ahd              1606 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outq(ahd, HADDR, data_addr);
ahd              1607 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outl(ahd, HCNT, data_len & AHD_SG_LEN_MASK);
ahd              1608 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SG_CACHE_PRE, sgptr & 0xFF);
ahd              1613 drivers/scsi/aic7xxx/aic79xx_core.c 			dfcntrl = ahd_inb(ahd, DFCNTRL)|PRELOADEN|HDMAEN;
ahd              1614 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->features & AHD_NEW_DFCNTRL_OPTS) != 0) {
ahd              1622 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, DFCNTRL, dfcntrl);
ahd              1624 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if ((ahd_inb(ahd, SG_CACHE_SHADOW) & LAST_SEG_DONE) != 0) {
ahd              1630 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_SGPTR,
ahd              1631 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb_scbram(ahd, SCB_SGPTR) | SG_LIST_NULL);
ahd              1633 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if ((ahd_inb(ahd, DFSTATUS) & FIFOEMP) != 0) {
ahd              1640 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LONGJMP_ADDR + 1, INVALID_ADDR);
ahd              1641 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_FIFO_USE_COUNT,
ahd              1642 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT) - 1);
ahd              1643 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFFSXFRCTL, CLRCHN);
ahd              1658 drivers/scsi/aic7xxx/aic79xx_core.c ahd_run_qoutfifo(struct ahd_softc *ahd)
ahd              1664 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_RUNNING_QOUTFIFO) != 0)
ahd              1666 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_RUNNING_QOUTFIFO;
ahd              1667 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sync_qoutfifo(ahd, BUS_DMASYNC_POSTREAD);
ahd              1669 drivers/scsi/aic7xxx/aic79xx_core.c 		completion = &ahd->qoutfifo[ahd->qoutfifonext];
ahd              1671 drivers/scsi/aic7xxx/aic79xx_core.c 		if (completion->valid_tag != ahd->qoutfifonext_valid_tag)
ahd              1675 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scb_index);
ahd              1679 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scb_index,
ahd              1680 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd->qoutfifonext);
ahd              1681 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              1683 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_handle_scb_status(ahd, scb);
ahd              1685 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_done(ahd, scb);
ahd              1688 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->qoutfifonext = (ahd->qoutfifonext+1) & (AHD_QOUT_SIZE-1);
ahd              1689 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->qoutfifonext == 0)
ahd              1690 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->qoutfifonext_valid_tag ^= QOUTFIFO_ENTRY_VALID;
ahd              1692 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_RUNNING_QOUTFIFO;
ahd              1697 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_hwerrint(struct ahd_softc *ahd)
ahd              1706 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_inb(ahd, ERROR);
ahd              1710 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), ahd_hard_errors[i].errmesg);
ahd              1713 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dump_card_state(ahd);
ahd              1717 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_abort_scbs(ahd, CAM_TARGET_WILDCARD, ALL_CHANNELS,
ahd              1722 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_free(ahd);
ahd              1771 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
ahd              1780 drivers/scsi/aic7xxx/aic79xx_core.c 	seqintcode = ahd_inb(ahd, SEQINTCODE);
ahd              1781 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSEQINT);
ahd              1782 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) {
ahd              1789 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              1790 drivers/scsi/aic7xxx/aic79xx_core.c 		while (!ahd_is_paused(ahd))
ahd              1792 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSEQINT);
ahd              1794 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_update_modes(ahd);
ahd              1798 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), seqintcode);
ahd              1806 drivers/scsi/aic7xxx/aic79xx_core.c 		AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd              1808 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              1809 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1818 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
ahd              1819 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SAVED_LUN, scb->hscb->lun);
ahd              1820 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQ_FLAGS, 0x0);
ahd              1822 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, LQISTAT2) & LQIPHASE_OUTPKT) != 0
ahd              1823 drivers/scsi/aic7xxx/aic79xx_core.c 		 && (ahd_inb(ahd, SCSISIGO) & ATNO) != 0) {
ahd              1832 drivers/scsi/aic7xxx/aic79xx_core.c 				       "P0 assertion\n", ahd_name(ahd));
ahd              1837 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: Entering NONPACK\n", ahd_name(ahd));
ahd              1844 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              1847 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              1849 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              1856 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              1857 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1859 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              1861 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: ", ahd_name(ahd));
ahd              1863 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              1864 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              1872 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              1873 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              1875 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              1879 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outq(ahd, HADDR, scb->sense_busaddr);
ahd              1880 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, HCNT, AHD_SENSE_BUFSIZE);
ahd              1881 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, HCNT + 2, 0);
ahd              1882 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SG_CACHE_PRE, SG_LAST_SEG);
ahd              1883 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFCNTRL, PRELOADEN|SCSIEN|HDMAEN);
ahd              1890 drivers/scsi/aic7xxx/aic79xx_core.c 		bus_phase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK;
ahd              1892 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), bus_phase);
ahd              1902 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              1903 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: Issued Bus Reset.\n", ahd_name(ahd));
ahd              1925 drivers/scsi/aic7xxx/aic79xx_core.c 			scbid = ahd_get_scbptr(ahd);
ahd              1926 drivers/scsi/aic7xxx/aic79xx_core.c 			scb = ahd_lookup_scb(ahd, scbid);
ahd              1930 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_reset_channel(ahd, 'A',
ahd              1935 drivers/scsi/aic7xxx/aic79xx_core.c 					    SCB_GET_TARGET(ahd, scb),
ahd              1937 drivers/scsi/aic7xxx/aic79xx_core.c 					    SCB_GET_CHANNEL(ahd, scb),
ahd              1939 drivers/scsi/aic7xxx/aic79xx_core.c 			targ_info = ahd_fetch_transinfo(ahd,
ahd              1945 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              1947 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_syncrate(ahd, &devinfo, /*period*/0,
ahd              1951 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE, 0);
ahd              1952 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE+1, 0);
ahd              1953 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE+2, 0);
ahd              1954 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE+3, 0);
ahd              1955 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE+4, 0);
ahd              1956 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_STORE+5, 0);
ahd              1957 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CDB_LEN, 6);
ahd              1960 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CONTROL, scb->hscb->control);
ahd              1961 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              1962 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
ahd              1967 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SAVED_LUN, 0);
ahd              1968 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQ_FLAGS, 0);
ahd              1969 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_assert_atn(ahd);
ahd              1972 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_freeze_devq(ahd, scb);
ahd              1977 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_send_async(ahd, devinfo.channel, devinfo.target,
ahd              1984 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              1985 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRLQOINT1, CLRLQOPHACHGINPKT);
ahd              1986 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0) {
ahd              1987 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, CLRLQOINT1, 0);
ahd              1991 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_print_path(ahd, scb);
ahd              2008 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: CFG4OVERRUN mode = %x\n", ahd_name(ahd),
ahd              2009 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_inb(ahd, MODE_PTR));
ahd              2012 drivers/scsi/aic7xxx/aic79xx_core.c 		scb_index = ahd_get_scbptr(ahd);
ahd              2013 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scb_index);
ahd              2019 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_assert_atn(ahd);
ahd              2020 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              2021 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[0] = MSG_ABORT_TASK;
ahd              2022 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_len = 1;
ahd              2023 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_index = 0;
ahd              2024 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              2029 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_CONTROL,
ahd              2030 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb_scbram(ahd, SCB_CONTROL)
ahd              2037 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2046 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), ahd_inb(ahd, DFCNTRL),
ahd              2047 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_inb(ahd, SG_CACHE_SHADOW));
ahd              2050 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reinitialize_dataptrs(ahd);
ahd              2068 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_fetch_devinfo(ahd, &devinfo);
ahd              2069 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msg_type == MSG_TYPE_NONE) {
ahd              2074 drivers/scsi/aic7xxx/aic79xx_core.c 			bus_phase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK;
ahd              2083 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_dump_card_state(ahd);
ahd              2084 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_clear_intstat(ahd);
ahd              2085 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_restart(ahd);
ahd              2089 drivers/scsi/aic7xxx/aic79xx_core.c 			scb_index = ahd_get_scbptr(ahd);
ahd              2090 drivers/scsi/aic7xxx/aic79xx_core.c 			scb = ahd_lookup_scb(ahd, scb_index);
ahd              2093 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_setup_initiator_msgout(ahd,
ahd              2097 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd->msg_type =
ahd              2099 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd->msgin_index = 0;
ahd              2105 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd->msg_type =
ahd              2107 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd->msgin_index = 0;
ahd              2110 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_setup_target_msgin(ahd,
ahd              2117 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_message_phase(ahd);
ahd              2123 drivers/scsi/aic7xxx/aic79xx_core.c 		AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              2124 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
ahd              2128 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), 'A', ahd_inb(ahd, SELID) >> 4);
ahd              2131 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb(ahd, SAVED_SCSIID), ahd_inb(ahd, SAVED_LUN),
ahd              2132 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw(ahd, REG0), ahd_inb(ahd, ACCUM));
ahd              2135 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb(ahd, SEQ_FLAGS), ahd_get_scbptr(ahd),
ahd              2136 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_find_busy_tcl(ahd,
ahd              2137 drivers/scsi/aic7xxx/aic79xx_core.c 					 BUILD_TCL(ahd_inb(ahd, SAVED_SCSIID),
ahd              2138 drivers/scsi/aic7xxx/aic79xx_core.c 						   ahd_inb(ahd, SAVED_LUN))),
ahd              2139 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw(ahd, SINDEX));
ahd              2142 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb(ahd, SELID), ahd_inb_scbram(ahd, SCB_SCSIID),
ahd              2143 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb_scbram(ahd, SCB_LUN),
ahd              2144 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb_scbram(ahd, SCB_CONTROL));
ahd              2146 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb(ahd, SCSIBUS), ahd_inb(ahd, SCSISIGI));
ahd              2147 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("SXFRCTL0 == 0x%x\n", ahd_inb(ahd, SXFRCTL0));
ahd              2148 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("SEQCTL0 == 0x%x\n", ahd_inb(ahd, SEQCTL0));
ahd              2149 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2150 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[0] = MSG_BUS_DEV_RESET;
ahd              2151 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len = 1;
ahd              2152 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              2153 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              2154 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              2155 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_assert_atn(ahd);
ahd              2160 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_proto_violation(ahd);
ahd              2167 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_fetch_devinfo(ahd, &devinfo);
ahd              2168 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_ign_wide_residue(ahd, &devinfo);
ahd              2175 drivers/scsi/aic7xxx/aic79xx_core.c 		lastphase = ahd_inb(ahd, LASTPHASE);
ahd              2178 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), 'A',
ahd              2179 drivers/scsi/aic7xxx/aic79xx_core.c 		       SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)),
ahd              2180 drivers/scsi/aic7xxx/aic79xx_core.c 		       lastphase, ahd_inb(ahd, SCSISIGI));
ahd              2187 drivers/scsi/aic7xxx/aic79xx_core.c 		lastphase = ahd_inb(ahd, LASTPHASE);
ahd              2190 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), 'A',
ahd              2191 drivers/scsi/aic7xxx/aic79xx_core.c 		       SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)),
ahd              2192 drivers/scsi/aic7xxx/aic79xx_core.c 		       lastphase, ahd_inb(ahd, SCSISIGI));
ahd              2193 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_restart(ahd);
ahd              2212 drivers/scsi/aic7xxx/aic79xx_core.c 		scbindex = ahd_get_scbptr(ahd);
ahd              2213 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbindex);
ahd              2215 drivers/scsi/aic7xxx/aic79xx_core.c 		lastphase = ahd_inb(ahd, LASTPHASE);
ahd              2217 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              2221 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              2224 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_inb(ahd, SEQ_FLAGS) & DPHASE
ahd              2235 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_freeze_devq(ahd, scb);
ahd              2246 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_fetch_devinfo(ahd, &devinfo);
ahd              2248 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), devinfo.channel, devinfo.target,
ahd              2250 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              2251 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2258 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
ahd              2259 drivers/scsi/aic7xxx/aic79xx_core.c 					   SCB_GET_CHANNEL(ahd, scb),
ahd              2263 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_CONTROL,
ahd              2264 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb_scbram(ahd, SCB_CONTROL) & ~MK_MESSAGE);
ahd              2272 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              2273 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2279 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              2293 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
ahd              2304 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_scb_devinfo(ahd, &devinfo, scb);
ahd              2306 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_handle_devreset(ahd, &devinfo, lun,
ahd              2330 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              2331 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2337 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              2346 drivers/scsi/aic7xxx/aic79xx_core.c 			while ((ahd_inb(ahd, SCSISEQ0) & ENSELO) != 0
ahd              2347 drivers/scsi/aic7xxx/aic79xx_core.c 			    && (ahd_inb(ahd, SSTAT0) & SELDO) == 0
ahd              2348 drivers/scsi/aic7xxx/aic79xx_core.c 			    && (ahd_inb(ahd, SSTAT1) & SELTO) == 0)
ahd              2350 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_TASK_MANAGEMENT, 0);
ahd              2351 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
ahd              2352 drivers/scsi/aic7xxx/aic79xx_core.c 					   SCB_GET_CHANNEL(ahd, scb),  
ahd              2363 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Tracepoint %d\n", ahd_name(ahd),
ahd              2369 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_hwerrint(ahd);
ahd              2372 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Unexpected SEQINTCODE %d\n", ahd_name(ahd),
ahd              2381 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_unpause(ahd);
ahd              2385 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
ahd              2396 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_update_modes(ahd);
ahd              2397 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2399 drivers/scsi/aic7xxx/aic79xx_core.c 	status3 = ahd_inb(ahd, SSTAT3) & (NTRAMPERR|OSRAMPERR);
ahd              2400 drivers/scsi/aic7xxx/aic79xx_core.c 	status0 = ahd_inb(ahd, SSTAT0) & (IOERR|OVERRUN|SELDI|SELDO);
ahd              2401 drivers/scsi/aic7xxx/aic79xx_core.c 	status = ahd_inb(ahd, SSTAT1) & (SELTO|SCSIRSTI|BUSFREE|SCSIPERR);
ahd              2402 drivers/scsi/aic7xxx/aic79xx_core.c 	lqistat1 = ahd_inb(ahd, LQISTAT1);
ahd              2403 drivers/scsi/aic7xxx/aic79xx_core.c 	lqostat0 = ahd_inb(ahd, LQOSTAT0);
ahd              2404 drivers/scsi/aic7xxx/aic79xx_core.c 	busfreetime = ahd_inb(ahd, SSTAT2) & BUSFREETIME;
ahd              2409 drivers/scsi/aic7xxx/aic79xx_core.c 	if (((status & SCSIRSTI) != 0) && (ahd->flags & AHD_BUS_RESET_ACTIVE)) {
ahd              2410 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRSCSIRSTI);
ahd              2417 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_BUS_RESET_ACTIVE;
ahd              2422 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              2423 drivers/scsi/aic7xxx/aic79xx_core.c 		simode0 = ahd_inb(ahd, SIMODE0);
ahd              2425 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2427 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_get_scbptr(ahd);
ahd              2428 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scbid);
ahd              2430 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, SEQ_FLAGS) & NOT_IDENTIFIED) != 0)
ahd              2436 drivers/scsi/aic7xxx/aic79xx_core.c 		now_lvd = ahd_inb(ahd, SBLKCTL) & ENAB40;
ahd              2438 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), now_lvd ? "LVD" : "SE");
ahd              2439 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT0, CLRIOERR);
ahd              2443 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2444 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              2445 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_setup_iocell_workaround(ahd);
ahd              2446 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              2450 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              2451 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2454 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Someone reset channel A\n", ahd_name(ahd));
ahd              2455 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/FALSE);
ahd              2459 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_critical_section(ahd);
ahd              2461 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_transmission_error(ahd);
ahd              2464 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: lqostat0 == 0x%x!\n", ahd_name(ahd), lqostat0);
ahd              2465 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRLQOINT0, lqostat0);
ahd              2466 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
ahd              2467 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRLQOINT1, 0);
ahd              2470 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, 0);
ahd              2473 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_critical_section(ahd);
ahd              2476 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_msg_state(ahd);
ahd              2479 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRSELTIMEO|CLRBUSFREE|CLRSCSIPERR);
ahd              2489 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT0, CLRSELINGO);
ahd              2491 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_inw(ahd, WAITING_TID_HEAD);
ahd              2492 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2496 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              2497 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              2502 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_print_path(ahd, scb);
ahd              2507 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_scb_devinfo(ahd, &devinfo, scb);
ahd              2509 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_freeze_devq(ahd, scb);
ahd              2517 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_handle_devreset(ahd, &devinfo,
ahd              2523 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              2524 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_iocell_first_selection(ahd);
ahd              2525 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              2528 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_iocell_first_selection(ahd);
ahd              2529 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              2532 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), status3);
ahd              2533 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT3, status3);
ahd              2537 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_critical_section(ahd);
ahd              2539 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_lqiphase_error(ahd, lqistat1);
ahd              2547 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRLQIINT1, CLRLQICRCI_NLQ);
ahd              2562 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, 0);
ahd              2565 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_critical_section(ahd);
ahd              2572 drivers/scsi/aic7xxx/aic79xx_core.c 		busfreetime = ahd_inb(ahd, SSTAT2) & BUSFREETIME;
ahd              2573 drivers/scsi/aic7xxx/aic79xx_core.c 		lqostat1 = ahd_inb(ahd, LQOSTAT1);
ahd              2580 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_modes(ahd, mode, mode);
ahd              2581 drivers/scsi/aic7xxx/aic79xx_core.c 			scbid = ahd_get_scbptr(ahd);
ahd              2582 drivers/scsi/aic7xxx/aic79xx_core.c 			scb = ahd_lookup_scb(ahd, scbid);
ahd              2586 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), scbid, mode);
ahd              2601 drivers/scsi/aic7xxx/aic79xx_core.c 			 && ahd_inb(ahd, LASTPHASE) == P_BUSFREE
ahd              2602 drivers/scsi/aic7xxx/aic79xx_core.c 			 && (ahd_inb(ahd, SSTAT0) & SELDI) == 0
ahd              2603 drivers/scsi/aic7xxx/aic79xx_core.c 			 && ((ahd_inb(ahd, SSTAT0) & SELDO) == 0
ahd              2604 drivers/scsi/aic7xxx/aic79xx_core.c 			  || (ahd_inb(ahd, SCSISEQ0) & ENSELO) == 0))
ahd              2624 drivers/scsi/aic7xxx/aic79xx_core.c 		if (packetized && ahd_inb(ahd, LASTPHASE) == P_BUSFREE) {
ahd              2625 drivers/scsi/aic7xxx/aic79xx_core.c 			restart = ahd_handle_pkt_busfree(ahd, busfreetime);
ahd              2628 drivers/scsi/aic7xxx/aic79xx_core.c 			restart = ahd_handle_nonpkt_busfree(ahd);
ahd              2641 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRBUSFREE);
ahd              2643 drivers/scsi/aic7xxx/aic79xx_core.c 		 && (ahd->bugs & AHD_BUSFREEREV_BUG) != 0)
ahd              2644 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SIMODE1,
ahd              2645 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb(ahd, SIMODE1) & ~ENBUSFREE);
ahd              2648 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_clear_fifo(ahd, mode);
ahd              2650 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_msg_state(ahd);
ahd              2651 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              2653 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_restart(ahd);
ahd              2655 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unpause(ahd);
ahd              2659 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), status);
ahd              2660 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2661 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_clear_intstat(ahd);
ahd              2662 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              2667 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_transmission_error(struct ahd_softc *ahd)
ahd              2681 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2682 drivers/scsi/aic7xxx/aic79xx_core.c 	lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ);
ahd              2683 drivers/scsi/aic7xxx/aic79xx_core.c 	lqistat2 = ahd_inb(ahd, LQISTAT2);
ahd              2685 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) {
ahd              2688 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              2689 drivers/scsi/aic7xxx/aic79xx_core.c 		lqistate = ahd_inb(ahd, LQISTATE);
ahd              2695 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd));
ahd              2700 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2703 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQIINT1, lqistat1);
ahd              2704 drivers/scsi/aic7xxx/aic79xx_core.c 	lastphase = ahd_inb(ahd, LASTPHASE);
ahd              2705 drivers/scsi/aic7xxx/aic79xx_core.c 	curphase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK;
ahd              2706 drivers/scsi/aic7xxx/aic79xx_core.c 	perrdiag = ahd_inb(ahd, PERRDIAG);
ahd              2708 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT1, CLRSCSIPERR);
ahd              2717 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_active_fifo(ahd);
ahd              2718 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              2719 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2726 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Transmission error detected\n", ahd_name(ahd));
ahd              2732 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2739 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), lqistat1);
ahd              2741 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2765 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQCTL2, LQIRETRY);
ahd              2817 drivers/scsi/aic7xxx/aic79xx_core.c 			       "Resetting bus\n", ahd_name(ahd));
ahd              2818 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2823 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2831 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_inb(ahd, SCSIDAT);
ahd              2845 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->send_msg_perror = msg_out;
ahd              2848 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              2849 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              2850 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_unpause(ahd);
ahd              2854 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_lqiphase_error(struct ahd_softc *ahd, u_int lqistat1)
ahd              2859 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2860 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQIINT1, lqistat1);
ahd              2870 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_active_fifo(ahd);
ahd              2871 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SCSISIGO) & ATNO) != 0
ahd              2872 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, MDFFSTAT) & DLZERO) != 0) {
ahd              2875 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQCTL2, LQIRETRY);
ahd              2878 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQCTL2, LQIRETRY);
ahd              2881 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2882 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              2883 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              2886 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              2887 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
ahd              2896 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime)
ahd              2900 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd              2902 drivers/scsi/aic7xxx/aic79xx_core.c 	lqostat1 = ahd_inb(ahd, LQOSTAT1);
ahd              2926 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2927 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_inw(ahd, CURRSCB);
ahd              2928 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              2934 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRLQOINT1, CLRLQOBUSFREE);
ahd              2935 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
ahd              2936 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRLQOINT1, 0);
ahd              2937 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
ahd              2938 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_flush_device_writes(ahd);
ahd              2939 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT0, CLRSELDO);
ahd              2947 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQCTL2, ahd_inb(ahd, LQCTL2) | LQOTOIDLE);
ahd              2953 drivers/scsi/aic7xxx/aic79xx_core.c 		waiting_h = ahd_inw(ahd, WAITING_TID_HEAD);
ahd              2954 drivers/scsi/aic7xxx/aic79xx_core.c 		saved_scbptr = ahd_get_scbptr(ahd);
ahd              2957 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, WAITING_TID_HEAD, scbid);
ahd              2958 drivers/scsi/aic7xxx/aic79xx_core.c 			waiting_t = ahd_inw(ahd, WAITING_TID_TAIL);
ahd              2960 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, WAITING_TID_TAIL, scbid);
ahd              2963 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_set_scbptr(ahd, waiting_h);
ahd              2964 drivers/scsi/aic7xxx/aic79xx_core.c 				next = ahd_inw_scbram(ahd, SCB_NEXT2);
ahd              2966 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_scbptr(ahd, scbid);
ahd              2967 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, SCB_NEXT2, next);
ahd              2969 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, saved_scbptr);
ahd              2972 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_print_path(ahd, scb);
ahd              2980 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_freeze_devq(ahd, scb);
ahd              2984 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if ((ahd_inb(ahd, PERRDIAG) & PARITYERR) != 0) {
ahd              2992 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRSCSIPERR|CLRBUSFREE);
ahd              2997 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd));
ahd              3002 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->src_mode != AHD_MODE_SCSI) {
ahd              3006 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_get_scbptr(ahd);
ahd              3007 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              3008 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              3010 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              3011 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A',
ahd              3018 drivers/scsi/aic7xxx/aic79xx_core.c 	printk("%s: Unexpected PKT busfree condition\n", ahd_name(ahd));
ahd              3019 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dump_card_state(ahd);
ahd              3028 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
ahd              3046 drivers/scsi/aic7xxx/aic79xx_core.c 	lastphase = ahd_inb(ahd, LASTPHASE);
ahd              3047 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scsiid = ahd_inb(ahd, SAVED_SCSIID);
ahd              3048 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_lun = ahd_inb(ahd, SAVED_LUN);
ahd              3049 drivers/scsi/aic7xxx/aic79xx_core.c 	target = SCSIID_TARGET(ahd, saved_scsiid);
ahd              3055 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_get_scbptr(ahd);
ahd              3056 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scbid);
ahd              3058 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, SEQ_FLAGS) & NOT_IDENTIFIED) != 0)
ahd              3061 drivers/scsi/aic7xxx/aic79xx_core.c 	ppr_busfree = (ahd->msg_flags & MSG_FLAG_EXPECT_PPR_BUSFREE) != 0;
ahd              3066 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_sent_msg(ahd, AHDMSG_1B, MSG_ABORT_TAG, TRUE)
ahd              3067 drivers/scsi/aic7xxx/aic79xx_core.c 		 || ahd_sent_msg(ahd, AHDMSG_1B, MSG_ABORT, TRUE)) {
ahd              3072 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_print_devinfo(ahd, &devinfo);
ahd              3078 drivers/scsi/aic7xxx/aic79xx_core.c 			sent_msg = ahd->msgout_buf[ahd->msgout_index - 1];
ahd              3079 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3103 drivers/scsi/aic7xxx/aic79xx_core.c 			found = ahd_abort_scbs(ahd, target, 'A', saved_lun,
ahd              3108 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if (ahd_sent_msg(ahd, AHDMSG_1B,
ahd              3118 drivers/scsi/aic7xxx/aic79xx_core.c 			 && ahd_match_scb(ahd, scb, target, 'A',
ahd              3123 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_handle_devreset(ahd, &devinfo, CAM_LUN_WILDCARD,
ahd              3127 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_PPR, FALSE)
ahd              3146 drivers/scsi/aic7xxx/aic79xx_core.c 			tinfo = ahd_fetch_transinfo(ahd, devinfo.channel,
ahd              3150 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_set_width(ahd, &devinfo,
ahd              3154 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_set_syncrate(ahd, &devinfo,
ahd              3175 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_freeze_devq(ahd, scb);
ahd              3176 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_qinfifo_requeue_tail(ahd, scb);
ahd              3180 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, FALSE)
ahd              3190 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_width(ahd, &devinfo,
ahd              3201 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_freeze_devq(ahd, scb);
ahd              3202 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_qinfifo_requeue_tail(ahd, scb);
ahd              3205 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, FALSE)
ahd              3215 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_syncrate(ahd, &devinfo,
ahd              3227 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_freeze_devq(ahd, scb);
ahd              3228 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_qinfifo_requeue_tail(ahd, scb);
ahd              3231 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if ((ahd->msg_flags & MSG_FLAG_EXPECT_IDE_BUSFREE) != 0
ahd              3232 drivers/scsi/aic7xxx/aic79xx_core.c 			&& ahd_sent_msg(ahd, AHDMSG_1B,
ahd              3240 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if ((ahd->msg_flags & MSG_FLAG_EXPECT_QASREJ_BUSFREE)
ahd              3241 drivers/scsi/aic7xxx/aic79xx_core.c 			&& ahd_sent_msg(ahd, AHDMSG_1B,
ahd              3259 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ((ahd->msg_flags & MSG_FLAG_EXPECT_PPR_BUSFREE) != 0)) {
ahd              3261 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_freeze_devq(ahd, scb);
ahd              3264 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->msg_flags & MSG_FLAG_IU_REQ_CHANGED) != 0) {
ahd              3265 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
ahd              3266 drivers/scsi/aic7xxx/aic79xx_core.c 				       SCB_GET_CHANNEL(ahd, scb),
ahd              3274 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_done(ahd, scb);
ahd              3289 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3290 drivers/scsi/aic7xxx/aic79xx_core.c 			aborted = ahd_abort_scbs(ahd, target, 'A',
ahd              3299 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: ", ahd_name(ahd));
ahd              3305 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw(ahd, PRGMCNT));
ahd              3306 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dump_card_state(ahd);
ahd              3308 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_force_renegotiation(ahd, &devinfo);
ahd              3315 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_proto_violation(struct ahd_softc *ahd)
ahd              3325 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_fetch_devinfo(ahd, &devinfo);
ahd              3326 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_get_scbptr(ahd);
ahd              3327 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scbid);
ahd              3328 drivers/scsi/aic7xxx/aic79xx_core.c 	seq_flags = ahd_inb(ahd, SEQ_FLAGS);
ahd              3329 drivers/scsi/aic7xxx/aic79xx_core.c 	curphase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK;
ahd              3330 drivers/scsi/aic7xxx/aic79xx_core.c 	lastphase = ahd_inb(ahd, LASTPHASE);
ahd              3338 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_devinfo(ahd, &devinfo);
ahd              3347 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_devinfo(ahd, &devinfo);
ahd              3353 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3355 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if ((ahd_inb_scbram(ahd, SCB_CONTROL)
ahd              3364 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3367 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3369 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              3381 drivers/scsi/aic7xxx/aic79xx_core.c 		found = ahd_reset_channel(ahd, 'A', TRUE);
ahd              3383 drivers/scsi/aic7xxx/aic79xx_core.c 		       "%d SCBs aborted\n", ahd_name(ahd), 'A', found);
ahd              3390 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0,
ahd              3391 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
ahd              3392 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_assert_atn(ahd);
ahd              3393 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              3395 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_devinfo(ahd, &devinfo);
ahd              3396 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[0] = MSG_ABORT_TASK;
ahd              3397 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_len = 1;
ahd              3398 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_index = 0;
ahd              3399 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              3401 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              3414 drivers/scsi/aic7xxx/aic79xx_core.c ahd_force_renegotiation(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              3421 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_devinfo(ahd, devinfo);
ahd              3425 drivers/scsi/aic7xxx/aic79xx_core.c 	targ_info = ahd_fetch_transinfo(ahd,
ahd              3430 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_update_neg_request(ahd, devinfo, tstate,
ahd              3436 drivers/scsi/aic7xxx/aic79xx_core.c ahd_clear_critical_section(struct ahd_softc *ahd)
ahd              3450 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->num_critical_sections == 0)
ahd              3463 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              3469 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              3470 drivers/scsi/aic7xxx/aic79xx_core.c 		seqaddr = ahd_inw(ahd, CURADDR);
ahd              3472 drivers/scsi/aic7xxx/aic79xx_core.c 		cs = ahd->critical_sections;
ahd              3473 drivers/scsi/aic7xxx/aic79xx_core.c 		for (i = 0; i < ahd->num_critical_sections; i++, cs++) {
ahd              3479 drivers/scsi/aic7xxx/aic79xx_core.c 		if (i == ahd->num_critical_sections)
ahd              3485 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), ahd_name(ahd), first_instr,
ahd              3487 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              3494 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: Single stepping at 0x%x\n", ahd_name(ahd),
ahd              3500 drivers/scsi/aic7xxx/aic79xx_core.c   			ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              3501 drivers/scsi/aic7xxx/aic79xx_core.c   			simode0 = ahd_inb(ahd, SIMODE0);
ahd              3502 drivers/scsi/aic7xxx/aic79xx_core.c 			simode3 = ahd_inb(ahd, SIMODE3);
ahd              3503 drivers/scsi/aic7xxx/aic79xx_core.c 			lqimode0 = ahd_inb(ahd, LQIMODE0);
ahd              3504 drivers/scsi/aic7xxx/aic79xx_core.c 			lqimode1 = ahd_inb(ahd, LQIMODE1);
ahd              3505 drivers/scsi/aic7xxx/aic79xx_core.c 			lqomode0 = ahd_inb(ahd, LQOMODE0);
ahd              3506 drivers/scsi/aic7xxx/aic79xx_core.c 			lqomode1 = ahd_inb(ahd, LQOMODE1);
ahd              3507 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SIMODE0, 0);
ahd              3508 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SIMODE3, 0);
ahd              3509 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQIMODE0, 0);
ahd              3510 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQIMODE1, 0);
ahd              3511 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQOMODE0, 0);
ahd              3512 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LQOMODE1, 0);
ahd              3513 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              3514 drivers/scsi/aic7xxx/aic79xx_core.c 			simode1 = ahd_inb(ahd, SIMODE1);
ahd              3521 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SIMODE1, simode1 & ENBUSFREE);
ahd              3522 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) | STEP);
ahd              3525 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRBUSFREE);
ahd              3526 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              3527 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode);
ahd              3528 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, HCNTRL, ahd->unpause);
ahd              3529 drivers/scsi/aic7xxx/aic79xx_core.c 		while (!ahd_is_paused(ahd))
ahd              3531 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_modes(ahd);
ahd              3534 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              3535 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SIMODE0, simode0);
ahd              3536 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SIMODE3, simode3);
ahd              3537 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQIMODE0, lqimode0);
ahd              3538 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQIMODE1, lqimode1);
ahd              3539 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQOMODE0, lqomode0);
ahd              3540 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQOMODE1, lqomode1);
ahd              3541 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              3542 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP);
ahd              3543 drivers/scsi/aic7xxx/aic79xx_core.c   		ahd_outb(ahd, SIMODE1, simode1);
ahd              3550 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              3552 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              3559 drivers/scsi/aic7xxx/aic79xx_core.c ahd_clear_intstat(struct ahd_softc *ahd)
ahd              3561 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd              3564 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQIINT0, CLRLQIATNQAS|CLRLQICRCT1|CLRLQICRCT2
ahd              3566 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQIINT1, CLRLQIPHASE_LQ|CLRLQIPHASE_NLQ|CLRLIQABORT
ahd              3569 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQOINT0, CLRLQOTARGSCBPERR|CLRLQOSTOPT2|CLRLQOATNLQ
ahd              3571 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRLQOINT1, CLRLQOINITSCBPERR|CLRLQOSTOPI2|CLRLQOBADQAS
ahd              3573 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0) {
ahd              3574 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRLQOINT0, 0);
ahd              3575 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRLQOINT1, 0);
ahd              3577 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT3, CLRNTRAMPERR|CLROSRAMPERR);
ahd              3578 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT1, CLRSELTIMEO|CLRATNO|CLRSCSIRSTI
ahd              3580 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT0, CLRSELDO|CLRSELDI|CLRSELINGO
ahd              3582 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              3623 drivers/scsi/aic7xxx/aic79xx_core.c ahd_alloc_tstate(struct ahd_softc *ahd, u_int scsi_id, char channel)
ahd              3629 drivers/scsi/aic7xxx/aic79xx_core.c 	master_tstate = ahd->enabled_targets[ahd->our_id];
ahd              3630 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->enabled_targets[scsi_id] != NULL
ahd              3631 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ahd->enabled_targets[scsi_id] != master_tstate)
ahd              3633 drivers/scsi/aic7xxx/aic79xx_core.c 		      ahd_name(ahd));
ahd              3655 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->enabled_targets[scsi_id] = tstate;
ahd              3665 drivers/scsi/aic7xxx/aic79xx_core.c ahd_free_tstate(struct ahd_softc *ahd, u_int scsi_id, char channel, int force)
ahd              3673 drivers/scsi/aic7xxx/aic79xx_core.c 	if (scsi_id == ahd->our_id
ahd              3677 drivers/scsi/aic7xxx/aic79xx_core.c 	tstate = ahd->enabled_targets[scsi_id];
ahd              3680 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->enabled_targets[scsi_id] = NULL;
ahd              3691 drivers/scsi/aic7xxx/aic79xx_core.c ahd_devlimited_syncrate(struct ahd_softc *ahd,
ahd              3698 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SBLKCTL) & ENAB40) != 0
ahd              3699 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, SSTAT2) & EXP_ACTIVE) == 0) {
ahd              3730 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_find_syncrate(ahd, period, ppr_options, maxsync);
ahd              3740 drivers/scsi/aic7xxx/aic79xx_core.c ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
ahd              3779 drivers/scsi/aic7xxx/aic79xx_core.c ahd_validate_offset(struct ahd_softc *ahd,
ahd              3790 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_PACED_NEGTABLE_BUG) != 0)
ahd              3810 drivers/scsi/aic7xxx/aic79xx_core.c ahd_validate_width(struct ahd_softc *ahd, struct ahd_initiator_tinfo *tinfo,
ahd              3815 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->features & AHD_WIDE) {
ahd              3840 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_neg_request(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              3854 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->features & AHD_WIDE) != 0)
ahd              3883 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              3903 drivers/scsi/aic7xxx/aic79xx_core.c 	tinfo = ahd_fetch_transinfo(ahd, devinfo->channel, devinfo->our_scsiid,
ahd              3933 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_send_async(ahd, devinfo->channel, devinfo->target,
ahd              3941 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->target,
ahd              3971 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->target,
ahd              3987 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_pause(ahd);
ahd              3988 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_neg_table(ahd, devinfo, &tinfo->curr);
ahd              3990 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unpause(ahd);
ahd              3991 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msg_type != MSG_TYPE_NONE) {
ahd              3996 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_print_devinfo(ahd, devinfo);
ahd              4000 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_flags |= MSG_FLAG_EXPECT_PPR_BUSFREE
ahd              4008 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_flags |= MSG_FLAG_EXPECT_PPR_BUSFREE;
ahd              4013 drivers/scsi/aic7xxx/aic79xx_core.c 	update_needed += ahd_update_neg_request(ahd, devinfo, tstate,
ahd              4017 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_pending_scbs(ahd);
ahd              4029 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_width(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4040 drivers/scsi/aic7xxx/aic79xx_core.c 	tinfo = ahd_fetch_transinfo(ahd, devinfo->channel, devinfo->our_scsiid,
ahd              4055 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_send_async(ahd, devinfo->channel, devinfo->target,
ahd              4059 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), devinfo->target,
ahd              4066 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_pause(ahd);
ahd              4067 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_neg_table(ahd, devinfo, &tinfo->curr);
ahd              4069 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unpause(ahd);
ahd              4072 drivers/scsi/aic7xxx/aic79xx_core.c 	update_needed += ahd_update_neg_request(ahd, devinfo, tstate,
ahd              4075 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_pending_scbs(ahd);
ahd              4083 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_tags(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
ahd              4088 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_set_tags(ahd, sdev, devinfo, alg);
ahd              4089 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_send_async(ahd, devinfo->channel, devinfo->target,
ahd              4094 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4103 drivers/scsi/aic7xxx/aic79xx_core.c 	uint8_t		iocell_opts[sizeof(ahd->iocell_opts)];
ahd              4105 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              4106 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              4108 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_negoaddr = ahd_inb(ahd, NEGOADDR);
ahd              4109 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGOADDR, devinfo->target);
ahd              4112 drivers/scsi/aic7xxx/aic79xx_core.c 	memcpy(iocell_opts, ahd->iocell_opts, sizeof(ahd->iocell_opts)); 
ahd              4120 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_PACED_NEGTABLE_BUG) != 0) {
ahd              4152 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->features & AHD_NEW_IOCELL_OPTS) != 0
ahd              4164 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->bugs & AHD_PACED_NEGTABLE_BUG) != 0) {
ahd              4174 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ANNEXCOL, AHD_ANNEXCOL_PRECOMP_SLEW);
ahd              4175 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ANNEXDAT, iocell_opts[AHD_PRECOMP_SLEW_INDEX]);
ahd              4176 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ANNEXCOL, AHD_ANNEXCOL_AMPLITUDE);
ahd              4177 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ANNEXDAT, iocell_opts[AHD_AMPLITUDE_INDEX]);
ahd              4179 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGPERIOD, period);
ahd              4180 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGPPROPTS, ppr_opts);
ahd              4181 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGOFFSET, offset);
ahd              4191 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->features & AHD_AIC79XXB_SLOWCRC) {
ahd              4202 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGCONOPTS, con_opts);
ahd              4203 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, NEGOADDR, saved_negoaddr);
ahd              4204 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              4214 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_pending_scbs(struct ahd_softc *ahd)
ahd              4233 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) {
ahd              4238 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_scb_devinfo(ahd, &devinfo, pending_scb);
ahd              4239 drivers/scsi/aic7xxx/aic79xx_core.c 		tinfo = ahd_fetch_transinfo(ahd, devinfo.channel,
ahd              4247 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sync_scb(ahd, pending_scb,
ahd              4255 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_is_paused(ahd)) {
ahd              4259 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              4270 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              4271 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              4272 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SCSISIGI) & BSYI) != 0
ahd              4273 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)) == 0)
ahd              4274 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
ahd              4275 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scbptr = ahd_get_scbptr(ahd);
ahd              4277 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) {
ahd              4282 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scb_tag);
ahd              4283 drivers/scsi/aic7xxx/aic79xx_core.c 		control = ahd_inb_scbram(ahd, SCB_CONTROL);
ahd              4286 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_CONTROL, control);
ahd              4288 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scbptr);
ahd              4289 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              4292 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              4297 drivers/scsi/aic7xxx/aic79xx_core.c ahd_fetch_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              4304 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              4305 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              4307 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_inb(ahd, SSTAT0) & TARGET)
ahd              4313 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd_inb(ahd, SEQ_FLAGS) & CMDPHASE_PENDING) != 0) {
ahd              4315 drivers/scsi/aic7xxx/aic79xx_core.c 		our_id = ahd_inb(ahd, TARGIDIN) & OID;
ahd              4317 drivers/scsi/aic7xxx/aic79xx_core.c 		our_id = ahd_inb(ahd, TOWNID);
ahd              4319 drivers/scsi/aic7xxx/aic79xx_core.c 		our_id = ahd_inb(ahd, IOWNID);
ahd              4321 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scsiid = ahd_inb(ahd, SAVED_SCSIID);
ahd              4324 drivers/scsi/aic7xxx/aic79xx_core.c 			    SCSIID_TARGET(ahd, saved_scsiid),
ahd              4325 drivers/scsi/aic7xxx/aic79xx_core.c 			    ahd_inb(ahd, SAVED_LUN),
ahd              4326 drivers/scsi/aic7xxx/aic79xx_core.c 			    SCSIID_CHANNEL(ahd, saved_scsiid),
ahd              4328 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              4332 drivers/scsi/aic7xxx/aic79xx_core.c ahd_print_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              4334 drivers/scsi/aic7xxx/aic79xx_core.c 	printk("%s:%c:%d:%d: ", ahd_name(ahd), 'A',
ahd              4372 drivers/scsi/aic7xxx/aic79xx_core.c ahd_scb_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4382 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahd, scb),
ahd              4383 drivers/scsi/aic7xxx/aic79xx_core.c 			    SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), role);
ahd              4395 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4403 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index = 0;
ahd              4404 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len = 0;
ahd              4406 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_currently_packetized(ahd))
ahd              4407 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_flags |= MSG_FLAG_PACKETIZED;
ahd              4409 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->send_msg_perror
ahd              4410 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ahd_inb(ahd, MSG_OUT) == HOST_MSG) {
ahd              4411 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[ahd->msgout_index++] = ahd->send_msg_perror;
ahd              4412 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len++;
ahd              4413 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              4421 drivers/scsi/aic7xxx/aic79xx_core.c 		       "I_T msgin.  Issuing NO-OP\n", ahd_name(ahd));
ahd              4422 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[ahd->msgout_index++] = MSG_NOOP;
ahd              4423 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len++;
ahd              4424 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              4430 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ahd_inb(ahd, MSG_OUT) == MSG_IDENTIFYFLAG) {
ahd              4436 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[ahd->msgout_index++] = identify_msg;
ahd              4437 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len++;
ahd              4440 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[ahd->msgout_index++] =
ahd              4442 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[ahd->msgout_index++] = SCB_GET_TAG(scb);
ahd              4443 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_len += 2;
ahd              4448 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[ahd->msgout_index++] = MSG_BUS_DEV_RESET;
ahd              4449 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len++;
ahd              4450 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              4459 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, 0);
ahd              4463 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[ahd->msgout_index++] = MSG_ABORT_TAG;
ahd              4465 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf[ahd->msgout_index++] = MSG_ABORT;
ahd              4467 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len++;
ahd              4468 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              4478 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, 0);
ahd              4480 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_build_transfer_msg(ahd, devinfo);
ahd              4488 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSISEQ0, 0);
ahd              4496 drivers/scsi/aic7xxx/aic79xx_core.c 		      ahd_inb_scbram(ahd, SCB_CONTROL), ahd_inb(ahd, MSG_OUT),
ahd              4504 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCB_CONTROL,
ahd              4505 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_inb_scbram(ahd, SCB_CONTROL) & ~MK_MESSAGE);
ahd              4507 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index = 0;
ahd              4508 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              4516 drivers/scsi/aic7xxx/aic79xx_core.c ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              4532 drivers/scsi/aic7xxx/aic79xx_core.c 	tinfo = ahd_fetch_transinfo(ahd, devinfo->channel, devinfo->our_scsiid,
ahd              4546 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_devlimited_syncrate(ahd, tinfo, &period,
ahd              4567 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->features & AHD_WIDE) != 0)
ahd              4573 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_devinfo(ahd, devinfo);
ahd              4592 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_validate_offset(ahd, tinfo, period, &offset,
ahd              4597 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_construct_ppr(ahd, devinfo, period, offset,
ahd              4600 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_construct_sdtr(ahd, devinfo, period, offset);
ahd              4603 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_construct_wdtr(ahd, devinfo, tinfo->goal.width);
ahd              4612 drivers/scsi/aic7xxx/aic79xx_core.c ahd_construct_sdtr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4617 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index += spi_populate_sync_msg(
ahd              4618 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf + ahd->msgout_index, period, offset);
ahd              4619 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len += 5;
ahd              4622 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), devinfo->channel, devinfo->target,
ahd              4632 drivers/scsi/aic7xxx/aic79xx_core.c ahd_construct_wdtr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4635 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index += spi_populate_width_msg(
ahd              4636 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf + ahd->msgout_index, bus_width);
ahd              4637 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len += 4;
ahd              4640 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), devinfo->channel, devinfo->target,
ahd              4650 drivers/scsi/aic7xxx/aic79xx_core.c ahd_construct_ppr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              4663 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index += spi_populate_ppr_msg(
ahd              4664 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_buf + ahd->msgout_index, period, offset,
ahd              4666 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len += 8;
ahd              4669 drivers/scsi/aic7xxx/aic79xx_core.c 		       "offset %x, ppr_options %x\n", ahd_name(ahd),
ahd              4679 drivers/scsi/aic7xxx/aic79xx_core.c ahd_clear_msg_state(struct ahd_softc *ahd)
ahd              4683 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              4684 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              4685 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->send_msg_perror = 0;
ahd              4686 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msg_flags = MSG_FLAG_NONE;
ahd              4687 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len = 0;
ahd              4688 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgin_index = 0;
ahd              4689 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msg_type = MSG_TYPE_NONE;
ahd              4690 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SCSISIGO) & ATNO) != 0) {
ahd              4695 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRATNO);
ahd              4697 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MSG_OUT, MSG_NOOP);
ahd              4698 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQ_FLAGS2,
ahd              4699 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_inb(ahd, SEQ_FLAGS2) & ~TARGET_MSG_PENDING);
ahd              4700 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              4707 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_message_phase(struct ahd_softc *ahd)
ahd              4713 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_fetch_devinfo(ahd, &devinfo);
ahd              4715 drivers/scsi/aic7xxx/aic79xx_core.c 	bus_phase = ahd_inb(ahd, LASTPHASE);
ahd              4717 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, LQISTAT2) & LQIPHASE_OUTPKT) != 0) {
ahd              4719 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQCTL2, LQIRETRY);
ahd              4722 drivers/scsi/aic7xxx/aic79xx_core.c 	switch (ahd->msg_type) {
ahd              4729 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msgout_len == 0 && ahd->send_msg_perror == 0)
ahd              4734 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_devinfo(ahd, &devinfo);
ahd              4754 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, CLRSINT1, CLRATNO);
ahd              4755 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->send_msg_perror = 0;
ahd              4756 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_type = MSG_TYPE_INITIATOR_MSGIN;
ahd              4757 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgin_index = 0;
ahd              4764 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->send_msg_perror) {
ahd              4765 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRSINT1, CLRATNO);
ahd              4766 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRSINT1, CLRREQINIT);
ahd              4769 drivers/scsi/aic7xxx/aic79xx_core.c 				printk(" byte 0x%x\n", ahd->send_msg_perror);
ahd              4777 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->msg_flags & MSG_FLAG_PACKETIZED) != 0
ahd              4778 drivers/scsi/aic7xxx/aic79xx_core.c 			 && ahd->send_msg_perror == MSG_INITIATOR_DET_ERR)
ahd              4779 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_flags |= MSG_FLAG_EXPECT_IDE_BUSFREE;
ahd              4781 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, RETURN_2, ahd->send_msg_perror);
ahd              4782 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, RETURN_1, CONT_MSG_LOOP_WRITE);
ahd              4786 drivers/scsi/aic7xxx/aic79xx_core.c 		msgdone	= ahd->msgout_index == ahd->msgout_len;
ahd              4793 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_index = 0;
ahd              4794 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_assert_atn(ahd);
ahd              4797 drivers/scsi/aic7xxx/aic79xx_core.c 		lastbyte = ahd->msgout_index == (ahd->msgout_len - 1);
ahd              4800 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRSINT1, CLRATNO);
ahd              4807 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSINT1, CLRREQINIT);
ahd              4811 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd->msgout_buf[ahd->msgout_index]);
ahd              4813 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, RETURN_2, ahd->msgout_buf[ahd->msgout_index++]);
ahd              4814 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, RETURN_1, CONT_MSG_LOOP_WRITE);
ahd              4824 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_devinfo(ahd, &devinfo);
ahd              4837 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgin_index = 0;
ahd              4839 drivers/scsi/aic7xxx/aic79xx_core.c 			 && (ahd->send_msg_perror != 0
ahd              4840 drivers/scsi/aic7xxx/aic79xx_core.c 			  || (ahd->msgout_len != 0
ahd              4841 drivers/scsi/aic7xxx/aic79xx_core.c 			   && ahd->msgout_index == 0))) {
ahd              4842 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahd              4850 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgin_buf[ahd->msgin_index] = ahd_inb(ahd, SCSIBUS);
ahd              4854 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd->msgin_buf[ahd->msgin_index]);
ahd              4857 drivers/scsi/aic7xxx/aic79xx_core.c 		message_done = ahd_parse_msg(ahd, &devinfo);
ahd              4864 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgin_index = 0;
ahd              4871 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgout_len != 0) {
ahd              4874 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_print_devinfo(ahd, &devinfo);
ahd              4878 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_assert_atn(ahd);
ahd              4881 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgin_index++;
ahd              4887 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, CLRSINT1, CLRREQINIT);
ahd              4888 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, RETURN_1, CONT_MSG_LOOP_READ);
ahd              4900 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, RETURN_1, CONT_MSG_LOOP_TARG);
ahd              4902 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msgout_len == 0)
ahd              4911 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd_inb(ahd, SCSISIGI) & ATNI) != 0
ahd              4912 drivers/scsi/aic7xxx/aic79xx_core.c 		 && ahd->msgout_index > 0)
ahd              4925 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msg_type = MSG_TYPE_TARGET_MSGOUT;
ahd              4926 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCSISIGO, P_MESGOUT | BSYO);
ahd              4927 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgin_index = 0;
ahd              4929 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_inb(ahd, SCSIDAT);
ahd              4930 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SXFRCTL0,
ahd              4931 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb(ahd, SXFRCTL0) | SPIOEN);
ahd              4935 drivers/scsi/aic7xxx/aic79xx_core.c 		msgdone = ahd->msgout_index == ahd->msgout_len;
ahd              4937 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SXFRCTL0,
ahd              4938 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb(ahd, SXFRCTL0) & ~SPIOEN);
ahd              4946 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SXFRCTL0, ahd_inb(ahd, SXFRCTL0) | SPIOEN);
ahd              4947 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSIDAT, ahd->msgout_buf[ahd->msgout_index++]);
ahd              4958 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, RETURN_1, CONT_MSG_LOOP_TARG);
ahd              4964 drivers/scsi/aic7xxx/aic79xx_core.c 		lastbyte = (ahd_inb(ahd, SCSISIGI) & ATNI) == 0;
ahd              4971 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SXFRCTL0, ahd_inb(ahd, SXFRCTL0) & ~SPIOEN);
ahd              4972 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgin_buf[ahd->msgin_index] = ahd_inb(ahd, SCSIDAT);
ahd              4973 drivers/scsi/aic7xxx/aic79xx_core.c 		msgdone = ahd_parse_msg(ahd, &devinfo);
ahd              4984 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgin_index++;
ahd              4991 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgin_index = 0;
ahd              4997 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgout_len != 0) {
ahd              4998 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, SCSISIGO, P_MESGIN | BSYO);
ahd              4999 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, SXFRCTL0,
ahd              5000 drivers/scsi/aic7xxx/aic79xx_core.c 					 ahd_inb(ahd, SXFRCTL0) | SPIOEN);
ahd              5001 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msg_type = MSG_TYPE_TARGET_MSGIN;
ahd              5002 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgin_index = 0;
ahd              5011 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SXFRCTL0,
ahd              5012 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb(ahd, SXFRCTL0) | SPIOEN);
ahd              5022 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->msg_flags & MSG_FLAG_PACKETIZED) != 0) {
ahd              5024 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd));
ahd              5025 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_clear_msg_state(ahd);
ahd              5030 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, LASTPHASE, P_BUSFREE);
ahd              5031 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQ_FLAGS, NOT_IDENTIFIED|NO_CDB_SENT);
ahd              5032 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQCTL0, FASTMODE|SEQRESET);
ahd              5034 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_clear_msg_state(ahd);
ahd              5035 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, RETURN_1, EXIT_MSG_LOOP);
ahd              5047 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sent_msg(struct ahd_softc *ahd, ahd_msgtype type, u_int msgval, int full)
ahd              5055 drivers/scsi/aic7xxx/aic79xx_core.c 	while (index < ahd->msgout_len) {
ahd              5056 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msgout_buf[index] == MSG_EXTENDED) {
ahd              5059 drivers/scsi/aic7xxx/aic79xx_core.c 			end_index = index + 1 + ahd->msgout_buf[index + 1];
ahd              5060 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgout_buf[index+2] == msgval
ahd              5064 drivers/scsi/aic7xxx/aic79xx_core.c 					if (ahd->msgout_index > end_index)
ahd              5066 drivers/scsi/aic7xxx/aic79xx_core.c 				} else if (ahd->msgout_index > index)
ahd              5070 drivers/scsi/aic7xxx/aic79xx_core.c 		} else if (ahd->msgout_buf[index] >= MSG_SIMPLE_TASK
ahd              5071 drivers/scsi/aic7xxx/aic79xx_core.c 			&& ahd->msgout_buf[index] <= MSG_IGN_WIDE_RESIDUE) {
ahd              5078 drivers/scsi/aic7xxx/aic79xx_core.c 			 && ahd->msgout_index > index
ahd              5079 drivers/scsi/aic7xxx/aic79xx_core.c 			 && (ahd->msgout_buf[index] == msgval
ahd              5080 drivers/scsi/aic7xxx/aic79xx_core.c 			  || ((ahd->msgout_buf[index] & MSG_IDENTIFYFLAG) != 0
ahd              5096 drivers/scsi/aic7xxx/aic79xx_core.c ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              5107 drivers/scsi/aic7xxx/aic79xx_core.c 	tinfo = ahd_fetch_transinfo(ahd, devinfo->channel, devinfo->our_scsiid,
ahd              5121 drivers/scsi/aic7xxx/aic79xx_core.c 	switch (ahd->msgin_buf[0]) {
ahd              5134 drivers/scsi/aic7xxx/aic79xx_core.c 		response = ahd_handle_msg_reject(ahd, devinfo);
ahd              5142 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msgin_index < 2)
ahd              5144 drivers/scsi/aic7xxx/aic79xx_core.c 		switch (ahd->msgin_buf[2]) {
ahd              5152 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_buf[1] != MSG_EXT_SDTR_LEN) {
ahd              5164 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_index < (MSG_EXT_SDTR_LEN + 1))
ahd              5167 drivers/scsi/aic7xxx/aic79xx_core.c 			period = ahd->msgin_buf[3];
ahd              5169 drivers/scsi/aic7xxx/aic79xx_core.c 			saved_offset = offset = ahd->msgin_buf[4];
ahd              5170 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_devlimited_syncrate(ahd, tinfo, &period,
ahd              5172 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_validate_offset(ahd, tinfo, period, &offset,
ahd              5178 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->channel,
ahd              5180 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd->msgin_buf[3], saved_offset,
ahd              5183 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_syncrate(ahd, devinfo, period,
ahd              5193 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, TRUE)) {
ahd              5207 drivers/scsi/aic7xxx/aic79xx_core.c 					       ahd_name(ahd), devinfo->channel,
ahd              5210 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5211 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_len = 0;
ahd              5212 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_construct_sdtr(ahd, devinfo,
ahd              5214 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5227 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_buf[1] != MSG_EXT_WDTR_LEN) {
ahd              5239 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_index < (MSG_EXT_WDTR_LEN + 1))
ahd              5242 drivers/scsi/aic7xxx/aic79xx_core.c 			bus_width = ahd->msgin_buf[3];
ahd              5244 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_validate_width(ahd, tinfo, &bus_width,
ahd              5249 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->channel,
ahd              5254 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, TRUE)) {
ahd              5265 drivers/scsi/aic7xxx/aic79xx_core.c 					       ahd_name(ahd), devinfo->channel,
ahd              5278 drivers/scsi/aic7xxx/aic79xx_core.c 					       ahd_name(ahd), devinfo->channel,
ahd              5281 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5282 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_len = 0;
ahd              5283 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_construct_wdtr(ahd, devinfo, bus_width);
ahd              5284 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5297 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_update_neg_request(ahd, devinfo, tstate,
ahd              5299 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_width(ahd, devinfo, bus_width,
ahd              5307 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5308 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_len = 0;
ahd              5309 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_build_transfer_msg(ahd, devinfo);
ahd              5310 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5326 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_buf[1] != MSG_EXT_PPR_LEN) {
ahd              5338 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd->msgin_index < (MSG_EXT_PPR_LEN + 1))
ahd              5341 drivers/scsi/aic7xxx/aic79xx_core.c 			period = ahd->msgin_buf[3];
ahd              5342 drivers/scsi/aic7xxx/aic79xx_core.c 			offset = ahd->msgin_buf[5];
ahd              5343 drivers/scsi/aic7xxx/aic79xx_core.c 			bus_width = ahd->msgin_buf[6];
ahd              5345 drivers/scsi/aic7xxx/aic79xx_core.c 			ppr_options = ahd->msgin_buf[7];
ahd              5364 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_validate_width(ahd, tinfo, &bus_width,
ahd              5366 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_devlimited_syncrate(ahd, tinfo, &period,
ahd              5368 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_validate_offset(ahd, tinfo, period, &offset,
ahd              5371 drivers/scsi/aic7xxx/aic79xx_core.c 			if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_PPR, TRUE)) {
ahd              5390 drivers/scsi/aic7xxx/aic79xx_core.c 					       ahd_name(ahd), devinfo->channel,
ahd              5395 drivers/scsi/aic7xxx/aic79xx_core.c 					       ahd_name(ahd), devinfo->channel,
ahd              5397 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5398 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_len = 0;
ahd              5399 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_construct_ppr(ahd, devinfo, period, offset,
ahd              5401 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->msgout_index = 0;
ahd              5409 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->channel,
ahd              5411 drivers/scsi/aic7xxx/aic79xx_core.c 				       saved_width, ahd->msgin_buf[3],
ahd              5415 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_width(ahd, devinfo, bus_width,
ahd              5418 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_syncrate(ahd, devinfo, period,
ahd              5435 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_devreset(ahd, devinfo, CAM_LUN_WILDCARD,
ahd              5439 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_restart(ahd);
ahd              5454 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->msgin_buf[0] == MSG_ABORT_TAG)
ahd              5455 drivers/scsi/aic7xxx/aic79xx_core.c 			tag = ahd_inb(ahd, INITIATOR_TAG);
ahd              5456 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_abort_scbs(ahd, devinfo->target, devinfo->channel,
ahd              5460 drivers/scsi/aic7xxx/aic79xx_core.c 		tstate = ahd->enabled_targets[devinfo->our_scsiid];
ahd              5466 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_queue_lstate_event(ahd, lstate,
ahd              5468 drivers/scsi/aic7xxx/aic79xx_core.c 						       ahd->msgin_buf[0],
ahd              5470 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_send_lstate_events(ahd, lstate);
ahd              5473 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_restart(ahd);
ahd              5482 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), ahd_inb(ahd, SCSISIGI));
ahd              5484 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_flags |= MSG_FLAG_EXPECT_QASREJ_BUSFREE;
ahd              5496 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              5497 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len = 1;
ahd              5498 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_buf[0] = MSG_MESSAGE_REJECT;
ahd              5505 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len = 0;
ahd              5514 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              5529 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_get_scbptr(ahd);
ahd              5530 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scb_index);
ahd              5531 drivers/scsi/aic7xxx/aic79xx_core.c 	tinfo = ahd_fetch_transinfo(ahd, devinfo->channel,
ahd              5535 drivers/scsi/aic7xxx/aic79xx_core.c 	last_msg = ahd_inb(ahd, LAST_MSG);
ahd              5537 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_PPR, /*full*/FALSE)) {
ahd              5538 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_PPR, /*full*/TRUE)
ahd              5548 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->channel,
ahd              5563 drivers/scsi/aic7xxx/aic79xx_core.c 				       ahd_name(ahd), devinfo->channel,
ahd              5570 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              5571 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len = 0;
ahd              5572 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_build_transfer_msg(ahd, devinfo);
ahd              5573 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              5575 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) {
ahd              5579 drivers/scsi/aic7xxx/aic79xx_core.c 		       "8bit transfers\n", ahd_name(ahd),
ahd              5581 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_width(ahd, devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              5594 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_index = 0;
ahd              5595 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_len = 0;
ahd              5596 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_build_transfer_msg(ahd, devinfo);
ahd              5597 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->msgout_index = 0;
ahd              5600 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, /*full*/FALSE)) {
ahd              5602 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_syncrate(ahd, devinfo, /*period*/0,
ahd              5608 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), devinfo->channel,
ahd              5618 drivers/scsi/aic7xxx/aic79xx_core.c 			       "Performing non-tagged I/O\n", ahd_name(ahd),
ahd              5620 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_tags(ahd, scb->io_ctx, devinfo, AHD_QUEUE_NONE);
ahd              5625 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), devinfo->channel, devinfo->target,
ahd              5628 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_tags(ahd, scb->io_ctx, devinfo, AHD_QUEUE_BASIC);
ahd              5636 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_CONTROL,
ahd              5637 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb_scbram(ahd, SCB_CONTROL) & mask);
ahd              5641 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, MSG_OUT, MSG_IDENTIFYFLAG);
ahd              5642 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_assert_atn(ahd);
ahd              5643 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_busy_tcl(ahd, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
ahd              5651 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
ahd              5652 drivers/scsi/aic7xxx/aic79xx_core.c 				   SCB_GET_CHANNEL(ahd, scb),
ahd              5656 drivers/scsi/aic7xxx/aic79xx_core.c 	} else if (ahd_sent_msg(ahd, AHDMSG_1B, MSG_IDENTIFYFLAG, TRUE)) {
ahd              5661 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msg_flags |= MSG_FLAG_EXPECT_PPR_BUSFREE
ahd              5664 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_force_renegotiation(ahd, devinfo);
ahd              5665 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              5666 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_len = 0;
ahd              5667 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_build_transfer_msg(ahd, devinfo);
ahd              5668 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->msgout_index = 0;
ahd              5675 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), devinfo->channel, devinfo->target,
ahd              5685 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              5690 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_get_scbptr(ahd);
ahd              5691 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scb_index);
ahd              5696 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SEQ_FLAGS) & DPHASE) == 0
ahd              5712 drivers/scsi/aic7xxx/aic79xx_core.c 		sgptr = ahd_inb_scbram(ahd, SCB_RESIDUAL_SGPTR);
ahd              5714 drivers/scsi/aic7xxx/aic79xx_core.c 		 && (ahd_inb_scbram(ahd, SCB_TASK_ATTRIBUTE)
ahd              5728 drivers/scsi/aic7xxx/aic79xx_core.c 			sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
ahd              5729 drivers/scsi/aic7xxx/aic79xx_core.c 			data_cnt = ahd_inl_scbram(ahd, SCB_RESIDUAL_DATACNT);
ahd              5738 drivers/scsi/aic7xxx/aic79xx_core.c 			data_addr = ahd_inq(ahd, SHADDR);
ahd              5742 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
ahd              5745 drivers/scsi/aic7xxx/aic79xx_core.c 				sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              5772 drivers/scsi/aic7xxx/aic79xx_core.c 					sgptr = ahd_sg_virt_to_bus(ahd, scb,
ahd              5778 drivers/scsi/aic7xxx/aic79xx_core.c 				sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              5805 drivers/scsi/aic7xxx/aic79xx_core.c 					sgptr = ahd_sg_virt_to_bus(ahd, scb,
ahd              5815 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_TASK_ATTRIBUTE,
ahd              5816 drivers/scsi/aic7xxx/aic79xx_core.c 			    ahd_inb_scbram(ahd, SCB_TASK_ATTRIBUTE)
ahd              5819 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
ahd              5820 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outl(ahd, SCB_RESIDUAL_DATACNT, data_cnt);
ahd              5835 drivers/scsi/aic7xxx/aic79xx_core.c ahd_reinitialize_dataptrs(struct ahd_softc *ahd)
ahd              5845 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_DFF0_MSK|AHD_MODE_DFF1_MSK,
ahd              5848 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_get_scbptr(ahd);
ahd              5849 drivers/scsi/aic7xxx/aic79xx_core.c 	scb = ahd_lookup_scb(ahd, scb_index);
ahd              5855 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DFFSXFRCTL, CLRCHN);
ahd              5857 drivers/scsi/aic7xxx/aic79xx_core.c 	while (--wait && !(ahd_inb(ahd, MDFFSTAT) & FIFOFREE))
ahd              5860 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              5862 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFFSXFRCTL, RSTCHN|CLRSHCNT);
ahd              5864 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              5865 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              5866 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DFFSTAT,
ahd              5867 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_inb(ahd, DFFSTAT)
ahd              5874 drivers/scsi/aic7xxx/aic79xx_core.c 	sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
ahd              5877 drivers/scsi/aic7xxx/aic79xx_core.c 	resid = (ahd_inb_scbram(ahd, SCB_RESIDUAL_DATACNT + 2) << 16)
ahd              5878 drivers/scsi/aic7xxx/aic79xx_core.c 	      | (ahd_inb_scbram(ahd, SCB_RESIDUAL_DATACNT + 1) << 8)
ahd              5879 drivers/scsi/aic7xxx/aic79xx_core.c 	      | ahd_inb_scbram(ahd, SCB_RESIDUAL_DATACNT);
ahd              5881 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
ahd              5884 drivers/scsi/aic7xxx/aic79xx_core.c 		sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              5892 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, HADDR + 4, dataptr >> 32);
ahd              5896 drivers/scsi/aic7xxx/aic79xx_core.c 		sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
ahd              5904 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, HADDR + 4,
ahd              5907 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outl(ahd, HADDR, dataptr);
ahd              5908 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNT + 2, resid >> 16);
ahd              5909 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNT + 1, resid >> 8);
ahd              5910 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNT, resid);
ahd              5917 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              5926 drivers/scsi/aic7xxx/aic79xx_core.c 	found = ahd_abort_scbs(ahd, devinfo->target, devinfo->channel,
ahd              5935 drivers/scsi/aic7xxx/aic79xx_core.c 	tstate = ahd->enabled_targets[devinfo->our_scsiid];
ahd              5954 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_queue_lstate_event(ahd, lstate, devinfo->our_scsiid,
ahd              5956 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_send_lstate_events(ahd, lstate);
ahd              5964 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_width(ahd, devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              5966 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_syncrate(ahd, devinfo, /*period*/0, /*offset*/0,
ahd              5971 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_send_async(ahd, devinfo->channel, devinfo->target,
ahd              5975 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: %s on %c:%d. %d SCBs aborted\n", ahd_name(ahd),
ahd              5981 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_target_msgin(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
ahd              5990 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index = 0;
ahd              5991 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_len = 0;
ahd              5994 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_build_transfer_msg(ahd, devinfo);
ahd              5998 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msgout_index = 0;
ahd              5999 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->msg_type = MSG_TYPE_TARGET_MSGIN;
ahd              6004 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sglist_size(struct ahd_softc *ahd)
ahd              6009 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0)
ahd              6021 drivers/scsi/aic7xxx/aic79xx_core.c ahd_sglist_allocsize(struct ahd_softc *ahd)
ahd              6029 drivers/scsi/aic7xxx/aic79xx_core.c 	sg_list_increment = ahd_sglist_size(ahd);
ahd              6068 drivers/scsi/aic7xxx/aic79xx_core.c 	struct  ahd_softc *ahd;
ahd              6071 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd = kmalloc(sizeof(*ahd), GFP_ATOMIC);
ahd              6072 drivers/scsi/aic7xxx/aic79xx_core.c 	if (!ahd) {
ahd              6078 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd = device_get_softc((device_t)platform_arg);
ahd              6080 drivers/scsi/aic7xxx/aic79xx_core.c 	memset(ahd, 0, sizeof(*ahd));
ahd              6081 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->seep_config = kmalloc(sizeof(*ahd->seep_config), GFP_ATOMIC);
ahd              6082 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->seep_config == NULL) {
ahd              6084 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd);
ahd              6089 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_INIT(&ahd->pending_scbs);
ahd              6091 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->name = name;
ahd              6092 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->unit = -1;
ahd              6093 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->description = NULL;
ahd              6094 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->bus_description = NULL;
ahd              6095 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->channel = 'A';
ahd              6096 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->chip = AHD_NONE;
ahd              6097 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->features = AHD_FENONE;
ahd              6098 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->bugs = AHD_BUGNONE;
ahd              6099 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags = AHD_SPCHK_ENB_A|AHD_RESET_BUS_A|AHD_TERM_ENB_A
ahd              6101 drivers/scsi/aic7xxx/aic79xx_core.c 	timer_setup(&ahd->stat_timer, ahd_stat_timer, 0);
ahd              6102 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_timer = AHD_INT_COALESCING_TIMER_DEFAULT;
ahd              6103 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_maxcmds = AHD_INT_COALESCING_MAXCMDS_DEFAULT;
ahd              6104 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_mincmds = AHD_INT_COALESCING_MINCMDS_DEFAULT;
ahd              6105 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_threshold = AHD_INT_COALESCING_THRESHOLD_DEFAULT;
ahd              6106 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_stop_threshold =
ahd              6112 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), (u_int)sizeof(struct scb),
ahd              6116 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_platform_alloc(ahd, platform_arg) != 0) {
ahd              6117 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_free(ahd);
ahd              6118 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd = NULL;
ahd              6120 drivers/scsi/aic7xxx/aic79xx_core.c 	return (ahd);
ahd              6124 drivers/scsi/aic7xxx/aic79xx_core.c ahd_softc_init(struct ahd_softc *ahd)
ahd              6127 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->unpause = 0;
ahd              6128 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->pause = PAUSE; 
ahd              6133 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_unit(struct ahd_softc *ahd, int unit)
ahd              6135 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->unit = unit;
ahd              6139 drivers/scsi/aic7xxx/aic79xx_core.c ahd_set_name(struct ahd_softc *ahd, char *name)
ahd              6141 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->name != NULL)
ahd              6142 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd->name);
ahd              6143 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->name = name;
ahd              6147 drivers/scsi/aic7xxx/aic79xx_core.c ahd_free(struct ahd_softc *ahd)
ahd              6151 drivers/scsi/aic7xxx/aic79xx_core.c 	switch (ahd->init_level) {
ahd              6154 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_shutdown(ahd);
ahd              6157 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_unload(ahd, ahd->shared_data_dmat,
ahd              6158 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd->shared_data_map.dmamap);
ahd              6161 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamem_free(ahd, ahd->shared_data_dmat, ahd->qoutfifo,
ahd              6162 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->shared_data_map.dmamap);
ahd              6163 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_destroy(ahd, ahd->shared_data_dmat,
ahd              6164 drivers/scsi/aic7xxx/aic79xx_core.c 				   ahd->shared_data_map.dmamap);
ahd              6167 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat);
ahd              6174 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_free(ahd);
ahd              6175 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_fini_scbdata(ahd);
ahd              6179 drivers/scsi/aic7xxx/aic79xx_core.c 		tstate = ahd->enabled_targets[i];
ahd              6198 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->black_hole != NULL) {
ahd              6199 drivers/scsi/aic7xxx/aic79xx_core.c 		xpt_free_path(ahd->black_hole->path);
ahd              6200 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd->black_hole);
ahd              6203 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->name != NULL)
ahd              6204 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd->name);
ahd              6205 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->seep_config != NULL)
ahd              6206 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd->seep_config);
ahd              6207 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->saved_stack != NULL)
ahd              6208 drivers/scsi/aic7xxx/aic79xx_core.c 		kfree(ahd->saved_stack);
ahd              6210 drivers/scsi/aic7xxx/aic79xx_core.c 	kfree(ahd);
ahd              6218 drivers/scsi/aic7xxx/aic79xx_core.c 	struct	ahd_softc *ahd;
ahd              6220 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd = (struct ahd_softc *)arg;
ahd              6225 drivers/scsi/aic7xxx/aic79xx_core.c 	del_timer_sync(&ahd->stat_timer);
ahd              6228 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_reset(ahd, /*reinit*/FALSE);
ahd              6241 drivers/scsi/aic7xxx/aic79xx_core.c ahd_reset(struct ahd_softc *ahd, int reinit)
ahd              6252 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_pause(ahd);
ahd              6253 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_update_modes(ahd);
ahd              6254 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              6255 drivers/scsi/aic7xxx/aic79xx_core.c 	sxfrctl1 = ahd_inb(ahd, SXFRCTL1);
ahd              6257 drivers/scsi/aic7xxx/aic79xx_core.c 	cmd = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahd              6258 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PCIX_CHIPRST_BUG) != 0) {
ahd              6271 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
ahd              6274 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNTRL, CHIPRST | ahd->pause);
ahd              6285 drivers/scsi/aic7xxx/aic79xx_core.c 	} while (--wait && !(ahd_inb(ahd, HCNTRL) & CHIPRSTACK));
ahd              6289 drivers/scsi/aic7xxx/aic79xx_core.c 		       "Trying to initialize anyway.\n", ahd_name(ahd));
ahd              6291 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNTRL, ahd->pause);
ahd              6293 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PCIX_CHIPRST_BUG) != 0) {
ahd              6298 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
ahd              6300 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
ahd              6310 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_known_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              6311 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MODE_PTR,
ahd              6312 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_build_mode_state(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI));
ahd              6322 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SXFRCTL1, sxfrctl1|STPWEN);
ahd              6323 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SXFRCTL1, sxfrctl1);
ahd              6326 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->features &= ~AHD_WIDE;
ahd              6327 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, SBLKCTL) & SELWIDE) != 0)
ahd              6328 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->features |= AHD_WIDE;
ahd              6335 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_chip_init(ahd);
ahd              6344 drivers/scsi/aic7xxx/aic79xx_core.c ahd_probe_scbs(struct ahd_softc *ahd) {
ahd              6347 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK),
ahd              6352 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, i);
ahd              6353 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, SCB_BASE, i);
ahd              6355 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCB_BASE+j, 0);
ahd              6357 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_CONTROL, MK_MESSAGE);
ahd              6358 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_inw_scbram(ahd, SCB_BASE) != i)
ahd              6360 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, 0);
ahd              6361 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_inw_scbram(ahd, SCB_BASE) != 0)
ahd              6377 drivers/scsi/aic7xxx/aic79xx_core.c ahd_initialize_hscbs(struct ahd_softc *ahd)
ahd              6381 drivers/scsi/aic7xxx/aic79xx_core.c 	for (i = 0; i < ahd->scb_data.maxhscbs; i++) {
ahd              6382 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, i);
ahd              6385 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCB_CONTROL, 0);
ahd              6388 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, SCB_NEXT, SCB_LIST_NULL);
ahd              6393 drivers/scsi/aic7xxx/aic79xx_core.c ahd_init_scbdata(struct ahd_softc *ahd)
ahd              6398 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_data = &ahd->scb_data;
ahd              6408 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_data->maxhscbs = ahd_probe_scbs(ahd);
ahd              6410 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: No SCB space found\n", ahd_name(ahd));
ahd              6414 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_initialize_hscbs(ahd);
ahd              6427 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
ahd              6441 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/8,
ahd              6446 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_sglist_allocsize(ahd), /*nsegments*/1,
ahd              6453 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: ahd_sglist_allocsize = 0x%x\n", ahd_name(ahd),
ahd              6454 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_sglist_allocsize(ahd));
ahd              6460 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
ahd              6474 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_alloc_scbs(ahd);
ahd              6479 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              6494 drivers/scsi/aic7xxx/aic79xx_core.c ahd_find_scb_by_tag(struct ahd_softc *ahd, u_int tag)
ahd              6501 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
ahd              6509 drivers/scsi/aic7xxx/aic79xx_core.c 	TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
ahd              6523 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
ahd              6532 drivers/scsi/aic7xxx/aic79xx_core.c ahd_fini_scbdata(struct ahd_softc *ahd)
ahd              6536 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_data = &ahd->scb_data;
ahd              6548 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamap_unload(ahd, scb_data->sense_dmat,
ahd              6550 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamem_free(ahd, scb_data->sense_dmat,
ahd              6554 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dma_tag_destroy(ahd, scb_data->sense_dmat);
ahd              6563 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamap_unload(ahd, scb_data->sg_dmat,
ahd              6565 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamem_free(ahd, scb_data->sg_dmat,
ahd              6569 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dma_tag_destroy(ahd, scb_data->sg_dmat);
ahd              6578 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamap_unload(ahd, scb_data->hscb_dmat,
ahd              6580 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamem_free(ahd, scb_data->hscb_dmat,
ahd              6584 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dma_tag_destroy(ahd, scb_data->hscb_dmat);
ahd              6601 drivers/scsi/aic7xxx/aic79xx_core.c ahd_setup_iocell_workaround(struct ahd_softc *ahd)
ahd              6605 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              6606 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              6607 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DSPDATACTL, ahd_inb(ahd, DSPDATACTL)
ahd              6609 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE0, ahd_inb(ahd, SIMODE0) | (ENSELDO|ENSELDI));
ahd              6612 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: Setting up iocell workaround\n", ahd_name(ahd));
ahd              6614 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              6615 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_HAD_FIRST_SEL;
ahd              6619 drivers/scsi/aic7xxx/aic79xx_core.c ahd_iocell_first_selection(struct ahd_softc *ahd)
ahd              6624 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_HAD_FIRST_SEL) != 0)
ahd              6626 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              6627 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              6628 drivers/scsi/aic7xxx/aic79xx_core.c 	sblkctl = ahd_inb(ahd, SBLKCTL);
ahd              6629 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              6632 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: iocell first selection\n", ahd_name(ahd));
ahd              6635 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DSPDATACTL,
ahd              6636 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb(ahd, DSPDATACTL) & ~BYPASSENAB);
ahd              6639 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: BYPASS now disabled\n", ahd_name(ahd));
ahd              6642 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE0, ahd_inb(ahd, SIMODE0) & ~(ENSELDO|ENSELDI));
ahd              6643 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              6644 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              6645 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_HAD_FIRST_SEL;
ahd              6650 drivers/scsi/aic7xxx/aic79xx_core.c ahd_add_col_list(struct ahd_softc *ahd, struct scb *scb, u_int col_idx)
ahd              6658 drivers/scsi/aic7xxx/aic79xx_core.c 	free_list = &ahd->scb_data.free_scb_lists[col_idx];
ahd              6659 drivers/scsi/aic7xxx/aic79xx_core.c 	free_tailq = &ahd->scb_data.free_scbs;
ahd              6670 drivers/scsi/aic7xxx/aic79xx_core.c ahd_rem_col_list(struct ahd_softc *ahd, struct scb *scb)
ahd              6678 drivers/scsi/aic7xxx/aic79xx_core.c 	col_idx = AHD_GET_SCB_COL_IDX(ahd, scb);
ahd              6679 drivers/scsi/aic7xxx/aic79xx_core.c 	free_list = &ahd->scb_data.free_scb_lists[col_idx];
ahd              6680 drivers/scsi/aic7xxx/aic79xx_core.c 	free_tailq = &ahd->scb_data.free_scbs;
ahd              6704 drivers/scsi/aic7xxx/aic79xx_core.c ahd_get_scb(struct ahd_softc *ahd, u_int col_idx)
ahd              6711 drivers/scsi/aic7xxx/aic79xx_core.c 	TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
ahd              6712 drivers/scsi/aic7xxx/aic79xx_core.c 		if (AHD_GET_SCB_COL_IDX(ahd, scb) != col_idx) {
ahd              6713 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_rem_col_list(ahd, scb);
ahd              6717 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((scb = LIST_FIRST(&ahd->scb_data.any_dev_free_scb_list)) == NULL) {
ahd              6721 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_alloc_scbs(ahd);
ahd              6729 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_add_col_list(ahd, scb->col_scb, col_idx);
ahd              6740 drivers/scsi/aic7xxx/aic79xx_core.c ahd_free_scb(struct ahd_softc *ahd, struct scb *scb)
ahd              6745 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
ahd              6752 drivers/scsi/aic7xxx/aic79xx_core.c 		LIST_INSERT_HEAD(&ahd->scb_data.any_dev_free_scb_list,
ahd              6761 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_rem_col_list(ahd, scb->col_scb);
ahd              6762 drivers/scsi/aic7xxx/aic79xx_core.c 		LIST_INSERT_HEAD(&ahd->scb_data.any_dev_free_scb_list,
ahd              6764 drivers/scsi/aic7xxx/aic79xx_core.c 		LIST_INSERT_HEAD(&ahd->scb_data.any_dev_free_scb_list,
ahd              6775 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_add_col_list(ahd, scb,
ahd              6776 drivers/scsi/aic7xxx/aic79xx_core.c 				 AHD_GET_SCB_COL_IDX(ahd, scb->col_scb));
ahd              6784 drivers/scsi/aic7xxx/aic79xx_core.c 		LIST_INSERT_HEAD(&ahd->scb_data.any_dev_free_scb_list,
ahd              6788 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_scb_free(ahd, scb);
ahd              6792 drivers/scsi/aic7xxx/aic79xx_core.c ahd_alloc_scbs(struct ahd_softc *ahd)
ahd              6808 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_data = &ahd->scb_data;
ahd              6827 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_dmamem_alloc(ahd, scb_data->hscb_dmat,
ahd              6836 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_load(ahd, scb_data->hscb_dmat, hscb_map->dmamap,
ahd              6848 drivers/scsi/aic7xxx/aic79xx_core.c 		offset = ((ahd_sglist_allocsize(ahd) / ahd_sglist_size(ahd))
ahd              6849 drivers/scsi/aic7xxx/aic79xx_core.c 		       - scb_data->sgs_left) * ahd_sglist_size(ahd);
ahd              6860 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_dmamem_alloc(ahd, scb_data->sg_dmat,
ahd              6869 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_load(ahd, scb_data->sg_dmat, sg_map->dmamap,
ahd              6870 drivers/scsi/aic7xxx/aic79xx_core.c 				sg_map->vaddr, ahd_sglist_allocsize(ahd),
ahd              6876 drivers/scsi/aic7xxx/aic79xx_core.c 		    ahd_sglist_allocsize(ahd) / ahd_sglist_size(ahd);
ahd              6897 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_dmamem_alloc(ahd, scb_data->sense_dmat,
ahd              6906 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_load(ahd, scb_data->sense_dmat, sense_map->dmamap,
ahd              6951 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0)
ahd              6956 drivers/scsi/aic7xxx/aic79xx_core.c 		next_scb->ahd_softc = ahd;
ahd              6960 drivers/scsi/aic7xxx/aic79xx_core.c 		next_scb->col_scb = ahd_find_scb_by_tag(ahd, col_tag);
ahd              6963 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_free_scb(ahd, next_scb);
ahd              6966 drivers/scsi/aic7xxx/aic79xx_core.c 		segs += ahd_sglist_size(ahd);
ahd              6967 drivers/scsi/aic7xxx/aic79xx_core.c 		sg_busaddr += ahd_sglist_size(ahd);
ahd              6978 drivers/scsi/aic7xxx/aic79xx_core.c ahd_controller_info(struct ahd_softc *ahd, char *buf)
ahd              6984 drivers/scsi/aic7xxx/aic79xx_core.c 	len = sprintf(buf, "%s: ", ahd_chip_names[ahd->chip & AHD_CHIPID_MASK]);
ahd              6988 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_WIDE) != 0) {
ahd              6994 drivers/scsi/aic7xxx/aic79xx_core.c 		      speed, type, ahd->channel, ahd->our_id);
ahd              6997 drivers/scsi/aic7xxx/aic79xx_core.c 	sprintf(buf, "%s, %d SCBs", ahd->bus_description,
ahd              6998 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->scb_data.maxhscbs);
ahd              7028 drivers/scsi/aic7xxx/aic79xx_core.c ahd_init(struct ahd_softc *ahd)
ahd              7039 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              7041 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->stack_size = ahd_probe_stack_size(ahd);
ahd              7042 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->saved_stack = kmalloc_array(ahd->stack_size, sizeof(uint16_t),
ahd              7044 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->saved_stack == NULL)
ahd              7056 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_SEQUENCER_DEBUG;
ahd              7062 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_INITIATORROLE;
ahd              7067 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0)
ahd              7068 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->features &= ~AHD_TARGETMODE;
ahd              7070 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->init_level++;
ahd              7079 drivers/scsi/aic7xxx/aic79xx_core.c 	driver_data_size = AHD_SCB_MAX * sizeof(*ahd->qoutfifo)
ahd              7081 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_TARGETMODE) != 0)
ahd              7083 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0)
ahd              7085 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
ahd              7093 drivers/scsi/aic7xxx/aic79xx_core.c 			       /*flags*/0, &ahd->shared_data_dmat) != 0) {
ahd              7097 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->init_level++;
ahd              7100 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_dmamem_alloc(ahd, ahd->shared_data_dmat,
ahd              7101 drivers/scsi/aic7xxx/aic79xx_core.c 			     (void **)&ahd->shared_data_map.vaddr,
ahd              7103 drivers/scsi/aic7xxx/aic79xx_core.c 			     &ahd->shared_data_map.dmamap) != 0) {
ahd              7107 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->init_level++;
ahd              7110 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dmamap_load(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap,
ahd              7111 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->shared_data_map.vaddr, driver_data_size,
ahd              7112 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dmamap_cb, &ahd->shared_data_map.physaddr,
ahd              7114 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qoutfifo = (struct ahd_completion *)ahd->shared_data_map.vaddr;
ahd              7115 drivers/scsi/aic7xxx/aic79xx_core.c 	next_vaddr = (uint8_t *)&ahd->qoutfifo[AHD_QOUT_SIZE];
ahd              7116 drivers/scsi/aic7xxx/aic79xx_core.c 	next_baddr = ahd->shared_data_map.physaddr
ahd              7118 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_TARGETMODE) != 0) {
ahd              7119 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->targetcmds = (struct target_cmd *)next_vaddr;
ahd              7124 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PKT_BITBUCKET_BUG) != 0) {
ahd              7125 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->overrun_buf = next_vaddr;
ahd              7137 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->next_queued_hscb = (struct hardware_scb *)next_vaddr;
ahd              7138 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->next_queued_hscb_map = &ahd->shared_data_map;
ahd              7139 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->next_queued_hscb->hscb_busaddr = ahd_htole32(next_baddr);
ahd              7141 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->init_level++;
ahd              7144 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_init_scbdata(ahd) != 0)
ahd              7147 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_INITIATORROLE) == 0)
ahd              7148 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags &= ~AHD_RESET_BUS_A;
ahd              7154 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_init(ahd);
ahd              7157 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_chip_init(ahd);
ahd              7159 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              7161 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_CURRENT_SENSING) == 0)
ahd              7168 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_write_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL,
ahd              7171 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: current sensing timeout 1\n", ahd_name(ahd));
ahd              7176 drivers/scsi/aic7xxx/aic79xx_core.c 		error = ahd_read_flexport(ahd, FLXADDR_FLEXSTAT, &fstat);
ahd              7179 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd));
ahd              7185 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              7190 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_read_flexport(ahd, FLXADDR_CURRENT_STAT, &current_sensing);
ahd              7192 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("%s: current sensing timeout 3\n", ahd_name(ahd));
ahd              7197 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_write_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, 0);
ahd              7202 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), current_sensing);
ahd              7219 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: %s Channel %s\n", ahd_name(ahd),
ahd              7227 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), ahd_name(ahd));
ahd              7230 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restart(ahd);
ahd              7231 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US);
ahd              7239 drivers/scsi/aic7xxx/aic79xx_core.c ahd_chip_init(struct ahd_softc *ahd)
ahd              7248 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              7252 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SBLKCTL, ahd_inb(ahd, SBLKCTL) & ~(DIAGLEDEN|DIAGLEDON));
ahd              7257 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->hs_mailbox = 0;
ahd              7258 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HS_MAILBOX, 0);
ahd              7261 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, IOWNID, ahd->our_id);
ahd              7262 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, TOWNID, ahd->our_id);
ahd              7263 drivers/scsi/aic7xxx/aic79xx_core.c 	sxfrctl1 = (ahd->flags & AHD_TERM_ENB_A) != 0 ? STPWEN : 0;
ahd              7264 drivers/scsi/aic7xxx/aic79xx_core.c 	sxfrctl1 |= (ahd->flags & AHD_SPCHK_ENB_A) != 0 ? ENSPCHK : 0;
ahd              7265 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_LONG_SETIMO_BUG)
ahd              7266 drivers/scsi/aic7xxx/aic79xx_core.c 	 && (ahd->seltime != STIMESEL_MIN)) {
ahd              7272 drivers/scsi/aic7xxx/aic79xx_core.c 		sxfrctl1 |= ahd->seltime + STIMESEL_BUG_ADJ;
ahd              7274 drivers/scsi/aic7xxx/aic79xx_core.c 		sxfrctl1 |= ahd->seltime;
ahd              7277 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SXFRCTL0, DFON);
ahd              7278 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SXFRCTL1, sxfrctl1|ahd->seltime|ENSTIMER|ACTNEGEN);
ahd              7279 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE1, ENSELTIMO|ENSCSIRST|ENSCSIPERR);
ahd              7289 drivers/scsi/aic7xxx/aic79xx_core.c 	     (ahd_inb(ahd, SBLKCTL) & (ENAB40|ENAB20)) == 0 && wait;
ahd              7294 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT1, CLRSCSIRSTI);
ahd              7295 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              7299 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_DFF0 + i, AHD_MODE_DFF0 + i);
ahd              7300 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LONGJMP_ADDR + 1, INVALID_ADDR);
ahd              7301 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SG_STATE, 0);
ahd              7302 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CLRSEQINTSRC, 0xFF);
ahd              7303 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEQIMODE,
ahd              7308 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              7309 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DSCOMMAND0, ahd_inb(ahd, DSCOMMAND0)|MPARCKEN|CACHETHEN);
ahd              7310 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, DFF_THRSH, RD_DFTHRSH_75|WR_DFTHRSH_75);
ahd              7311 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE0, ENIOERR|ENOVERRUN);
ahd              7312 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE3, ENNTRAMPERR|ENOSRAMPERR);
ahd              7313 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_BUSFREEREV_BUG) != 0) {
ahd              7314 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, OPTIONMODE, AUTOACKEN|AUTO_MSGOUT_DE);
ahd              7316 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, OPTIONMODE, AUTOACKEN|BUSFREEREV|AUTO_MSGOUT_DE);
ahd              7318 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSCHKN, CURRFIFODEF|WIDERESEN|SHVALIDSTDIS);
ahd              7319 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->chip & AHD_BUS_MASK) == AHD_PCIX)
ahd              7325 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, PCIXCTL, ahd_inb(ahd, PCIXCTL) | SPLTSTADIS);
ahd              7327 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_LQOOVERRUN_BUG) != 0)
ahd              7328 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQOSCSCTL, LQONOCHKOVER);
ahd              7333 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_HP_BOARD) != 0) {
ahd              7335 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, DSPSELECT, i);
ahd              7336 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, WRTBIASCTL, WRTBIASCTL_HP_DEFAULT);
ahd              7340 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("%s: WRTBIASCTL now 0x%x\n", ahd_name(ahd),
ahd              7344 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_setup_iocell_workaround(ahd);
ahd              7349 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, LQIMODE1, ENLQIPHASE_LQ|ENLQIPHASE_NLQ|ENLIQABORT
ahd              7352 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, LQOMODE0, ENLQOATNLQ|ENLQOATNPKT|ENLQOTCRC);
ahd              7361 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, LQOMODE1, ENLQOBUSFREE);
ahd              7366 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, INTVEC1_ADDR, ahd_resolve_seqaddr(ahd, LABEL_seq_isr));
ahd              7367 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, INTVEC2_ADDR, ahd_resolve_seqaddr(ahd, LABEL_timer_isr));
ahd              7372 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0) {
ahd              7373 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LUNPTR, offsetof(struct hardware_scb,
ahd              7376 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LUNPTR, offsetof(struct hardware_scb, lun));
ahd              7378 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDLENPTR, offsetof(struct hardware_scb, cdb_len));
ahd              7379 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ATTRPTR, offsetof(struct hardware_scb, task_attribute));
ahd              7380 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, FLAGPTR, offsetof(struct hardware_scb, task_management));
ahd              7381 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDPTR, offsetof(struct hardware_scb,
ahd              7383 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, QNEXTPTR,
ahd              7385 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ABRTBITPTR, MK_MESSAGE_BIT_OFFSET);
ahd              7386 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, ABRTBYTEPTR, offsetof(struct hardware_scb, control));
ahd              7387 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0) {
ahd              7388 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LUNLEN,
ahd              7389 drivers/scsi/aic7xxx/aic79xx_core.c 			 sizeof(ahd->next_queued_hscb->pkt_long_lun) - 1);
ahd              7391 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LUNLEN, LUNLEN_SINGLE_LEVEL_LUN);
ahd              7393 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CDBLIMIT, SCB_CDB_LEN_PTR - 1);
ahd              7394 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MAXCMD, 0xFF);
ahd              7395 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCBAUTOPTR,
ahd              7399 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MULTARGID, 0);
ahd              7400 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, MULTARGID + 1, 0);
ahd              7402 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              7404 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_NEW_IOCELL_OPTS) == 0) {
ahd              7410 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, NEGOADDR, target);
ahd              7411 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, ANNEXCOL, AHD_ANNEXCOL_PER_DEV0);
ahd              7413 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, ANNEXDAT, 0);
ahd              7421 drivers/scsi/aic7xxx/aic79xx_core.c 		tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd              7423 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_compile_devinfo(&devinfo, ahd->our_id,
ahd              7426 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_neg_table(ahd, &devinfo, &tinfo->curr);
ahd              7429 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT3, NTRAMPERR|OSRAMPERR);
ahd              7430 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd              7437 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_ABORT_LQI_BUG) == 0)
ahd              7438 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQCTL1, ABORTPENDING);
ahd              7441 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, LQCTL1, 0);
ahd              7444 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qoutfifonext = 0;
ahd              7445 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qoutfifonext_valid_tag = QOUTFIFO_ENTRY_VALID;
ahd              7446 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, QOUTFIFO_ENTRY_VALID_TAG, QOUTFIFO_ENTRY_VALID);
ahd              7448 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->qoutfifo[i].valid_tag = 0;
ahd              7449 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sync_qoutfifo(ahd, BUS_DMASYNC_PREREAD);
ahd              7451 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifonext = 0;
ahd              7453 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->qinfifo[i] = SCB_LIST_NULL;
ahd              7455 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_TARGETMODE) != 0) {
ahd              7458 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->targetcmds[i].cmd_valid = 0;
ahd              7459 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sync_tqinfifo(ahd, BUS_DMASYNC_PREREAD);
ahd              7460 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->tqinfifonext = 1;
ahd              7461 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, KERNEL_TQINPOS, ahd->tqinfifonext - 1);
ahd              7462 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, TQINPOS, ahd->tqinfifonext);
ahd              7466 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQ_FLAGS, 0);
ahd              7467 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQ_FLAGS2, 0);
ahd              7470 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, WAITING_TID_HEAD, SCB_LIST_NULL);
ahd              7471 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, WAITING_TID_TAIL, SCB_LIST_NULL);
ahd              7472 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, MK_MESSAGE_SCB, SCB_LIST_NULL);
ahd              7473 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, MK_MESSAGE_SCSIID, 0xFF);
ahd              7475 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, WAITING_SCB_TAILS + (2 * i), SCB_LIST_NULL);
ahd              7480 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_SCB_HEAD, SCB_LIST_NULL);
ahd              7481 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_SCB_DMAINPROG_HEAD, SCB_LIST_NULL);
ahd              7482 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_DMA_SCB_HEAD, SCB_LIST_NULL);
ahd              7483 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_DMA_SCB_TAIL, SCB_LIST_NULL);
ahd              7484 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, COMPLETE_ON_QFREEZE_HEAD, SCB_LIST_NULL);
ahd              7489 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qfreeze_cnt = 0;
ahd              7490 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, QFREEZE_COUNT, 0);
ahd              7491 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, KERNEL_QFREEZE_COUNT, 0);
ahd              7496 drivers/scsi/aic7xxx/aic79xx_core.c 	busaddr = ahd->shared_data_map.physaddr;
ahd              7497 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outl(ahd, SHARED_DATA_ADDR, busaddr);
ahd              7498 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outl(ahd, QOUTFIFO_NEXT_ADDR, busaddr);
ahd              7506 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_INITIATORROLE) != 0)
ahd              7508 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ_TEMPLATE, scsiseq_template);
ahd              7515 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unbusy_tcl(ahd, BUILD_TCL_RAW(target, 'A', lun));
ahd              7524 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE, 5);
ahd              7525 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 1, 9);
ahd              7526 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 2, 9);
ahd              7527 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 3, 0);
ahd              7528 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 4, 15);
ahd              7529 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 5, 11);
ahd              7530 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 6, 0);
ahd              7531 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CMDSIZE_TABLE + 7, 0);
ahd              7534 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              7535 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, QOFF_CTLSTA, SCB_QSIZE_512);
ahd              7536 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifonext = 0;
ahd              7537 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_hnscb_qoff(ahd, ahd->qinfifonext);
ahd              7538 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_hescb_qoff(ahd, 0);
ahd              7539 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_snscb_qoff(ahd, 0);
ahd              7540 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_sescb_qoff(ahd, 0);
ahd              7541 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_sdscb_qoff(ahd, 0);
ahd              7546 drivers/scsi/aic7xxx/aic79xx_core.c 	busaddr = ahd_le32toh(ahd->next_queued_hscb->hscb_busaddr);
ahd              7547 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outl(ahd, NEXT_QUEUED_SCB_ADDR, busaddr);
ahd              7552 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, INT_COALESCING_CMDCOUNT, 0);
ahd              7553 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, CMDS_PENDING, 0);
ahd              7554 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_update_coalescing_values(ahd, ahd->int_coalescing_timer,
ahd              7555 drivers/scsi/aic7xxx/aic79xx_core.c 				     ahd->int_coalescing_maxcmds,
ahd              7556 drivers/scsi/aic7xxx/aic79xx_core.c 				     ahd->int_coalescing_mincmds);
ahd              7557 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_enable_coalescing(ahd, FALSE);
ahd              7559 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_loadseq(ahd);
ahd              7560 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              7562 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->features & AHD_AIC79XXB_SLOWCRC) {
ahd              7563 drivers/scsi/aic7xxx/aic79xx_core.c 		u_int negodat3 = ahd_inb(ahd, NEGCONOPTS);
ahd              7566 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, NEGCONOPTS, negodat3);
ahd              7567 drivers/scsi/aic7xxx/aic79xx_core.c 		negodat3 = ahd_inb(ahd, NEGCONOPTS);
ahd              7581 drivers/scsi/aic7xxx/aic79xx_core.c ahd_default_config(struct ahd_softc *ahd)
ahd              7585 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->our_id = 7;
ahd              7592 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) {
ahd              7594 drivers/scsi/aic7xxx/aic79xx_core.c 		       "Failing attach\n", ahd_name(ahd));
ahd              7604 drivers/scsi/aic7xxx/aic79xx_core.c 		tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd              7613 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->user_discenable |= target_mask;
ahd              7615 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->user_tagenable |= target_mask;
ahd              7628 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->features & AHD_RTI) != 0)
ahd              7641 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_compile_devinfo(&devinfo, ahd->our_id,
ahd              7645 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              7647 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_syncrate(ahd, &devinfo, /*period*/0, /*offset*/0,
ahd              7658 drivers/scsi/aic7xxx/aic79xx_core.c ahd_parse_cfgdata(struct ahd_softc *ahd, struct seeprom_config *sc)
ahd              7664 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->our_id = sc->brtime_id & CFSCSIID;
ahd              7671 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) {
ahd              7673 drivers/scsi/aic7xxx/aic79xx_core.c 		       "Failing attach\n", ahd_name(ahd));
ahd              7684 drivers/scsi/aic7xxx/aic79xx_core.c 		tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd              7695 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->user_discenable &= ~target_mask;
ahd              7697 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->user_tagenable &= ~target_mask;
ahd              7700 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->user_discenable |= target_mask;
ahd              7701 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->user_tagenable |= target_mask;
ahd              7729 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->features & AHD_RTI) != 0)
ahd              7755 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_compile_devinfo(&devinfo, ahd->our_id,
ahd              7758 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              7760 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_syncrate(ahd, &devinfo, /*period*/0, /*offset*/0,
ahd              7765 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_SPCHK_ENB_A;
ahd              7767 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_SPCHK_ENB_A;
ahd              7769 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_RESET_BUS_A;
ahd              7771 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_RESET_BUS_A;
ahd              7773 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_EXTENDED_TRANS_A;
ahd              7775 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_EXTENDED_TRANS_A;
ahd              7777 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_BIOS_ENABLED;
ahd              7779 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_BIOS_ENABLED;
ahd              7781 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_STPWLEVEL_A;
ahd              7783 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_STPWLEVEL_A;
ahd              7792 drivers/scsi/aic7xxx/aic79xx_core.c ahd_parse_vpddata(struct ahd_softc *ahd, struct vpd_config *vpd)
ahd              7800 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_BOOT_CHANNEL;
ahd              7805 drivers/scsi/aic7xxx/aic79xx_core.c ahd_intr_enable(struct ahd_softc *ahd, int enable)
ahd              7809 drivers/scsi/aic7xxx/aic79xx_core.c 	hcntrl = ahd_inb(ahd, HCNTRL);
ahd              7811 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->pause &= ~INTEN;
ahd              7812 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->unpause &= ~INTEN;
ahd              7815 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->pause |= INTEN;
ahd              7816 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->unpause |= INTEN;
ahd              7818 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HCNTRL, hcntrl);
ahd              7822 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_coalescing_values(struct ahd_softc *ahd, u_int timer, u_int maxcmds,
ahd              7827 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_timer = timer;
ahd              7833 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->int_coalescing_maxcmds = maxcmds;
ahd              7834 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, INT_COALESCING_TIMER, timer / AHD_TIMER_US_PER_TICK);
ahd              7835 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, INT_COALESCING_MAXCMDS, -maxcmds);
ahd              7836 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, INT_COALESCING_MINCMDS, -mincmds);
ahd              7840 drivers/scsi/aic7xxx/aic79xx_core.c ahd_enable_coalescing(struct ahd_softc *ahd, int enable)
ahd              7843 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->hs_mailbox &= ~ENINT_COALESCE;
ahd              7845 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->hs_mailbox |= ENINT_COALESCE;
ahd              7846 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, HS_MAILBOX, ahd->hs_mailbox);
ahd              7847 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              7848 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_run_qoutfifo(ahd);
ahd              7859 drivers/scsi/aic7xxx/aic79xx_core.c ahd_pause_and_flushwork(struct ahd_softc *ahd)
ahd              7865 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_ALL_INTERRUPTS;
ahd              7866 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_pause(ahd);
ahd              7872 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qfreeze_cnt--;
ahd              7873 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, KERNEL_QFREEZE_COUNT, ahd->qfreeze_cnt);
ahd              7874 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQ_FLAGS2, ahd_inb(ahd, SEQ_FLAGS2) | SELECTOUT_QFROZEN);
ahd              7877 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              7884 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_intr(ahd);
ahd              7885 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              7886 drivers/scsi/aic7xxx/aic79xx_core.c 		intstat = ahd_inb(ahd, INTSTAT);
ahd              7888 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_clear_critical_section(ahd);
ahd              7889 drivers/scsi/aic7xxx/aic79xx_core.c 			intstat = ahd_inb(ahd, INTSTAT);
ahd              7892 drivers/scsi/aic7xxx/aic79xx_core.c 	      && (intstat != 0xFF || (ahd->features & AHD_REMOVABLE) == 0)
ahd              7894 drivers/scsi/aic7xxx/aic79xx_core.c 	       || (ahd_inb(ahd, SCSISEQ0) & ENSELO) != 0
ahd              7895 drivers/scsi/aic7xxx/aic79xx_core.c 	       || (ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)) != 0));
ahd              7899 drivers/scsi/aic7xxx/aic79xx_core.c 		      ahd_inb(ahd, INTSTAT));
ahd              7901 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qfreeze_cnt++;
ahd              7902 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, KERNEL_QFREEZE_COUNT, ahd->qfreeze_cnt);
ahd              7904 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_qoutfifo(ahd);
ahd              7906 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_ALL_INTERRUPTS;
ahd              7911 drivers/scsi/aic7xxx/aic79xx_core.c ahd_suspend(struct ahd_softc *ahd)
ahd              7914 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_pause_and_flushwork(ahd);
ahd              7916 drivers/scsi/aic7xxx/aic79xx_core.c 	if (LIST_FIRST(&ahd->pending_scbs) != NULL) {
ahd              7917 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              7920 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_shutdown(ahd);
ahd              7925 drivers/scsi/aic7xxx/aic79xx_core.c ahd_resume(struct ahd_softc *ahd)
ahd              7928 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_reset(ahd, /*reinit*/TRUE);
ahd              7929 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_intr_enable(ahd, TRUE); 
ahd              7930 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restart(ahd);
ahd              7944 drivers/scsi/aic7xxx/aic79xx_core.c ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl)
ahd              7949 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              7950 drivers/scsi/aic7xxx/aic79xx_core.c 	*saved_scbid = ahd_get_scbptr(ahd);
ahd              7951 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, TCL_LUN(tcl)
ahd              7966 drivers/scsi/aic7xxx/aic79xx_core.c ahd_find_busy_tcl(struct ahd_softc *ahd, u_int tcl)
ahd              7972 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_offset = ahd_index_busy_tcl(ahd, &saved_scbptr, tcl);
ahd              7973 drivers/scsi/aic7xxx/aic79xx_core.c 	scbid = ahd_inw_scbram(ahd, scb_offset);
ahd              7974 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scbptr);
ahd              7979 drivers/scsi/aic7xxx/aic79xx_core.c ahd_busy_tcl(struct ahd_softc *ahd, u_int tcl, u_int scbid)
ahd              7984 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_offset = ahd_index_busy_tcl(ahd, &saved_scbptr, tcl);
ahd              7985 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, scb_offset, scbid);
ahd              7986 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scbptr);
ahd              7991 drivers/scsi/aic7xxx/aic79xx_core.c ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
ahd              7994 drivers/scsi/aic7xxx/aic79xx_core.c 	int targ = SCB_GET_TARGET(ahd, scb);
ahd              7995 drivers/scsi/aic7xxx/aic79xx_core.c 	char chan = SCB_GET_CHANNEL(ahd, scb);
ahd              8027 drivers/scsi/aic7xxx/aic79xx_core.c ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
ahd              8033 drivers/scsi/aic7xxx/aic79xx_core.c 	target = SCB_GET_TARGET(ahd, scb);
ahd              8035 drivers/scsi/aic7xxx/aic79xx_core.c 	channel = SCB_GET_CHANNEL(ahd, scb);
ahd              8037 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_search_qinfifo(ahd, target, channel, lun,
ahd              8041 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_freeze_devq(ahd, scb);
ahd              8045 drivers/scsi/aic7xxx/aic79xx_core.c ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, struct scb *scb)
ahd              8050 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              8051 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              8053 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_qinfifo_count(ahd) != 0) {
ahd              8057 drivers/scsi/aic7xxx/aic79xx_core.c 		prev_pos = AHD_QIN_WRAP(ahd->qinfifonext - 1);
ahd              8058 drivers/scsi/aic7xxx/aic79xx_core.c 		prev_tag = ahd->qinfifo[prev_pos];
ahd              8059 drivers/scsi/aic7xxx/aic79xx_core.c 		prev_scb = ahd_lookup_scb(ahd, prev_tag);
ahd              8061 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_qinfifo_requeue(ahd, prev_scb, scb);
ahd              8062 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_hnscb_qoff(ahd, ahd->qinfifonext);
ahd              8063 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              8067 drivers/scsi/aic7xxx/aic79xx_core.c ahd_qinfifo_requeue(struct ahd_softc *ahd, struct scb *prev_scb,
ahd              8074 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outl(ahd, NEXT_QUEUED_SCB_ADDR, busaddr);
ahd              8077 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sync_scb(ahd, prev_scb, 
ahd              8080 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
ahd              8081 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifonext++;
ahd              8082 drivers/scsi/aic7xxx/aic79xx_core.c 	scb->hscb->next_hscb_busaddr = ahd->next_queued_hscb->hscb_busaddr;
ahd              8083 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
ahd              8087 drivers/scsi/aic7xxx/aic79xx_core.c ahd_qinfifo_count(struct ahd_softc *ahd)
ahd              8093 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK);
ahd              8094 drivers/scsi/aic7xxx/aic79xx_core.c 	qinpos = ahd_get_snscb_qoff(ahd);
ahd              8096 drivers/scsi/aic7xxx/aic79xx_core.c 	wrap_qinfifonext = AHD_QIN_WRAP(ahd->qinfifonext);
ahd              8101 drivers/scsi/aic7xxx/aic79xx_core.c 		      + ARRAY_SIZE(ahd->qinfifo) - wrap_qinpos);
ahd              8105 drivers/scsi/aic7xxx/aic79xx_core.c ahd_reset_cmds_pending(struct ahd_softc *ahd)
ahd              8111 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              8112 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              8118 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_qoutfifo(ahd);
ahd              8121 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
ahd              8124 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, CMDS_PENDING, pending_cmds - ahd_qinfifo_count(ahd));
ahd              8125 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              8126 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags &= ~AHD_UPDATE_PEND_CMDS;
ahd              8130 drivers/scsi/aic7xxx/aic79xx_core.c ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status)
ahd              8141 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_done(ahd, scb);
ahd              8145 drivers/scsi/aic7xxx/aic79xx_core.c ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel,
ahd              8166 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              8167 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              8173 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd_inb(ahd, CCSCBCTL) & (CCARREN|CCSCBEN|CCSCBDIR))
ahd              8175 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, CCSCBCTL,
ahd              8176 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb(ahd, CCSCBCTL) & ~(CCARREN|CCSCBEN));
ahd              8177 drivers/scsi/aic7xxx/aic79xx_core.c 		while ((ahd_inb(ahd, CCSCBCTL) & (CCARREN|CCSCBEN)) != 0)
ahd              8181 drivers/scsi/aic7xxx/aic79xx_core.c 	qintail = AHD_QIN_WRAP(ahd->qinfifonext);
ahd              8182 drivers/scsi/aic7xxx/aic79xx_core.c 	qinstart = ahd_get_snscb_qoff(ahd);
ahd              8189 drivers/scsi/aic7xxx/aic79xx_core.c 		       qinstart, ahd->qinfifonext);
ahd              8196 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qinfifonext = qinstart;
ahd              8197 drivers/scsi/aic7xxx/aic79xx_core.c 	busaddr = ahd_le32toh(ahd->next_queued_hscb->hscb_busaddr);
ahd              8198 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outl(ahd, NEXT_QUEUED_SCB_ADDR, busaddr);
ahd              8201 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, ahd->qinfifo[qinpos]);
ahd              8204 drivers/scsi/aic7xxx/aic79xx_core.c 				qinpos, ahd->qinfifo[qinpos]);
ahd              8208 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_match_scb(ahd, scb, target, channel, lun, tag, role)) {
ahd              8217 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_done_with_status(ahd, scb, status);
ahd              8222 drivers/scsi/aic7xxx/aic79xx_core.c 				printk(" 0x%x", ahd->qinfifo[qinpos]);
ahd              8225 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_qinfifo_requeue(ahd, prev_scb, scb);
ahd              8230 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_qinfifo_requeue(ahd, prev_scb, scb);
ahd              8236 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_hnscb_qoff(ahd, ahd->qinfifonext);
ahd              8247 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              8248 drivers/scsi/aic7xxx/aic79xx_core.c 	seq_flags2 = ahd_inb(ahd, SEQ_FLAGS2);
ahd              8250 drivers/scsi/aic7xxx/aic79xx_core.c 		scbid = ahd_inw(ahd, MK_MESSAGE_SCB);
ahd              8251 drivers/scsi/aic7xxx/aic79xx_core.c 		mk_msg_scb = ahd_lookup_scb(ahd, scbid);
ahd              8254 drivers/scsi/aic7xxx/aic79xx_core.c 	savedscbptr = ahd_get_scbptr(ahd);
ahd              8255 drivers/scsi/aic7xxx/aic79xx_core.c 	tid_next = ahd_inw(ahd, WAITING_TID_HEAD);
ahd              8266 drivers/scsi/aic7xxx/aic79xx_core.c 		if (scbid >= ahd->scb_data.numscbs) {
ahd              8269 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid, ahd->scb_data.numscbs);
ahd              8270 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              8273 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              8276 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              8279 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              8280 drivers/scsi/aic7xxx/aic79xx_core.c 		tid_next = ahd_inw_scbram(ahd, SCB_NEXT2);
ahd              8281 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
ahd              8291 drivers/scsi/aic7xxx/aic79xx_core.c 			printk("       %d ( ", SCB_GET_TARGET(ahd, scb));
ahd              8293 drivers/scsi/aic7xxx/aic79xx_core.c 		found += ahd_search_scb_list(ahd, target, channel,
ahd              8296 drivers/scsi/aic7xxx/aic79xx_core.c 					     SCB_GET_TARGET(ahd, scb));
ahd              8302 drivers/scsi/aic7xxx/aic79xx_core.c 		 && ahd_match_scb(ahd, mk_msg_scb, target, channel,
ahd              8313 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_done_with_status(ahd, mk_msg_scb, status);
ahd              8326 drivers/scsi/aic7xxx/aic79xx_core.c 				    + (2 * SCB_GET_TARGET(ahd, mk_msg_scb));
ahd              8327 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, tail_offset, tid_tail);
ahd              8330 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outb(ahd, SEQ_FLAGS2, seq_flags2);
ahd              8331 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, CMDS_PENDING,
ahd              8332 drivers/scsi/aic7xxx/aic79xx_core.c 					 ahd_inw(ahd, CMDS_PENDING)-1);
ahd              8346 drivers/scsi/aic7xxx/aic79xx_core.c 		 && ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
ahd              8355 drivers/scsi/aic7xxx/aic79xx_core.c 			tid_head = ahd_inw(ahd, MK_MESSAGE_SCB);
ahd              8357 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SEQ_FLAGS2, seq_flags2);
ahd              8361 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_stitch_tid_list(ahd, tid_prev, tid_head, tid_next);
ahd              8369 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, savedscbptr);
ahd              8370 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              8375 drivers/scsi/aic7xxx/aic79xx_core.c ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
ahd              8386 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              8392 drivers/scsi/aic7xxx/aic79xx_core.c 		if (scbid >= ahd->scb_data.numscbs) {
ahd              8395 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid, ahd->scb_data.numscbs);
ahd              8396 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_dump_card_state(ahd);
ahd              8399 drivers/scsi/aic7xxx/aic79xx_core.c 		scb = ahd_lookup_scb(ahd, scbid);
ahd              8402 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd), scbid);
ahd              8405 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scbid);
ahd              8407 drivers/scsi/aic7xxx/aic79xx_core.c 		next = ahd_inw_scbram(ahd, SCB_NEXT);
ahd              8408 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_match_scb(ahd, scb, target, channel,
ahd              8418 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_done_with_status(ahd, scb, status);
ahd              8421 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_rem_wscb(ahd, scbid, prev, next, tid);
ahd              8438 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, CMDS_PENDING, ahd_inw(ahd, CMDS_PENDING) - found);
ahd              8443 drivers/scsi/aic7xxx/aic79xx_core.c ahd_stitch_tid_list(struct ahd_softc *ahd, u_int tid_prev,
ahd              8446 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              8452 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, WAITING_TID_HEAD, tid_next);
ahd              8454 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_scbptr(ahd, tid_prev);
ahd              8455 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, SCB_NEXT2, tid_next);
ahd              8458 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, WAITING_TID_TAIL, tid_prev);
ahd              8463 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, WAITING_TID_HEAD, tid_cur);
ahd              8465 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_scbptr(ahd, tid_prev);
ahd              8466 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, SCB_NEXT2, tid_cur);
ahd              8468 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, tid_cur);
ahd              8469 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, SCB_NEXT2, tid_next);
ahd              8472 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outw(ahd, WAITING_TID_TAIL, tid_cur);
ahd              8481 drivers/scsi/aic7xxx/aic79xx_core.c ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid,
ahd              8486 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              8488 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, prev);
ahd              8489 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, SCB_NEXT, next);
ahd              8501 drivers/scsi/aic7xxx/aic79xx_core.c 	 && ahd_inw(ahd, tail_offset) == scbid)
ahd              8502 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, tail_offset, prev);
ahd              8504 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_add_scb_to_free_list(ahd, scbid);
ahd              8514 drivers/scsi/aic7xxx/aic79xx_core.c ahd_add_scb_to_free_list(struct ahd_softc *ahd, u_int scbid)
ahd              8532 drivers/scsi/aic7xxx/aic79xx_core.c ahd_abort_scbs(struct ahd_softc *ahd, int target, char channel,
ahd              8545 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              8546 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              8548 drivers/scsi/aic7xxx/aic79xx_core.c 	found = ahd_search_qinfifo(ahd, target, channel, lun, SCB_LIST_NULL,
ahd              8580 drivers/scsi/aic7xxx/aic79xx_core.c 				scbid = ahd_find_busy_tcl(ahd, tcl);
ahd              8581 drivers/scsi/aic7xxx/aic79xx_core.c 				scbp = ahd_lookup_scb(ahd, scbid);
ahd              8583 drivers/scsi/aic7xxx/aic79xx_core.c 				 || ahd_match_scb(ahd, scbp, target, channel,
ahd              8586 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_unbusy_tcl(ahd, BUILD_TCL_RAW(i, 'A', j));
ahd              8595 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_qoutfifo(ahd);
ahd              8603 drivers/scsi/aic7xxx/aic79xx_core.c 	scbp_next = LIST_FIRST(&ahd->pending_scbs);
ahd              8607 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_match_scb(ahd, scbp, target, channel, lun, tag, role)) {
ahd              8617 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_done(ahd, scbp);
ahd              8621 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              8622 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_platform_abort_scbs(ahd, target, channel, lun, tag, role, status);
ahd              8623 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_UPDATE_PEND_CMDS;
ahd              8628 drivers/scsi/aic7xxx/aic79xx_core.c ahd_reset_current_bus(struct ahd_softc *ahd)
ahd              8632 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              8633 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE1, ahd_inb(ahd, SIMODE1) & ~ENSCSIRST);
ahd              8634 drivers/scsi/aic7xxx/aic79xx_core.c 	scsiseq = ahd_inb(ahd, SCSISEQ0) & ~(ENSELO|ENARBO|SCSIRSTO);
ahd              8635 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ0, scsiseq | SCSIRSTO);
ahd              8636 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              8639 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ0, scsiseq);
ahd              8640 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              8642 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->bugs & AHD_SCSIRST_BUG) != 0) {
ahd              8649 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset(ahd, /*reinit*/TRUE);
ahd              8650 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_intr_enable(ahd, /*enable*/TRUE);
ahd              8651 drivers/scsi/aic7xxx/aic79xx_core.c 		AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              8654 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_intstat(ahd);
ahd              8658 drivers/scsi/aic7xxx/aic79xx_core.c ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
ahd              8672 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->flags & AHD_BUS_RESET_ACTIVE) {
ahd              8674 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              8677 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->flags |= AHD_BUS_RESET_ACTIVE;
ahd              8679 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->pending_device = NULL;
ahd              8686 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_pause(ahd);
ahd              8689 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_critical_section(ahd);
ahd              8696 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_run_qoutfifo(ahd);
ahd              8698 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_TARGETROLE) != 0) {
ahd              8699 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_run_tqinfifo(ahd, /*paused*/TRUE);
ahd              8702 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              8708 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ0, 0);
ahd              8709 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ1, 0);
ahd              8716 drivers/scsi/aic7xxx/aic79xx_core.c 	next_fifo = fifo = ahd_inb(ahd, DFFSTAT) & CURRFIFO;
ahd              8722 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, next_fifo, next_fifo);
ahd              8723 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFCNTRL,
ahd              8724 drivers/scsi/aic7xxx/aic79xx_core.c 			 ahd_inb(ahd, DFCNTRL) & ~(SCSIEN|HDMAEN));
ahd              8725 drivers/scsi/aic7xxx/aic79xx_core.c 		while ((ahd_inb(ahd, DFCNTRL) & HDMAENACK) != 0)
ahd              8730 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              8731 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, DFFSTAT, next_fifo);
ahd              8737 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_msg_state(ahd);
ahd              8738 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE1,
ahd              8739 drivers/scsi/aic7xxx/aic79xx_core.c 		 ahd_inb(ahd, SIMODE1) & ~(ENBUSFREE|ENSCSIRST));
ahd              8742 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_reset_current_bus(ahd);
ahd              8744 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_intstat(ahd);
ahd              8750 drivers/scsi/aic7xxx/aic79xx_core.c 	found = ahd_abort_scbs(ahd, CAM_TARGET_WILDCARD, channel,
ahd              8757 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_fifo(ahd, 0);
ahd              8758 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_clear_fifo(ahd, 1);
ahd              8763 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, CLRSINT1, CLRSCSIRSTI);
ahd              8768 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SIMODE1, ahd_inb(ahd, SIMODE1) | ENSCSIRST);
ahd              8769 drivers/scsi/aic7xxx/aic79xx_core.c 	scsiseq = ahd_inb(ahd, SCSISEQ_TEMPLATE);
ahd              8770 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SCSISEQ1, scsiseq & (ENSELI|ENRSELI|ENAUTOATNP));
ahd              8772 drivers/scsi/aic7xxx/aic79xx_core.c 	max_scsiid = (ahd->features & AHD_WIDE) ? 15 : 7;
ahd              8782 drivers/scsi/aic7xxx/aic79xx_core.c 		tstate = ahd->enabled_targets[target];
ahd              8792 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_queue_lstate_event(ahd, lstate, CAM_TARGET_WILDCARD,
ahd              8794 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_send_lstate_events(ahd, lstate);
ahd              8803 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->enabled_targets[target] == NULL)
ahd              8811 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd              8813 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_set_syncrate(ahd, &devinfo, /*period*/0,
ahd              8820 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_send_async(ahd, caminfo.channel, CAM_TARGET_WILDCARD,
ahd              8823 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restart(ahd);
ahd              8832 drivers/scsi/aic7xxx/aic79xx_core.c 	struct	ahd_softc *ahd = from_timer(ahd, t, stat_timer);
ahd              8836 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lock(ahd, &s);
ahd              8838 drivers/scsi/aic7xxx/aic79xx_core.c 	enint_coal = ahd->hs_mailbox & ENINT_COALESCE;
ahd              8839 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd->cmdcmplt_total > ahd->int_coalescing_threshold)
ahd              8841 drivers/scsi/aic7xxx/aic79xx_core.c 	else if (ahd->cmdcmplt_total < ahd->int_coalescing_stop_threshold)
ahd              8844 drivers/scsi/aic7xxx/aic79xx_core.c 	if (enint_coal != (ahd->hs_mailbox & ENINT_COALESCE)) {
ahd              8845 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_enable_coalescing(ahd, enint_coal);
ahd              8850 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd_name(ahd),
ahd              8852 drivers/scsi/aic7xxx/aic79xx_core.c 			       ahd->cmdcmplt_total);
ahd              8856 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->cmdcmplt_bucket = (ahd->cmdcmplt_bucket+1) & (AHD_STAT_BUCKETS-1);
ahd              8857 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->cmdcmplt_total -= ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket];
ahd              8858 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket] = 0;
ahd              8859 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_timer_reset(&ahd->stat_timer, AHD_STAT_UPDATE_US);
ahd              8860 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_unlock(ahd, &s);
ahd              8866 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
ahd              8882 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_is_paused(ahd)) {
ahd              8886 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              8890 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_freeze_devq(ahd, scb);
ahd              8892 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->qfreeze_cnt++;
ahd              8893 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, KERNEL_QFREEZE_COUNT, ahd->qfreeze_cnt);
ahd              8896 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              8906 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_done(ahd, scb);
ahd              8916 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sync_sense(ahd, scb, BUS_DMASYNC_POSTREAD);
ahd              8921 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              8931 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              8969 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_done(ahd, scb);
ahd              8983 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              8993 drivers/scsi/aic7xxx/aic79xx_core.c 				    SCB_GET_TARGET(ahd, scb),
ahd              8995 drivers/scsi/aic7xxx/aic79xx_core.c 				    SCB_GET_CHANNEL(ahd, scb),
ahd              8997 drivers/scsi/aic7xxx/aic79xx_core.c 		targ_info = ahd_fetch_transinfo(ahd,
ahd              9008 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_update_residual(ahd, scb);
ahd              9011 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_print_path(ahd, scb);
ahd              9016 drivers/scsi/aic7xxx/aic79xx_core.c 		sg = ahd_sg_setup(ahd, scb, sg, ahd_get_sense_bufaddr(ahd, scb),
ahd              9017 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd_get_sense_bufsize(ahd, scb),
ahd              9026 drivers/scsi/aic7xxx/aic79xx_core.c 		sc->length = ahd_get_sense_bufsize(ahd, scb);
ahd              9047 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_update_neg_request(ahd, &devinfo,
ahd              9058 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_setup_data_scb(ahd, scb);
ahd              9060 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_queue_scb(ahd, scb);
ahd              9065 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              9068 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_done(ahd, scb);
ahd              9074 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_scb_status(struct ahd_softc *ahd, struct scb *scb)
ahd              9077 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_handle_scsi_status(ahd, scb);
ahd              9079 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_calc_residual(ahd, scb);
ahd              9080 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_done(ahd, scb);
ahd              9088 drivers/scsi/aic7xxx/aic79xx_core.c ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb)
ahd              9138 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              9141 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_freeze_devq(ahd, scb);
ahd              9156 drivers/scsi/aic7xxx/aic79xx_core.c 		sg = ahd_sg_bus_to_virt(ahd, scb, resid_sgptr & SG_PTR_MASK);
ahd              9178 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_print_path(ahd, scb);
ahd              9191 drivers/scsi/aic7xxx/aic79xx_core.c ahd_queue_lstate_event(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate,
ahd              9242 drivers/scsi/aic7xxx/aic79xx_core.c ahd_send_lstate_events(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate)
ahd              9278 drivers/scsi/aic7xxx/aic79xx_core.c ahd_dumpseq(struct ahd_softc* ahd)
ahd              9285 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE|LOADRAM);
ahd              9286 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, PRGMCNT, 0);
ahd              9290 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_insb(ahd, SEQRAM, ins_bytes, 4);
ahd              9300 drivers/scsi/aic7xxx/aic79xx_core.c ahd_loadseq(struct ahd_softc *ahd)
ahd              9320 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd));
ahd              9352 drivers/scsi/aic7xxx/aic79xx_core.c 	sg_prefetch_align = ahd->pci_cachesize;
ahd              9375 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0)
ahd              9399 drivers/scsi/aic7xxx/aic79xx_core.c 		(ahd->overrun_buf - (uint8_t *)ahd->qoutfifo) / 256;
ahd              9405 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE|LOADRAM);
ahd              9406 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outw(ahd, PRGMCNT, 0);
ahd              9409 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_check_patch(ahd, &cur_patch, i, &skip_addr) == 0) {
ahd              9437 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_download_instr(ahd, i, download_consts);
ahd              9441 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd->num_critical_sections = cs_count;
ahd              9445 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->critical_sections = kmalloc(cs_count, GFP_ATOMIC);
ahd              9446 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->critical_sections == NULL)
ahd              9448 drivers/scsi/aic7xxx/aic79xx_core.c 		memcpy(ahd->critical_sections, cs_table, cs_count);
ahd              9450 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE);
ahd              9455 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), ahd->features, ahd->bugs, ahd->flags);
ahd              9460 drivers/scsi/aic7xxx/aic79xx_core.c ahd_check_patch(struct ahd_softc *ahd, const struct patch **start_patch,
ahd              9473 drivers/scsi/aic7xxx/aic79xx_core.c 		if (cur_patch->patch_func(ahd) == 0) {
ahd              9496 drivers/scsi/aic7xxx/aic79xx_core.c ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address)
ahd              9509 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_check_patch(ahd, &cur_patch, i, &skip_addr);
ahd              9525 drivers/scsi/aic7xxx/aic79xx_core.c ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
ahd              9553 drivers/scsi/aic7xxx/aic79xx_core.c 		fmt3_ins->address = ahd_resolve_seqaddr(ahd, fmt3_ins->address);
ahd              9584 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outsb(ahd, SEQRAM, instr.bytes, 4);
ahd              9594 drivers/scsi/aic7xxx/aic79xx_core.c ahd_probe_stack_size(struct ahd_softc *ahd)
ahd              9609 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_outb(ahd, STACK, i & 0xFF);
ahd              9610 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_outb(ahd, STACK, (i >> 8) & 0xFF);
ahd              9617 drivers/scsi/aic7xxx/aic79xx_core.c 			stack_entry = ahd_inb(ahd, STACK)
ahd              9618 drivers/scsi/aic7xxx/aic79xx_core.c 				    |(ahd_inb(ahd, STACK) << 8);
ahd              9677 drivers/scsi/aic7xxx/aic79xx_core.c ahd_dump_card_state(struct ahd_softc *ahd)
ahd              9688 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_is_paused(ahd)) {
ahd              9692 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              9694 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              9695 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              9698 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), 
ahd              9699 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw(ahd, CURADDR),
ahd              9700 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_build_mode_state(ahd, ahd->saved_src_mode,
ahd              9701 drivers/scsi/aic7xxx/aic79xx_core.c 				    ahd->saved_dst_mode));
ahd              9705 drivers/scsi/aic7xxx/aic79xx_core.c 	if (ahd_check_cmdcmpltqueues(ahd))
ahd              9712 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_intstat_print(ahd_inb(ahd, INTSTAT), &cur_col, 50);
ahd              9713 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seloid_print(ahd_inb(ahd, SELOID), &cur_col, 50);
ahd              9714 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_selid_print(ahd_inb(ahd, SELID), &cur_col, 50);
ahd              9715 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_hs_mailbox_print(ahd_inb(ahd, LOCAL_HS_MAILBOX), &cur_col, 50);
ahd              9716 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_intctl_print(ahd_inb(ahd, INTCTL), &cur_col, 50);
ahd              9717 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seqintstat_print(ahd_inb(ahd, SEQINTSTAT), &cur_col, 50);
ahd              9718 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_saved_mode_print(ahd_inb(ahd, SAVED_MODE), &cur_col, 50);
ahd              9719 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_dffstat_print(ahd_inb(ahd, DFFSTAT), &cur_col, 50);
ahd              9720 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_scsisigi_print(ahd_inb(ahd, SCSISIGI), &cur_col, 50);
ahd              9721 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_scsiphase_print(ahd_inb(ahd, SCSIPHASE), &cur_col, 50);
ahd              9722 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_scsibus_print(ahd_inb(ahd, SCSIBUS), &cur_col, 50);
ahd              9723 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lastphase_print(ahd_inb(ahd, LASTPHASE), &cur_col, 50);
ahd              9724 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_scsiseq0_print(ahd_inb(ahd, SCSISEQ0), &cur_col, 50);
ahd              9725 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_scsiseq1_print(ahd_inb(ahd, SCSISEQ1), &cur_col, 50);
ahd              9726 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seqctl0_print(ahd_inb(ahd, SEQCTL0), &cur_col, 50);
ahd              9727 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seqintctl_print(ahd_inb(ahd, SEQINTCTL), &cur_col, 50);
ahd              9728 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seq_flags_print(ahd_inb(ahd, SEQ_FLAGS), &cur_col, 50);
ahd              9729 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_seq_flags2_print(ahd_inb(ahd, SEQ_FLAGS2), &cur_col, 50);
ahd              9730 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_qfreeze_count_print(ahd_inw(ahd, QFREEZE_COUNT), &cur_col, 50);
ahd              9731 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_kernel_qfreeze_count_print(ahd_inw(ahd, KERNEL_QFREEZE_COUNT),
ahd              9733 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_mk_message_scb_print(ahd_inw(ahd, MK_MESSAGE_SCB), &cur_col, 50);
ahd              9734 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_mk_message_scsiid_print(ahd_inb(ahd, MK_MESSAGE_SCSIID),
ahd              9736 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sstat0_print(ahd_inb(ahd, SSTAT0), &cur_col, 50);
ahd              9737 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sstat1_print(ahd_inb(ahd, SSTAT1), &cur_col, 50);
ahd              9738 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sstat2_print(ahd_inb(ahd, SSTAT2), &cur_col, 50);
ahd              9739 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sstat3_print(ahd_inb(ahd, SSTAT3), &cur_col, 50);
ahd              9740 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_perrdiag_print(ahd_inb(ahd, PERRDIAG), &cur_col, 50);
ahd              9741 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_simode1_print(ahd_inb(ahd, SIMODE1), &cur_col, 50);
ahd              9742 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqistat0_print(ahd_inb(ahd, LQISTAT0), &cur_col, 50);
ahd              9743 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqistat1_print(ahd_inb(ahd, LQISTAT1), &cur_col, 50);
ahd              9744 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqistat2_print(ahd_inb(ahd, LQISTAT2), &cur_col, 50);
ahd              9745 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqostat0_print(ahd_inb(ahd, LQOSTAT0), &cur_col, 50);
ahd              9746 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqostat1_print(ahd_inb(ahd, LQOSTAT1), &cur_col, 50);
ahd              9747 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_lqostat2_print(ahd_inb(ahd, LQOSTAT2), &cur_col, 50);
ahd              9751 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd->scb_data.numscbs, ahd_inw(ahd, CMDS_PENDING),
ahd              9752 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw(ahd, LASTSCB), ahd_inw(ahd, CURRSCB),
ahd              9753 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw(ahd, NEXTSCB));
ahd              9756 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_search_qinfifo(ahd, CAM_TARGET_WILDCARD, ALL_CHANNELS,
ahd              9759 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scb_index = ahd_get_scbptr(ahd);
ahd              9762 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
ahd              9766 drivers/scsi/aic7xxx/aic79xx_core.c 				 ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT));
ahd              9767 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
ahd              9768 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_scb_control_print(ahd_inb_scbram(ahd, SCB_CONTROL),
ahd              9770 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_scb_scsiid_print(ahd_inb_scbram(ahd, SCB_SCSIID),
ahd              9777 drivers/scsi/aic7xxx/aic79xx_core.c 	TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
ahd              9787 drivers/scsi/aic7xxx/aic79xx_core.c 	LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
ahd              9795 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_inw(ahd, COMPLETE_SCB_DMAINPROG_HEAD);
ahd              9798 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scb_index);
ahd              9800 drivers/scsi/aic7xxx/aic79xx_core.c 		scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              9805 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_inw(ahd, COMPLETE_SCB_HEAD);
ahd              9808 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scb_index);
ahd              9810 drivers/scsi/aic7xxx/aic79xx_core.c 		scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              9816 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
ahd              9819 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scb_index);
ahd              9821 drivers/scsi/aic7xxx/aic79xx_core.c 		scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              9825 drivers/scsi/aic7xxx/aic79xx_core.c 	scb_index = ahd_inw(ahd, COMPLETE_ON_QFREEZE_HEAD);
ahd              9828 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, scb_index);
ahd              9830 drivers/scsi/aic7xxx/aic79xx_core.c 		scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
ahd              9833 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scb_index);
ahd              9834 drivers/scsi/aic7xxx/aic79xx_core.c 	dffstat = ahd_inb(ahd, DFFSTAT);
ahd              9841 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_modes(ahd, AHD_MODE_DFF0 + i, AHD_MODE_DFF0 + i);
ahd              9842 drivers/scsi/aic7xxx/aic79xx_core.c 		fifo_scbptr = ahd_get_scbptr(ahd);
ahd              9844 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_name(ahd), i,
ahd              9846 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw(ahd, LONGJMP_ADDR), fifo_scbptr);
ahd              9848 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_seqimode_print(ahd_inb(ahd, SEQIMODE), &cur_col, 50);
ahd              9849 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_seqintsrc_print(ahd_inb(ahd, SEQINTSRC), &cur_col, 50);
ahd              9850 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dfcntrl_print(ahd_inb(ahd, DFCNTRL), &cur_col, 50);
ahd              9851 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dfstatus_print(ahd_inb(ahd, DFSTATUS), &cur_col, 50);
ahd              9852 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sg_cache_shadow_print(ahd_inb(ahd, SG_CACHE_SHADOW),
ahd              9854 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_sg_state_print(ahd_inb(ahd, SG_STATE), &cur_col, 50);
ahd              9855 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dffsxfrctl_print(ahd_inb(ahd, DFFSXFRCTL), &cur_col, 50);
ahd              9856 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_soffcnt_print(ahd_inb(ahd, SOFFCNT), &cur_col, 50);
ahd              9857 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_mdffstat_print(ahd_inb(ahd, MDFFSTAT), &cur_col, 50);
ahd              9863 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd_inl(ahd, SHADDR+4),
ahd              9864 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd_inl(ahd, SHADDR),
ahd              9865 drivers/scsi/aic7xxx/aic79xx_core.c 				  (ahd_inb(ahd, SHCNT)
ahd              9866 drivers/scsi/aic7xxx/aic79xx_core.c 				| (ahd_inb(ahd, SHCNT + 1) << 8)
ahd              9867 drivers/scsi/aic7xxx/aic79xx_core.c 				| (ahd_inb(ahd, SHCNT + 2) << 16)));
ahd              9873 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd_inl(ahd, HADDR+4),
ahd              9874 drivers/scsi/aic7xxx/aic79xx_core.c 				  ahd_inl(ahd, HADDR),
ahd              9875 drivers/scsi/aic7xxx/aic79xx_core.c 				  (ahd_inb(ahd, HCNT)
ahd              9876 drivers/scsi/aic7xxx/aic79xx_core.c 				| (ahd_inb(ahd, HCNT + 1) << 8)
ahd              9877 drivers/scsi/aic7xxx/aic79xx_core.c 				| (ahd_inb(ahd, HCNT + 2) << 16)));
ahd              9878 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_ccsgctl_print(ahd_inb(ahd, CCSGCTL), &cur_col, 50);
ahd              9881 drivers/scsi/aic7xxx/aic79xx_core.c 			fifo_scb = ahd_lookup_scb(ahd, fifo_scbptr);
ahd              9889 drivers/scsi/aic7xxx/aic79xx_core.c 		printk("0x%x ", ahd_inb(ahd, LQIN + i));
ahd              9891 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd              9893 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), ahd_inb(ahd, LQISTATE), ahd_inb(ahd, LQOSTATE),
ahd              9894 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb(ahd, OPTIONMODE));
ahd              9896 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), ahd_inb(ahd, OS_SPACE_CNT),
ahd              9897 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb(ahd, MAXCMDCNT));
ahd              9899 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), ahd_inb(ahd, SAVED_SCSIID),
ahd              9900 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb(ahd, SAVED_LUN));
ahd              9901 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_simode0_print(ahd_inb(ahd, SIMODE0), &cur_col, 50);
ahd              9903 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
ahd              9905 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_ccscbctl_print(ahd_inb(ahd, CCSCBCTL), &cur_col, 50);
ahd              9907 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode);
ahd              9909 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), ahd_inw(ahd, REG0), ahd_inw(ahd, SINDEX),
ahd              9910 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw(ahd, DINDEX));
ahd              9912 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_name(ahd), ahd_get_scbptr(ahd),
ahd              9913 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw_scbram(ahd, SCB_NEXT),
ahd              9914 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inw_scbram(ahd, SCB_NEXT2));
ahd              9916 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE),
ahd              9917 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE+1),
ahd              9918 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE+2),
ahd              9919 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE+3),
ahd              9920 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE+4),
ahd              9921 drivers/scsi/aic7xxx/aic79xx_core.c 	       ahd_inb_scbram(ahd, SCB_CDB_STORE+5));
ahd              9923 drivers/scsi/aic7xxx/aic79xx_core.c 	for (i = 0; i < ahd->stack_size; i++) {
ahd              9924 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->saved_stack[i] =
ahd              9925 drivers/scsi/aic7xxx/aic79xx_core.c 		    ahd_inb(ahd, STACK)|(ahd_inb(ahd, STACK) << 8);
ahd              9926 drivers/scsi/aic7xxx/aic79xx_core.c 		printk(" 0x%x", ahd->saved_stack[i]);
ahd              9928 drivers/scsi/aic7xxx/aic79xx_core.c 	for (i = ahd->stack_size-1; i >= 0; i--) {
ahd              9929 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, STACK, ahd->saved_stack[i] & 0xFF);
ahd              9930 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, STACK, (ahd->saved_stack[i] >> 8) & 0xFF);
ahd              9933 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              9935 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              9940 drivers/scsi/aic7xxx/aic79xx_core.c ahd_dump_scbs(struct ahd_softc *ahd)
ahd              9946 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_modes = ahd_save_modes(ahd);
ahd              9947 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              9948 drivers/scsi/aic7xxx/aic79xx_core.c 	saved_scb_index = ahd_get_scbptr(ahd);
ahd              9950 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_set_scbptr(ahd, i);
ahd              9953 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb_scbram(ahd, SCB_CONTROL),
ahd              9954 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inb_scbram(ahd, SCB_SCSIID),
ahd              9955 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw_scbram(ahd, SCB_NEXT),
ahd              9956 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inw_scbram(ahd, SCB_NEXT2),
ahd              9957 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inl_scbram(ahd, SCB_SGPTR),
ahd              9958 drivers/scsi/aic7xxx/aic79xx_core.c 		       ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR));
ahd              9961 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_set_scbptr(ahd, saved_scb_index);
ahd              9962 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_restore_modes(ahd, saved_modes);
ahd              9974 drivers/scsi/aic7xxx/aic79xx_core.c ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
ahd              9986 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              9990 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEEADR, cur_addr);
ahd              9991 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEECTL, SEEOP_READ | SEESTART);
ahd              9993 drivers/scsi/aic7xxx/aic79xx_core.c 		error = ahd_wait_seeprom(ahd);
ahd              10000 drivers/scsi/aic7xxx/aic79xx_core.c 			*bytestream_ptr++ = ahd_inb(ahd, SEEDAT);
ahd              10001 drivers/scsi/aic7xxx/aic79xx_core.c 			*bytestream_ptr = ahd_inb(ahd, SEEDAT+1);
ahd              10006 drivers/scsi/aic7xxx/aic79xx_core.c 			*buf = ahd_inw(ahd, SEEDAT);
ahd              10019 drivers/scsi/aic7xxx/aic79xx_core.c ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
ahd              10027 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              10031 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEEADR, SEEOP_EWEN_ADDR);
ahd              10032 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEECTL, SEEOP_EWEN | SEESTART);
ahd              10033 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_wait_seeprom(ahd);
ahd              10044 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outw(ahd, SEEDAT, *buf++);
ahd              10045 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEEADR, cur_addr);
ahd              10046 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SEECTL, SEEOP_WRITE | SEESTART);
ahd              10048 drivers/scsi/aic7xxx/aic79xx_core.c 		retval = ahd_wait_seeprom(ahd);
ahd              10056 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEEADR, SEEOP_EWDS_ADDR);
ahd              10057 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, SEECTL, SEEOP_EWDS | SEESTART);
ahd              10058 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_wait_seeprom(ahd);
ahd              10068 drivers/scsi/aic7xxx/aic79xx_core.c ahd_wait_seeprom(struct ahd_softc *ahd)
ahd              10073 drivers/scsi/aic7xxx/aic79xx_core.c 	while ((ahd_inb(ahd, SEESTAT) & (SEEARBACK|SEEBUSY)) != 0 && --cnt)
ahd              10136 drivers/scsi/aic7xxx/aic79xx_core.c ahd_acquire_seeprom(struct ahd_softc *ahd)
ahd              10150 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_read_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, &seetype);
ahd              10159 drivers/scsi/aic7xxx/aic79xx_core.c ahd_release_seeprom(struct ahd_softc *ahd)
ahd              10168 drivers/scsi/aic7xxx/aic79xx_core.c ahd_wait_flexport(struct ahd_softc *ahd)
ahd              10172 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              10174 drivers/scsi/aic7xxx/aic79xx_core.c 	while ((ahd_inb(ahd, BRDCTL) & FLXARBACK) == 0 && --cnt)
ahd              10183 drivers/scsi/aic7xxx/aic79xx_core.c ahd_write_flexport(struct ahd_softc *ahd, u_int addr, u_int value)
ahd              10187 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              10190 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, BRDEN|(addr << 3));
ahd              10191 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_wait_flexport(ahd);
ahd              10194 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDDAT, value);
ahd              10195 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              10196 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, BRDSTB|BRDEN|(addr << 3));
ahd              10197 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              10198 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, BRDEN|(addr << 3));
ahd              10199 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              10200 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, 0);
ahd              10201 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              10206 drivers/scsi/aic7xxx/aic79xx_core.c ahd_read_flexport(struct ahd_softc *ahd, u_int addr, uint8_t *value)
ahd              10210 drivers/scsi/aic7xxx/aic79xx_core.c 	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd              10213 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, BRDRW|BRDEN|(addr << 3));
ahd              10214 drivers/scsi/aic7xxx/aic79xx_core.c 	error = ahd_wait_flexport(ahd);
ahd              10217 drivers/scsi/aic7xxx/aic79xx_core.c 	*value = ahd_inb(ahd, BRDDAT);
ahd              10218 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_outb(ahd, BRDCTL, 0);
ahd              10219 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_flush_device_writes(ahd);
ahd              10226 drivers/scsi/aic7xxx/aic79xx_core.c ahd_find_tmode_devs(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb,
ahd              10232 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_TARGETMODE) == 0)
ahd              10242 drivers/scsi/aic7xxx/aic79xx_core.c 		*lstate = ahd->black_hole;
ahd              10246 drivers/scsi/aic7xxx/aic79xx_core.c 		max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
ahd              10253 drivers/scsi/aic7xxx/aic79xx_core.c 		*tstate = ahd->enabled_targets[ccb->ccb_h.target_id];
ahd              10267 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
ahd              10280 drivers/scsi/aic7xxx/aic79xx_core.c 	status = ahd_find_tmode_devs(ahd, sim, ccb, &tstate, &lstate,
ahd              10288 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_MULTIROLE) != 0) {
ahd              10291 drivers/scsi/aic7xxx/aic79xx_core.c 		our_id = ahd->our_id;
ahd              10293 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->features & AHD_MULTI_TID) != 0
ahd              10294 drivers/scsi/aic7xxx/aic79xx_core.c 		   	 && (ahd->flags & AHD_INITIATORROLE) != 0) {
ahd              10303 drivers/scsi/aic7xxx/aic79xx_core.c 			} else if ((ahd->flags & AHD_INITIATORROLE) != 0
ahd              10304 drivers/scsi/aic7xxx/aic79xx_core.c 				|| ahd->enabled_luns > 0) {
ahd              10326 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->flags & AHD_TARGETROLE) == 0
ahd              10331 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_lock(ahd, &s);
ahd              10332 drivers/scsi/aic7xxx/aic79xx_core.c 		if (LIST_FIRST(&ahd->pending_scbs) != NULL) {
ahd              10334 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unlock(ahd, &s);
ahd              10337 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_TARGETROLE;
ahd              10338 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->features & AHD_MULTIROLE) == 0)
ahd              10339 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->flags &= ~AHD_INITIATORROLE;
ahd              10340 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              10341 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_loadseq(ahd);
ahd              10342 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_restart(ahd);
ahd              10343 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unlock(ahd, &s);
ahd              10348 drivers/scsi/aic7xxx/aic79xx_core.c 	channel = SIM_CHANNEL(ahd, sim);
ahd              10380 drivers/scsi/aic7xxx/aic79xx_core.c 			tstate = ahd_alloc_tstate(ahd, target, channel);
ahd              10408 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_lock(ahd, &s);
ahd              10409 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              10412 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->enabled_luns++;
ahd              10414 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->features & AHD_MULTI_TID) != 0) {
ahd              10417 drivers/scsi/aic7xxx/aic79xx_core.c 				targid_mask = ahd_inw(ahd, TARGID);
ahd              10419 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_outw(ahd, TARGID, targid_mask);
ahd              10420 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_update_scsiid(ahd, targid_mask);
ahd              10425 drivers/scsi/aic7xxx/aic79xx_core.c 				channel = SIM_CHANNEL(ahd, sim);
ahd              10426 drivers/scsi/aic7xxx/aic79xx_core.c 				our_id = SIM_SCSI_ID(ahd, sim);
ahd              10437 drivers/scsi/aic7xxx/aic79xx_core.c 					sblkctl = ahd_inb(ahd, SBLKCTL);
ahd              10440 drivers/scsi/aic7xxx/aic79xx_core.c 					if ((ahd->features & AHD_TWIN) == 0)
ahd              10443 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd->our_id = target;
ahd              10446 drivers/scsi/aic7xxx/aic79xx_core.c 						ahd_outb(ahd, SBLKCTL,
ahd              10449 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_outb(ahd, SCSIID, target);
ahd              10452 drivers/scsi/aic7xxx/aic79xx_core.c 						ahd_outb(ahd, SBLKCTL, sblkctl);
ahd              10456 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->black_hole = lstate;
ahd              10458 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->black_hole != NULL && ahd->enabled_luns > 0) {
ahd              10459 drivers/scsi/aic7xxx/aic79xx_core.c 			scsiseq1 = ahd_inb(ahd, SCSISEQ_TEMPLATE);
ahd              10461 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCSISEQ_TEMPLATE, scsiseq1);
ahd              10462 drivers/scsi/aic7xxx/aic79xx_core.c 			scsiseq1 = ahd_inb(ahd, SCSISEQ1);
ahd              10464 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCSISEQ1, scsiseq1);
ahd              10466 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              10467 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unlock(ahd, &s);
ahd              10480 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_lock(ahd, &s);
ahd              10483 drivers/scsi/aic7xxx/aic79xx_core.c 		LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
ahd              10491 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_unlock(ahd, &s);
ahd              10507 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_unlock(ahd, &s);
ahd              10516 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_pause(ahd);
ahd              10520 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->enabled_luns--;
ahd              10528 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_free_tstate(ahd, target, channel,
ahd              10530 drivers/scsi/aic7xxx/aic79xx_core.c 				if (ahd->features & AHD_MULTI_TID) {
ahd              10533 drivers/scsi/aic7xxx/aic79xx_core.c 					targid_mask = ahd_inw(ahd, TARGID);
ahd              10535 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_outw(ahd, TARGID, targid_mask);
ahd              10536 drivers/scsi/aic7xxx/aic79xx_core.c 					ahd_update_scsiid(ahd, targid_mask);
ahd              10541 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd->black_hole = NULL;
ahd              10549 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd->enabled_luns == 0) {
ahd              10553 drivers/scsi/aic7xxx/aic79xx_core.c 			scsiseq1 = ahd_inb(ahd, SCSISEQ_TEMPLATE);
ahd              10555 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCSISEQ_TEMPLATE, scsiseq1);
ahd              10556 drivers/scsi/aic7xxx/aic79xx_core.c 			scsiseq1 = ahd_inb(ahd, SCSISEQ1);
ahd              10558 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, SCSISEQ1, scsiseq1);
ahd              10560 drivers/scsi/aic7xxx/aic79xx_core.c 			if ((ahd->features & AHD_MULTIROLE) == 0) {
ahd              10562 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->flags &= ~AHD_TARGETROLE;
ahd              10563 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->flags |= AHD_INITIATORROLE;
ahd              10564 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_pause(ahd);
ahd              10565 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_loadseq(ahd);
ahd              10566 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_restart(ahd);
ahd              10573 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unpause(ahd);
ahd              10574 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_unlock(ahd, &s);
ahd              10580 drivers/scsi/aic7xxx/aic79xx_core.c ahd_update_scsiid(struct ahd_softc *ahd, u_int targid_mask)
ahd              10586 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_MULTI_TID) == 0)
ahd              10595 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_ULTRA2) != 0)
ahd              10596 drivers/scsi/aic7xxx/aic79xx_core.c 		scsiid = ahd_inb(ahd, SCSIID_ULTRA2);
ahd              10598 drivers/scsi/aic7xxx/aic79xx_core.c 		scsiid = ahd_inb(ahd, SCSIID);
ahd              10606 drivers/scsi/aic7xxx/aic79xx_core.c 			our_id = ahd->our_id;
ahd              10612 drivers/scsi/aic7xxx/aic79xx_core.c 	if ((ahd->features & AHD_ULTRA2) != 0)
ahd              10613 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSIID_ULTRA2, scsiid);
ahd              10615 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_outb(ahd, SCSIID, scsiid);
ahd              10620 drivers/scsi/aic7xxx/aic79xx_core.c ahd_run_tqinfifo(struct ahd_softc *ahd, int paused)
ahd              10624 drivers/scsi/aic7xxx/aic79xx_core.c 	ahd_sync_tqinfifo(ahd, BUS_DMASYNC_POSTREAD);
ahd              10625 drivers/scsi/aic7xxx/aic79xx_core.c 	while ((cmd = &ahd->targetcmds[ahd->tqinfifonext])->cmd_valid != 0) {
ahd              10631 drivers/scsi/aic7xxx/aic79xx_core.c 		if (ahd_handle_target_cmd(ahd, cmd) != 0)
ahd              10635 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd_dmamap_sync(ahd, ahd->shared_data_dmat,
ahd              10636 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd->shared_data_map.dmamap,
ahd              10637 drivers/scsi/aic7xxx/aic79xx_core.c 				ahd_targetcmd_offset(ahd, ahd->tqinfifonext),
ahd              10640 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->tqinfifonext++;
ahd              10646 drivers/scsi/aic7xxx/aic79xx_core.c 		if ((ahd->tqinfifonext & (HOST_TQINPOS - 1)) == 1) {
ahd              10649 drivers/scsi/aic7xxx/aic79xx_core.c 			hs_mailbox = ahd_inb(ahd, HS_MAILBOX);
ahd              10651 drivers/scsi/aic7xxx/aic79xx_core.c 			hs_mailbox |= ahd->tqinfifonext & HOST_TQINPOS;
ahd              10652 drivers/scsi/aic7xxx/aic79xx_core.c 			ahd_outb(ahd, HS_MAILBOX, hs_mailbox);
ahd              10658 drivers/scsi/aic7xxx/aic79xx_core.c ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd)
ahd              10668 drivers/scsi/aic7xxx/aic79xx_core.c 	initiator = SCSIID_TARGET(ahd, cmd->scsiid);
ahd              10673 drivers/scsi/aic7xxx/aic79xx_core.c 	tstate = ahd->enabled_targets[target];
ahd              10682 drivers/scsi/aic7xxx/aic79xx_core.c 		lstate = ahd->black_hole;
ahd              10686 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags |= AHD_TQINFIFO_BLOCKED;
ahd              10692 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->flags &= ~AHD_TQINFIFO_BLOCKED;
ahd              10697 drivers/scsi/aic7xxx/aic79xx_core.c 		       lstate == ahd->black_hole ? "(Black Holed)" : "");
ahd              10701 drivers/scsi/aic7xxx/aic79xx_core.c 	if (lstate == ahd->black_hole) {
ahd              10760 drivers/scsi/aic7xxx/aic79xx_core.c 			       initiator, target, lun, ahd->pending_device);
ahd              10762 drivers/scsi/aic7xxx/aic79xx_core.c 		ahd->pending_device = lstate;
ahd                49 drivers/scsi/aic7xxx/aic79xx_inline.h static inline char *ahd_name(struct ahd_softc *ahd);
ahd                51 drivers/scsi/aic7xxx/aic79xx_inline.h static inline char *ahd_name(struct ahd_softc *ahd)
ahd                53 drivers/scsi/aic7xxx/aic79xx_inline.h 	return (ahd->name);
ahd                57 drivers/scsi/aic7xxx/aic79xx_inline.h static inline void ahd_known_modes(struct ahd_softc *ahd,
ahd                59 drivers/scsi/aic7xxx/aic79xx_inline.h static inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd,
ahd                62 drivers/scsi/aic7xxx/aic79xx_inline.h static inline void ahd_extract_mode_state(struct ahd_softc *ahd,
ahd                66 drivers/scsi/aic7xxx/aic79xx_inline.h void ahd_set_modes(struct ahd_softc *ahd, ahd_mode src,
ahd                68 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_mode_state ahd_save_modes(struct ahd_softc *ahd);
ahd                69 drivers/scsi/aic7xxx/aic79xx_inline.h void ahd_restore_modes(struct ahd_softc *ahd,
ahd                71 drivers/scsi/aic7xxx/aic79xx_inline.h int  ahd_is_paused(struct ahd_softc *ahd);
ahd                72 drivers/scsi/aic7xxx/aic79xx_inline.h void ahd_pause(struct ahd_softc *ahd);
ahd                73 drivers/scsi/aic7xxx/aic79xx_inline.h void ahd_unpause(struct ahd_softc *ahd);
ahd                76 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
ahd                78 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd->src_mode = src;
ahd                79 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd->dst_mode = dst;
ahd                80 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd->saved_src_mode = src;
ahd                81 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd->saved_dst_mode = dst;
ahd                85 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
ahd                91 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state,
ahd                99 drivers/scsi/aic7xxx/aic79xx_inline.h void	*ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
ahd               104 drivers/scsi/aic7xxx/aic79xx_inline.h static inline size_t	ahd_sg_size(struct ahd_softc *ahd);
ahd               106 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_sync_sglist(struct ahd_softc *ahd,
ahd               109 drivers/scsi/aic7xxx/aic79xx_inline.h static inline size_t ahd_sg_size(struct ahd_softc *ahd)
ahd               111 drivers/scsi/aic7xxx/aic79xx_inline.h 	if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0)
ahd               118 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd_fetch_transinfo(struct ahd_softc *ahd,
ahd               123 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd_inw(struct ahd_softc *ahd, u_int port);
ahd               124 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_outw(struct ahd_softc *ahd, u_int port,
ahd               127 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd_inl(struct ahd_softc *ahd, u_int port);
ahd               128 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_outl(struct ahd_softc *ahd, u_int port,
ahd               131 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd_inq(struct ahd_softc *ahd, u_int port);
ahd               132 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_outq(struct ahd_softc *ahd, u_int port,
ahd               134 drivers/scsi/aic7xxx/aic79xx_inline.h u_int	ahd_get_scbptr(struct ahd_softc *ahd);
ahd               135 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr);
ahd               136 drivers/scsi/aic7xxx/aic79xx_inline.h u_int	ahd_inb_scbram(struct ahd_softc *ahd, u_int offset);
ahd               137 drivers/scsi/aic7xxx/aic79xx_inline.h u_int	ahd_inw_scbram(struct ahd_softc *ahd, u_int offset);
ahd               139 drivers/scsi/aic7xxx/aic79xx_inline.h 	ahd_lookup_scb(struct ahd_softc *ahd, u_int tag);
ahd               140 drivers/scsi/aic7xxx/aic79xx_inline.h void	ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
ahd               142 drivers/scsi/aic7xxx/aic79xx_inline.h static inline uint8_t *ahd_get_sense_buf(struct ahd_softc *ahd,
ahd               144 drivers/scsi/aic7xxx/aic79xx_inline.h static inline uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd,
ahd               158 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
ahd               164 drivers/scsi/aic7xxx/aic79xx_inline.h ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
ahd               170 drivers/scsi/aic7xxx/aic79xx_inline.h int	ahd_intr(struct ahd_softc *ahd);
ahd               224 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
ahd               227 drivers/scsi/aic7xxx/aic79xx_osm.c 	       ahd->platform_data->host->host_no,
ahd               228 drivers/scsi/aic7xxx/aic79xx_osm.c 	       scb != NULL ? SCB_GET_CHANNEL(ahd, scb) : 'X',
ahd               229 drivers/scsi/aic7xxx/aic79xx_osm.c 	       scb != NULL ? SCB_GET_TARGET(ahd, scb) : -1,
ahd               355 drivers/scsi/aic7xxx/aic79xx_osm.c static void ahd_linux_queue_cmd_complete(struct ahd_softc *ahd,
ahd               358 drivers/scsi/aic7xxx/aic79xx_osm.c static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
ahd               359 drivers/scsi/aic7xxx/aic79xx_osm.c static u_int ahd_linux_user_tagdepth(struct ahd_softc *ahd,
ahd               367 drivers/scsi/aic7xxx/aic79xx_osm.c static void ahd_freeze_simq(struct ahd_softc *ahd);
ahd               368 drivers/scsi/aic7xxx/aic79xx_osm.c static void ahd_release_simq(struct ahd_softc *ahd);
ahd               391 drivers/scsi/aic7xxx/aic79xx_osm.c uint8_t ahd_inb(struct ahd_softc * ahd, long port);
ahd               392 drivers/scsi/aic7xxx/aic79xx_osm.c void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val);
ahd               393 drivers/scsi/aic7xxx/aic79xx_osm.c void ahd_outw_atomic(struct ahd_softc * ahd,
ahd               395 drivers/scsi/aic7xxx/aic79xx_osm.c void ahd_outsb(struct ahd_softc * ahd, long port,
ahd               397 drivers/scsi/aic7xxx/aic79xx_osm.c void ahd_insb(struct ahd_softc * ahd, long port,
ahd               401 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_inb(struct ahd_softc * ahd, long port)
ahd               405 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->tags[0] == BUS_SPACE_MEMIO) {
ahd               406 drivers/scsi/aic7xxx/aic79xx_osm.c 		x = readb(ahd->bshs[0].maddr + port);
ahd               408 drivers/scsi/aic7xxx/aic79xx_osm.c 		x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
ahd               416 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_inw_atomic(struct ahd_softc * ahd, long port)
ahd               420 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->tags[0] == BUS_SPACE_MEMIO) {
ahd               421 drivers/scsi/aic7xxx/aic79xx_osm.c 		x = readw(ahd->bshs[0].maddr + port);
ahd               423 drivers/scsi/aic7xxx/aic79xx_osm.c 		x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
ahd               431 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_outb(struct ahd_softc * ahd, long port, uint8_t val)
ahd               433 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->tags[0] == BUS_SPACE_MEMIO) {
ahd               434 drivers/scsi/aic7xxx/aic79xx_osm.c 		writeb(val, ahd->bshs[0].maddr + port);
ahd               436 drivers/scsi/aic7xxx/aic79xx_osm.c 		outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
ahd               442 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val)
ahd               444 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->tags[0] == BUS_SPACE_MEMIO) {
ahd               445 drivers/scsi/aic7xxx/aic79xx_osm.c 		writew(val, ahd->bshs[0].maddr + port);
ahd               447 drivers/scsi/aic7xxx/aic79xx_osm.c 		outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
ahd               453 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_outsb(struct ahd_softc * ahd, long port, uint8_t *array, int count)
ahd               463 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_outb(ahd, port, *array++);
ahd               467 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_insb(struct ahd_softc * ahd, long port, uint8_t *array, int count)
ahd               477 drivers/scsi/aic7xxx/aic79xx_osm.c 		*array++ = ahd_inb(ahd, port);
ahd               534 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb)
ahd               539 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE);
ahd               544 drivers/scsi/aic7xxx/aic79xx_osm.c #define BUILD_SCSIID(ahd, cmd)						\
ahd               545 drivers/scsi/aic7xxx/aic79xx_osm.c 	(((scmd_id(cmd) << TID_SHIFT) & TID) | (ahd)->our_id)
ahd               556 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd;
ahd               559 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *(struct ahd_softc **)host->hostdata;
ahd               563 drivers/scsi/aic7xxx/aic79xx_osm.c 	strcat(bp, ahd->description);
ahd               566 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_controller_info(ahd, ahd_info);
ahd               578 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	 ahd_softc *ahd;
ahd               582 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
ahd               586 drivers/scsi/aic7xxx/aic79xx_osm.c 	rtn = ahd_linux_run_command(ahd, dev, cmd);
ahd               596 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	ahd_softc *ahd =
ahd               604 drivers/scsi/aic7xxx/aic79xx_osm.c 	return &ahd->platform_data->starget[target_offset];
ahd               610 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	ahd_softc *ahd =
ahd               612 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct seeprom_config *sc = ahd->seep_config;
ahd               620 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd               629 drivers/scsi/aic7xxx/aic79xx_osm.c 		tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd               636 drivers/scsi/aic7xxx/aic79xx_osm.c 			if ((ahd->features & AHD_RTI) == 0)
ahd               649 drivers/scsi/aic7xxx/aic79xx_osm.c 	tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id,
ahd               651 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id,
ahd               654 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, 0, 0, 0,
ahd               656 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahd               658 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd               674 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	ahd_softc *ahd =
ahd               679 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: Slave Alloc %d\n", ahd_name(ahd), sdev->id);
ahd               703 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	ahd_softc *ahd;
ahd               705 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *((struct ahd_softc **)sdev->host->hostdata);
ahd               732 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	 ahd_softc *ahd;
ahd               734 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *((struct ahd_softc **)sdev->host->hostdata);
ahd               751 drivers/scsi/aic7xxx/aic79xx_osm.c 		extended = (ahd->flags & AHD_EXTENDED_TRANS_A) != 0;
ahd               783 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd;
ahd               798 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
ahd               825 drivers/scsi/aic7xxx/aic79xx_osm.c 	reset_scb = ahd_get_scb(ahd, AHD_NEVER_COL_IDX);
ahd               831 drivers/scsi/aic7xxx/aic79xx_osm.c 	tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd               840 drivers/scsi/aic7xxx/aic79xx_osm.c 	reset_scb->hscb->scsiid = BUILD_SCSIID(ahd,cmd);
ahd               854 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd               856 drivers/scsi/aic7xxx/aic79xx_osm.c 	LIST_INSERT_HEAD(&ahd->pending_scbs, reset_scb, pending_links);
ahd               857 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_queue_scb(ahd, reset_scb);
ahd               859 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd->platform_data->eh_done = &done;
ahd               860 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd               862 drivers/scsi/aic7xxx/aic79xx_osm.c 	printk("%s: Device reset code sleeping\n", ahd_name(ahd));
ahd               864 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_lock(ahd, &flags);
ahd               865 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd->platform_data->eh_done = NULL;
ahd               866 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_unlock(ahd, &flags);
ahd               868 drivers/scsi/aic7xxx/aic79xx_osm.c 		       ahd_name(ahd), dev->active);
ahd               871 drivers/scsi/aic7xxx/aic79xx_osm.c 	printk("%s: Device reset returning 0x%x\n", ahd_name(ahd), retval);
ahd               882 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd;
ahd               886 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
ahd               890 drivers/scsi/aic7xxx/aic79xx_osm.c 		       ahd_name(ahd), cmd);
ahd               892 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd               894 drivers/scsi/aic7xxx/aic79xx_osm.c 	found = ahd_reset_channel(ahd, scmd_channel(cmd) + 'A',
ahd               896 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd               900 drivers/scsi/aic7xxx/aic79xx_osm.c 		       "%d SCBs aborted.\n", ahd_name(ahd), found);
ahd               931 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dma_tag_create(struct ahd_softc *ahd, bus_dma_tag_t parent,
ahd               959 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dma_tag_destroy(struct ahd_softc *ahd, bus_dma_tag_t dmat)
ahd               965 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dmamem_alloc(struct ahd_softc *ahd, bus_dma_tag_t dmat, void** vaddr,
ahd               968 drivers/scsi/aic7xxx/aic79xx_osm.c 	*vaddr = pci_alloc_consistent(ahd->dev_softc,
ahd               976 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dmamem_free(struct ahd_softc *ahd, bus_dma_tag_t dmat,
ahd               979 drivers/scsi/aic7xxx/aic79xx_osm.c 	pci_free_consistent(ahd->dev_softc, dmat->maxsize,
ahd               984 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dmamap_load(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map,
ahd              1001 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dmamap_destroy(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map)
ahd              1006 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_dmamap_unload(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map)
ahd              1223 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *template)
ahd              1231 drivers/scsi/aic7xxx/aic79xx_osm.c 	template->name = ahd->description;
ahd              1236 drivers/scsi/aic7xxx/aic79xx_osm.c 	*((struct ahd_softc **)host->hostdata) = ahd;
ahd              1237 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd->platform_data->host = host;
ahd              1241 drivers/scsi/aic7xxx/aic79xx_osm.c 	host->this_id = ahd->our_id;
ahd              1242 drivers/scsi/aic7xxx/aic79xx_osm.c 	host->irq = ahd->platform_data->irq;
ahd              1243 drivers/scsi/aic7xxx/aic79xx_osm.c 	host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
ahd              1247 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &s);
ahd              1248 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_unit(ahd, ahd_linux_unit++);
ahd              1249 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &s);
ahd              1254 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_set_name(ahd, new_name);
ahd              1256 drivers/scsi/aic7xxx/aic79xx_osm.c 	host->unique_id = ahd->unit;
ahd              1257 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_linux_initialize_scsi_bus(ahd);
ahd              1258 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_intr_enable(ahd, TRUE);
ahd              1262 drivers/scsi/aic7xxx/aic79xx_osm.c 	retval = scsi_add_host(host, &ahd->dev_softc->dev);
ahd              1279 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd)
ahd              1289 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd->flags &= ~AHD_RESET_BUS_A;
ahd              1291 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((ahd->flags & AHD_RESET_BUS_A) != 0)
ahd              1292 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_reset_channel(ahd, 'A', /*initiate_reset*/TRUE);
ahd              1294 drivers/scsi/aic7xxx/aic79xx_osm.c 		numtarg = (ahd->features & AHD_WIDE) ? 16 : 8;
ahd              1296 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &s);
ahd              1307 drivers/scsi/aic7xxx/aic79xx_osm.c 		tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd              1309 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_compile_devinfo(&devinfo, ahd->our_id, target_id,
ahd              1311 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_update_neg_request(ahd, &devinfo, tstate,
ahd              1314 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &s);
ahd              1316 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((ahd->flags & AHD_RESET_BUS_A) != 0) {
ahd              1317 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_freeze_simq(ahd);
ahd              1319 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_release_simq(ahd);
ahd              1324 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg)
ahd              1326 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd->platform_data =
ahd              1328 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->platform_data == NULL)
ahd              1330 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd->platform_data->irq = AHD_LINUX_NOIRQ;
ahd              1331 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lockinit(ahd);
ahd              1332 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd->seltime = (aic79xx_seltime & 0x3) << 4;
ahd              1337 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_free(struct ahd_softc *ahd)
ahd              1342 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->platform_data != NULL) {
ahd              1345 drivers/scsi/aic7xxx/aic79xx_osm.c 			starget = ahd->platform_data->starget[i];
ahd              1347 drivers/scsi/aic7xxx/aic79xx_osm.c 				ahd->platform_data->starget[i] = NULL;
ahd              1351 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->platform_data->irq != AHD_LINUX_NOIRQ)
ahd              1352 drivers/scsi/aic7xxx/aic79xx_osm.c 			free_irq(ahd->platform_data->irq, ahd);
ahd              1353 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->tags[0] == BUS_SPACE_PIO
ahd              1354 drivers/scsi/aic7xxx/aic79xx_osm.c 		 && ahd->bshs[0].ioport != 0)
ahd              1355 drivers/scsi/aic7xxx/aic79xx_osm.c 			release_region(ahd->bshs[0].ioport, 256);
ahd              1356 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->tags[1] == BUS_SPACE_PIO
ahd              1357 drivers/scsi/aic7xxx/aic79xx_osm.c 		 && ahd->bshs[1].ioport != 0)
ahd              1358 drivers/scsi/aic7xxx/aic79xx_osm.c 			release_region(ahd->bshs[1].ioport, 256);
ahd              1359 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->tags[0] == BUS_SPACE_MEMIO
ahd              1360 drivers/scsi/aic7xxx/aic79xx_osm.c 		 && ahd->bshs[0].maddr != NULL) {
ahd              1361 drivers/scsi/aic7xxx/aic79xx_osm.c 			iounmap(ahd->bshs[0].maddr);
ahd              1362 drivers/scsi/aic7xxx/aic79xx_osm.c 			release_mem_region(ahd->platform_data->mem_busaddr,
ahd              1365 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->platform_data->host)
ahd              1366 drivers/scsi/aic7xxx/aic79xx_osm.c 			scsi_host_put(ahd->platform_data->host);
ahd              1368 drivers/scsi/aic7xxx/aic79xx_osm.c 		kfree(ahd->platform_data);
ahd              1373 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_init(struct ahd_softc *ahd)
ahd              1378 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
ahd              1381 drivers/scsi/aic7xxx/aic79xx_osm.c 		iocell_opts = &aic79xx_iocell_info[ahd->unit];
ahd              1383 drivers/scsi/aic7xxx/aic79xx_osm.c 			AHD_SET_PRECOMP(ahd, iocell_opts->precomp);
ahd              1385 drivers/scsi/aic7xxx/aic79xx_osm.c 			AHD_SET_SLEWRATE(ahd, iocell_opts->slewrate);
ahd              1387 drivers/scsi/aic7xxx/aic79xx_osm.c 			AHD_SET_AMPLITUDE(ahd, iocell_opts->amplitude);
ahd              1393 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
ahd              1395 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_platform_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
ahd              1396 drivers/scsi/aic7xxx/aic79xx_osm.c 				SCB_GET_CHANNEL(ahd, scb),
ahd              1402 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
ahd              1440 drivers/scsi/aic7xxx/aic79xx_osm.c 		usertags = ahd_linux_user_tagdepth(ahd, devinfo);
ahd              1486 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_platform_abort_scbs(struct ahd_softc *ahd, int target, char channel,
ahd              1493 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_user_tagdepth(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
ahd              1499 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((ahd->user_discenable & devinfo->target_mask) != 0) {
ahd              1500 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->unit >= ARRAY_SIZE(aic79xx_tag_info)) {
ahd              1514 drivers/scsi/aic7xxx/aic79xx_osm.c 			tag_info = &aic79xx_tag_info[ahd->unit];
ahd              1531 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)sdev->host->hostdata);
ahd              1534 drivers/scsi/aic7xxx/aic79xx_osm.c 			    ahd->our_id,
ahd              1538 drivers/scsi/aic7xxx/aic79xx_osm.c 	tags = ahd_linux_user_tagdepth(ahd, &devinfo);
ahd              1541 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_TAGGED);
ahd              1542 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_send_async(ahd, devinfo.channel, devinfo.target,
ahd              1544 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_print_devinfo(ahd, &devinfo);
ahd              1547 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_NONE);
ahd              1548 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_send_async(ahd, devinfo.channel, devinfo.target,
ahd              1554 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev,
ahd              1570 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              1575 drivers/scsi/aic7xxx/aic79xx_osm.c 	tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
ahd              1584 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
ahd              1585 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd->flags |= AHD_RESOURCE_SHORTAGE;
ahd              1586 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_unlock(ahd, &flags);
ahd              1600 drivers/scsi/aic7xxx/aic79xx_osm.c 	hscb->scsiid = BUILD_SCSIID(ahd, cmd);
ahd              1603 drivers/scsi/aic7xxx/aic79xx_osm.c 	mask = SCB_GET_TARGET_MASK(ahd, scb);
ahd              1605 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((ahd->user_discenable & mask) != 0)
ahd              1648 drivers/scsi/aic7xxx/aic79xx_osm.c 			sg = ahd_sg_setup(ahd, scb, sg, addr, len,
ahd              1653 drivers/scsi/aic7xxx/aic79xx_osm.c 	LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links);
ahd              1661 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_queue_scb(ahd, scb);
ahd              1663 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              1674 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct	ahd_softc *ahd;
ahd              1678 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = (struct ahd_softc *) dev_id;
ahd              1679 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags); 
ahd              1680 drivers/scsi/aic7xxx/aic79xx_osm.c 	ours = ahd_intr(ahd);
ahd              1681 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              1686 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_send_async(struct ahd_softc *ahd, char channel,
ahd              1699 drivers/scsi/aic7xxx/aic79xx_osm.c 		tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id,
ahd              1717 drivers/scsi/aic7xxx/aic79xx_osm.c 		starget = ahd->platform_data->starget[target];
ahd              1755 drivers/scsi/aic7xxx/aic79xx_osm.c 		scsi_report_device_reset(ahd->platform_data->host,
ahd              1760 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->platform_data->host != NULL) {
ahd              1761 drivers/scsi/aic7xxx/aic79xx_osm.c 			scsi_report_bus_reset(ahd->platform_data->host,
ahd              1774 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_done(struct ahd_softc *ahd, struct scb *scb)
ahd              1781 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_dump_card_state(ahd);
ahd              1793 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_linux_unmap_scb(ahd, scb);
ahd              1810 drivers/scsi/aic7xxx/aic79xx_osm.c 				ahd_print_path(ahd, scb);
ahd              1828 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_print_path(ahd, scb);
ahd              1833 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_print_path(ahd, scb);
ahd              1844 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_linux_handle_scsi_status(ahd, cmd->device, scb);
ahd              1872 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->platform_data->eh_done)
ahd              1873 drivers/scsi/aic7xxx/aic79xx_osm.c 			complete(ahd->platform_data->eh_done);
ahd              1876 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_free_scb(ahd, scb);
ahd              1877 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_linux_queue_cmd_complete(ahd, cmd);
ahd              1881 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
ahd              1888 drivers/scsi/aic7xxx/aic79xx_osm.c 			    ahd->our_id,
ahd              1941 drivers/scsi/aic7xxx/aic79xx_osm.c 			       ahd_get_sense_buf(ahd, scb)
ahd              1980 drivers/scsi/aic7xxx/aic79xx_osm.c 				ahd_print_path(ahd, scb);
ahd              1999 drivers/scsi/aic7xxx/aic79xx_osm.c 					ahd_print_path(ahd, scb);
ahd              2009 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_platform_set_tags(ahd, sdev, &devinfo,
ahd              2019 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_platform_set_tags(ahd, sdev, &devinfo,
ahd              2027 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_linux_queue_cmd_complete(struct ahd_softc *ahd, struct scsi_cmnd *cmd)
ahd              2125 drivers/scsi/aic7xxx/aic79xx_osm.c 		       ahd_name(ahd), status, cmd->device->channel,
ahd              2135 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_freeze_simq(struct ahd_softc *ahd)
ahd              2137 drivers/scsi/aic7xxx/aic79xx_osm.c 	scsi_block_requests(ahd->platform_data->host);
ahd              2141 drivers/scsi/aic7xxx/aic79xx_osm.c ahd_release_simq(struct ahd_softc *ahd)
ahd              2143 drivers/scsi/aic7xxx/aic79xx_osm.c 	scsi_unblock_requests(ahd->platform_data->host);
ahd              2149 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd;
ahd              2168 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
ahd              2178 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2202 drivers/scsi/aic7xxx/aic79xx_osm.c 	LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) {
ahd              2226 drivers/scsi/aic7xxx/aic79xx_osm.c 	was_paused = ahd_is_paused(ahd);
ahd              2227 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_pause_and_flushwork(ahd);
ahd              2236 drivers/scsi/aic7xxx/aic79xx_osm.c 	       ahd_name(ahd), was_paused ? "" : "not ");
ahd              2237 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_dump_card_state(ahd);
ahd              2240 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (ahd_search_qinfifo(ahd, cmd->device->id, 
ahd              2247 drivers/scsi/aic7xxx/aic79xx_osm.c 		       ahd_name(ahd), cmd->device->channel, 
ahd              2253 drivers/scsi/aic7xxx/aic79xx_osm.c 	saved_modes = ahd_save_modes(ahd);
ahd              2254 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd              2255 drivers/scsi/aic7xxx/aic79xx_osm.c 	last_phase = ahd_inb(ahd, LASTPHASE);
ahd              2256 drivers/scsi/aic7xxx/aic79xx_osm.c 	saved_scbptr = ahd_get_scbptr(ahd);
ahd              2258 drivers/scsi/aic7xxx/aic79xx_osm.c 	if (disconnected && (ahd_inb(ahd, SEQ_FLAGS) & NOT_IDENTIFIED) == 0) {
ahd              2261 drivers/scsi/aic7xxx/aic79xx_osm.c 		bus_scb = ahd_lookup_scb(ahd, active_scbptr);
ahd              2271 drivers/scsi/aic7xxx/aic79xx_osm.c 	saved_scsiid = ahd_inb(ahd, SAVED_SCSIID);
ahd              2279 drivers/scsi/aic7xxx/aic79xx_osm.c 		pending_scb = ahd_lookup_scb(ahd, active_scbptr);
ahd              2281 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_outb(ahd, MSG_OUT, HOST_MSG);
ahd              2282 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_outb(ahd, SCSISIGO, last_phase|ATNO);
ahd              2292 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_set_scbptr(ahd, SCB_GET_TAG(pending_scb));
ahd              2305 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_outb(ahd, SCB_TASK_MANAGEMENT,
ahd              2325 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_outb(ahd, SCB_CONTROL,
ahd              2326 drivers/scsi/aic7xxx/aic79xx_osm.c 				 ahd_inb(ahd, SCB_CONTROL)|MK_MESSAGE);
ahd              2334 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_search_qinfifo(ahd, cmd->device->id,
ahd              2338 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_qinfifo_requeue_tail(ahd, pending_scb);
ahd              2339 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_set_scbptr(ahd, saved_scbptr);
ahd              2340 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_print_path(ahd, pending_scb);
ahd              2359 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_unpause(ahd);
ahd              2363 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd->platform_data->eh_done = &done;
ahd              2364 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_unlock(ahd, &flags);
ahd              2366 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: Recovery code sleeping\n", ahd_name(ahd));
ahd              2368 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_lock(ahd, &flags);
ahd              2369 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd->platform_data->eh_done = NULL;
ahd              2370 drivers/scsi/aic7xxx/aic79xx_osm.c 			ahd_unlock(ahd, &flags);
ahd              2372 drivers/scsi/aic7xxx/aic79xx_osm.c 			       ahd_name(ahd), dev->active);
ahd              2377 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_unlock(ahd, &flags);
ahd              2381 drivers/scsi/aic7xxx/aic79xx_osm.c 		       ahd_name(ahd), retval);
ahd              2389 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2395 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2396 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_width(ahd, &devinfo, width, AHD_TRANS_GOAL, FALSE);
ahd              2397 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2403 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2406 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2417 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: set period to %d\n", ahd_name(ahd), period);
ahd              2444 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2447 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2448 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, offset,
ahd              2450 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2456 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2459 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2470 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: set offset to %d\n", ahd_name(ahd), offset);
ahd              2478 drivers/scsi/aic7xxx/aic79xx_osm.c 		ahd_find_syncrate(ahd, &period, &ppr_options, 
ahd              2482 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2483 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, offset, ppr_options,
ahd              2485 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2491 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2494 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2506 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s DT\n", ahd_name(ahd),
ahd              2521 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2524 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2525 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2527 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2533 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2536 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2548 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s QAS\n", ahd_name(ahd),
ahd              2560 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2563 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2564 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2566 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2572 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2575 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2587 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s IU\n", ahd_name(ahd),
ahd              2600 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2603 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2604 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2606 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2612 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2615 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2627 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s Read Streaming\n", ahd_name(ahd),
ahd              2636 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2639 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2640 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2642 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2648 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2651 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2663 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s Write Flow Control\n", ahd_name(ahd),
ahd              2672 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2675 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2676 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2678 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2684 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2687 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2697 drivers/scsi/aic7xxx/aic79xx_osm.c 	if ((ahd->features & AHD_RTI) == 0) {
ahd              2700 drivers/scsi/aic7xxx/aic79xx_osm.c 			printk("%s: RTI not available\n", ahd_name(ahd));
ahd              2707 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s RTI\n", ahd_name(ahd),
ahd              2716 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2719 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2720 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2722 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2728 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2731 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2743 drivers/scsi/aic7xxx/aic79xx_osm.c 		printk("%s: %s Precompensation\n", ahd_name(ahd),
ahd              2750 drivers/scsi/aic7xxx/aic79xx_osm.c 		if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
ahd              2753 drivers/scsi/aic7xxx/aic79xx_osm.c 			iocell_opts = &aic79xx_iocell_info[ahd->unit];
ahd              2759 drivers/scsi/aic7xxx/aic79xx_osm.c 		AHD_SET_PRECOMP(ahd, precomp);
ahd              2761 drivers/scsi/aic7xxx/aic79xx_osm.c 		AHD_SET_PRECOMP(ahd, 0);
ahd              2766 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2769 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2770 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2772 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2778 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata);
ahd              2781 drivers/scsi/aic7xxx/aic79xx_osm.c 		= ahd_fetch_transinfo(ahd,
ahd              2796 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_find_syncrate(ahd, &period, &ppr_options,
ahd              2799 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2800 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset,
ahd              2802 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd              2807 drivers/scsi/aic7xxx/aic79xx_osm.c 	struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
ahd              2811 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_lock(ahd, &flags);
ahd              2812 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_pause(ahd);
ahd              2813 drivers/scsi/aic7xxx/aic79xx_osm.c 	mode = ahd_inb(ahd, SBLKCTL);
ahd              2814 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unpause(ahd);
ahd              2815 drivers/scsi/aic7xxx/aic79xx_osm.c 	ahd_unlock(ahd, &flags);
ahd                66 drivers/scsi/aic7xxx/aic79xx_osm.h #define AIC_LIB_PREFIX ahd
ahd               181 drivers/scsi/aic7xxx/aic79xx_osm.h int	ahd_dmamap_load(struct ahd_softc *ahd, bus_dma_tag_t /*dmat*/,
ahd               204 drivers/scsi/aic7xxx/aic79xx_osm.h #define ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op)
ahd               357 drivers/scsi/aic7xxx/aic79xx_osm.h uint8_t ahd_inb(struct ahd_softc * ahd, long port);
ahd               358 drivers/scsi/aic7xxx/aic79xx_osm.h void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val);
ahd               359 drivers/scsi/aic7xxx/aic79xx_osm.h void ahd_outw_atomic(struct ahd_softc * ahd,
ahd               361 drivers/scsi/aic7xxx/aic79xx_osm.h void ahd_outsb(struct ahd_softc * ahd, long port,
ahd               363 drivers/scsi/aic7xxx/aic79xx_osm.h void ahd_insb(struct ahd_softc * ahd, long port,
ahd               372 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_lockinit(struct ahd_softc *ahd)
ahd               374 drivers/scsi/aic7xxx/aic79xx_osm.h 	spin_lock_init(&ahd->platform_data->spin_lock);
ahd               378 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_lock(struct ahd_softc *ahd, unsigned long *flags)
ahd               380 drivers/scsi/aic7xxx/aic79xx_osm.h 	spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags);
ahd               384 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
ahd               386 drivers/scsi/aic7xxx/aic79xx_osm.h 	spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags);
ahd               451 drivers/scsi/aic7xxx/aic79xx_osm.h void ahd_power_state_change(struct ahd_softc *ahd,
ahd               457 drivers/scsi/aic7xxx/aic79xx_osm.h int			 ahd_pci_map_registers(struct ahd_softc *ahd);
ahd               458 drivers/scsi/aic7xxx/aic79xx_osm.h int			 ahd_pci_map_int(struct ahd_softc *ahd);
ahd               489 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_flush_device_writes(struct ahd_softc *ahd)
ahd               492 drivers/scsi/aic7xxx/aic79xx_osm.h 	ahd_inb(ahd, INTSTAT);
ahd               520 drivers/scsi/aic7xxx/aic79xx_osm.h static inline void ahd_platform_scb_free(struct ahd_softc *ahd,
ahd               631 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
ahd               637 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_notify_xfer_settings_change(struct ahd_softc *ahd,
ahd               644 drivers/scsi/aic7xxx/aic79xx_osm.h ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
ahd               646 drivers/scsi/aic7xxx/aic79xx_osm.h 	ahd->flags &= ~AHD_RESOURCE_SHORTAGE;
ahd               649 drivers/scsi/aic7xxx/aic79xx_osm.h int	ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg);
ahd               650 drivers/scsi/aic7xxx/aic79xx_osm.h void	ahd_platform_free(struct ahd_softc *ahd);
ahd               651 drivers/scsi/aic7xxx/aic79xx_osm.h void	ahd_platform_init(struct ahd_softc *ahd);
ahd               652 drivers/scsi/aic7xxx/aic79xx_osm.h void	ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
ahd               663 drivers/scsi/aic7xxx/aic79xx_osm.h void	ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
ahd               665 drivers/scsi/aic7xxx/aic79xx_osm.h int	ahd_platform_abort_scbs(struct ahd_softc *ahd, int target,
ahd                81 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	struct ahd_softc *ahd = pci_get_drvdata(pdev);
ahd                84 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	if ((rc = ahd_suspend(ahd)))
ahd                87 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_pci_suspend(ahd);
ahd               101 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	struct ahd_softc *ahd = pci_get_drvdata(pdev);
ahd               115 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_pci_resume(ahd);
ahd               117 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_resume(ahd);
ahd               126 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	struct ahd_softc *ahd = pci_get_drvdata(pdev);
ahd               129 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	if (ahd->platform_data && ahd->platform_data->host)
ahd               130 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			scsi_remove_host(ahd->platform_data->host);
ahd               132 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_lock(ahd, &s);
ahd               133 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_intr_enable(ahd, FALSE);
ahd               134 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_unlock(ahd, &s);
ahd               135 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_free(ahd);
ahd               139 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_linux_pci_inherit_flags(struct ahd_softc *ahd)
ahd               141 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	struct pci_dev *pdev = ahd->dev_softc, *master_pdev;
ahd               148 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->flags &= ~AHD_BIOS_ENABLED;
ahd               149 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->flags |= master->flags & AHD_BIOS_ENABLED;
ahd               160 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	struct		 ahd_softc *ahd;
ahd               184 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd = ahd_alloc(NULL, name);
ahd               185 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	if (ahd == NULL)
ahd               188 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd_free(ahd);
ahd               198 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->flags |= AHD_64BIT_ADDRESSING;
ahd               201 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->flags |= AHD_39BIT_ADDRESSING;
ahd               207 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd->dev_softc = pci;
ahd               208 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	error = ahd_pci_config(ahd, entry);
ahd               210 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd_free(ahd);
ahd               218 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	if ((ahd->features & AHD_MULTI_FUNC) && PCI_FUNC(pdev->devfn) != 0)
ahd               219 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd_linux_pci_inherit_flags(ahd);
ahd               221 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	pci_set_drvdata(pdev, ahd);
ahd               223 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_linux_register_host(ahd, &aic79xx_driver_template);
ahd               251 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, resource_size_t *base,
ahd               254 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	*base = pci_resource_start(ahd->dev_softc, 0);
ahd               260 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	*base2 = pci_resource_start(ahd->dev_softc, 3);
ahd               273 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
ahd               285 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) != 0)
ahd               288 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	start = pci_resource_start(ahd->dev_softc, 1);
ahd               309 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_pci_map_registers(struct ahd_softc *ahd)
ahd               319 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	command = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, 4);
ahd               323 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	error = ahd_linux_pci_reserve_mem_region(ahd, &base, &maddr);
ahd               325 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->platform_data->mem_busaddr = base;
ahd               326 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->tags[0] = BUS_SPACE_MEMIO;
ahd               327 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->bshs[0].maddr = maddr;
ahd               328 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->tags[1] = BUS_SPACE_MEMIO;
ahd               329 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->bshs[1].maddr = maddr + 0x100;
ahd               330 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
ahd               333 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		if (ahd_pci_test_register_access(ahd) != 0) {
ahd               337 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_bus(ahd->dev_softc),
ahd               338 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_slot(ahd->dev_softc),
ahd               339 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_function(ahd->dev_softc));
ahd               341 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			release_mem_region(ahd->platform_data->mem_busaddr,
ahd               343 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->bshs[0].maddr = NULL;
ahd               350 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		       ahd_get_pci_bus(ahd->dev_softc),
ahd               351 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		       ahd_get_pci_slot(ahd->dev_softc),
ahd               352 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		       ahd_get_pci_function(ahd->dev_softc),
ahd               359 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		error = ahd_linux_pci_reserve_io_regions(ahd, &base, &base2);
ahd               361 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->tags[0] = BUS_SPACE_PIO;
ahd               362 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->tags[1] = BUS_SPACE_PIO;
ahd               363 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->bshs[0].ioport = (u_long)base;
ahd               364 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			ahd->bshs[1].ioport = (u_long)base2;
ahd               369 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_bus(ahd->dev_softc),
ahd               370 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_slot(ahd->dev_softc),
ahd               371 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			       ahd_get_pci_function(ahd->dev_softc),
ahd               376 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, command, 4);
ahd               381 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_pci_map_int(struct ahd_softc *ahd)
ahd               385 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	error = request_irq(ahd->dev_softc->irq, ahd_linux_isr,
ahd               386 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 			    IRQF_SHARED, "aic79xx", ahd);
ahd               388 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 		ahd->platform_data->irq = ahd->dev_softc->irq;
ahd               394 drivers/scsi/aic7xxx/aic79xx_osm_pci.c ahd_power_state_change(struct ahd_softc *ahd, ahd_power_state new_state)
ahd               396 drivers/scsi/aic7xxx/aic79xx_osm_pci.c 	pci_set_power_state(ahd->dev_softc, new_state);
ahd               244 drivers/scsi/aic7xxx/aic79xx_pci.c static int	ahd_check_extport(struct ahd_softc *ahd);
ahd               245 drivers/scsi/aic7xxx/aic79xx_pci.c static void	ahd_configure_termination(struct ahd_softc *ahd,
ahd               247 drivers/scsi/aic7xxx/aic79xx_pci.c static void	ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat);
ahd               248 drivers/scsi/aic7xxx/aic79xx_pci.c static void	ahd_pci_intr(struct ahd_softc *ahd);
ahd               289 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry)
ahd               296 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->description = entry->name;
ahd               300 drivers/scsi/aic7xxx/aic79xx_pci.c 	subvendor = ahd_pci_read_config(ahd->dev_softc,
ahd               303 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->flags |= AHD_HP_BOARD;
ahd               305 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = entry->setup(ahd);
ahd               309 drivers/scsi/aic7xxx/aic79xx_pci.c 	devconfig = ahd_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4);
ahd               311 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->chip |= AHD_PCI;
ahd               313 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->bugs &= ~AHD_PCIX_BUG_MASK;
ahd               315 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->chip |= AHD_PCIX;
ahd               317 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->bus_description = pci_bus_modes[PCI_BUS_MODES_INDEX(devconfig)];
ahd               319 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_power_state_change(ahd, AHD_POWER_STATE_D0);
ahd               321 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_pci_map_registers(ahd);
ahd               331 drivers/scsi/aic7xxx/aic79xx_pci.c 	if ((ahd->flags & (AHD_39BIT_ADDRESSING|AHD_64BIT_ADDRESSING)) != 0) {
ahd               334 drivers/scsi/aic7xxx/aic79xx_pci.c 			       ahd_name(ahd));
ahd               335 drivers/scsi/aic7xxx/aic79xx_pci.c 		devconfig = ahd_pci_read_config(ahd->dev_softc,
ahd               338 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_pci_write_config(ahd->dev_softc, DEVCONFIG,
ahd               343 drivers/scsi/aic7xxx/aic79xx_pci.c 	command = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahd               345 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, command, /*bytes*/2);
ahd               347 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_softc_init(ahd);
ahd               351 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->bus_intr = ahd_pci_intr;
ahd               353 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_reset(ahd, /*reinit*/FALSE);
ahd               357 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->pci_cachesize =
ahd               358 drivers/scsi/aic7xxx/aic79xx_pci.c 	    ahd_pci_read_config(ahd->dev_softc, CSIZE_LATTIME,
ahd               360 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->pci_cachesize *= 4;
ahd               362 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd               364 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_check_extport(ahd);
ahd               369 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_init(ahd);
ahd               372 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->init_level++;
ahd               377 drivers/scsi/aic7xxx/aic79xx_pci.c 	return ahd_pci_map_int(ahd);
ahd               382 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_suspend(struct ahd_softc *ahd)
ahd               388 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->suspend_state.pci_state.devconfig =
ahd               389 drivers/scsi/aic7xxx/aic79xx_pci.c 	    ahd_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4);
ahd               390 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->suspend_state.pci_state.command =
ahd               391 drivers/scsi/aic7xxx/aic79xx_pci.c 	    ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/1);
ahd               392 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->suspend_state.pci_state.csize_lattime =
ahd               393 drivers/scsi/aic7xxx/aic79xx_pci.c 	    ahd_pci_read_config(ahd->dev_softc, CSIZE_LATTIME, /*bytes*/1);
ahd               398 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_resume(struct ahd_softc *ahd)
ahd               400 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, DEVCONFIG,
ahd               401 drivers/scsi/aic7xxx/aic79xx_pci.c 			     ahd->suspend_state.pci_state.devconfig, /*bytes*/4);
ahd               402 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
ahd               403 drivers/scsi/aic7xxx/aic79xx_pci.c 			     ahd->suspend_state.pci_state.command, /*bytes*/1);
ahd               404 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, CSIZE_LATTIME,
ahd               405 drivers/scsi/aic7xxx/aic79xx_pci.c 			     ahd->suspend_state.pci_state.csize_lattime, /*bytes*/1);
ahd               414 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_test_register_access(struct ahd_softc *ahd)
ahd               428 drivers/scsi/aic7xxx/aic79xx_pci.c 	cmd = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahd               429 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
ahd               440 drivers/scsi/aic7xxx/aic79xx_pci.c 	hcntrl = ahd_inb(ahd, HCNTRL);
ahd               453 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
ahd               454 drivers/scsi/aic7xxx/aic79xx_pci.c 	while (ahd_is_paused(ahd) == 0)
ahd               458 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd               459 drivers/scsi/aic7xxx/aic79xx_pci.c 	targpcistat = ahd_inb(ahd, TARGPCISTAT);
ahd               460 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, TARGPCISTAT, targpcistat);
ahd               461 drivers/scsi/aic7xxx/aic79xx_pci.c 	pci_status1 = ahd_pci_read_config(ahd->dev_softc,
ahd               463 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
ahd               465 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd               466 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, CLRINT, CLRPCIINT);
ahd               468 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, SEQCTL0, PERRORDIS);
ahd               469 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outl(ahd, SRAM_BASE, 0x5aa555aa);
ahd               470 drivers/scsi/aic7xxx/aic79xx_pci.c 	if (ahd_inl(ahd, SRAM_BASE) != 0x5aa555aa)
ahd               473 drivers/scsi/aic7xxx/aic79xx_pci.c 	if ((ahd_inb(ahd, INTSTAT) & PCIINT) != 0) {
ahd               474 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd               475 drivers/scsi/aic7xxx/aic79xx_pci.c 		targpcistat = ahd_inb(ahd, TARGPCISTAT);
ahd               483 drivers/scsi/aic7xxx/aic79xx_pci.c 	if ((ahd_inb(ahd, INTSTAT) & PCIINT) != 0) {
ahd               485 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd               486 drivers/scsi/aic7xxx/aic79xx_pci.c 		targpcistat = ahd_inb(ahd, TARGPCISTAT);
ahd               489 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, TARGPCISTAT, targpcistat);
ahd               490 drivers/scsi/aic7xxx/aic79xx_pci.c 		pci_status1 = ahd_pci_read_config(ahd->dev_softc,
ahd               492 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
ahd               494 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, CLRINT, CLRPCIINT);
ahd               496 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS);
ahd               497 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
ahd               506 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_check_extport(struct ahd_softc *ahd)
ahd               514 drivers/scsi/aic7xxx/aic79xx_pci.c 	sc = ahd->seep_config;
ahd               515 drivers/scsi/aic7xxx/aic79xx_pci.c 	have_seeprom = ahd_acquire_seeprom(ahd);
ahd               524 drivers/scsi/aic7xxx/aic79xx_pci.c 			       ahd_name(ahd));
ahd               528 drivers/scsi/aic7xxx/aic79xx_pci.c 			    + (sizeof(vpd) * (ahd->channel - 'A'))) / 2;
ahd               530 drivers/scsi/aic7xxx/aic79xx_pci.c 		error = ahd_read_seeprom(ahd, (uint16_t *)&vpd,
ahd               534 drivers/scsi/aic7xxx/aic79xx_pci.c 			error = ahd_parse_vpddata(ahd, &vpd);
ahd               537 drivers/scsi/aic7xxx/aic79xx_pci.c 			       ahd_name(ahd),
ahd               541 drivers/scsi/aic7xxx/aic79xx_pci.c 			printk("%s: Reading SEEPROM...", ahd_name(ahd));
ahd               544 drivers/scsi/aic7xxx/aic79xx_pci.c 		start_addr = (sizeof(*sc) / 2) * (ahd->channel - 'A');
ahd               546 drivers/scsi/aic7xxx/aic79xx_pci.c 		error = ahd_read_seeprom(ahd, (uint16_t *)sc,
ahd               563 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_release_seeprom(ahd);
ahd               576 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_set_scbptr(ahd, 0xFF);
ahd               577 drivers/scsi/aic7xxx/aic79xx_pci.c 		nvram_scb = ahd_inb_scbram(ahd, SCB_BASE + NVRAM_SCB_OFFSET);
ahd               579 drivers/scsi/aic7xxx/aic79xx_pci.c 		 && ((ahd_inb_scbram(ahd, SCB_BASE + 0) == 'A'
ahd               580 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 1) == 'D'
ahd               581 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 2) == 'P'
ahd               582 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 3) == 'T')
ahd               583 drivers/scsi/aic7xxx/aic79xx_pci.c 		  || (ahd_inb_scbram(ahd, SCB_BASE + 0) == 'B'
ahd               584 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 1) == 'I'
ahd               585 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 2) == 'O'
ahd               586 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 3) == 'S')
ahd               587 drivers/scsi/aic7xxx/aic79xx_pci.c 		  || (ahd_inb_scbram(ahd, SCB_BASE + 0) == 'A'
ahd               588 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 1) == 'S'
ahd               589 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 2) == 'P'
ahd               590 drivers/scsi/aic7xxx/aic79xx_pci.c 		   && ahd_inb_scbram(ahd, SCB_BASE + 3) == 'I'))) {
ahd               594 drivers/scsi/aic7xxx/aic79xx_pci.c 			ahd_set_scbptr(ahd, nvram_scb);
ahd               597 drivers/scsi/aic7xxx/aic79xx_pci.c 				*sc_data++ = ahd_inw_scbram(ahd, SCB_BASE+i);
ahd               600 drivers/scsi/aic7xxx/aic79xx_pci.c 				ahd->flags |= AHD_SCB_CONFIG_USED;
ahd               610 drivers/scsi/aic7xxx/aic79xx_pci.c 		printk("%s: Seeprom Contents:", ahd_name(ahd));
ahd               620 drivers/scsi/aic7xxx/aic79xx_pci.c 			printk("%s: No SEEPROM available.\n", ahd_name(ahd));
ahd               621 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->flags |= AHD_USEDEFAULTS;
ahd               622 drivers/scsi/aic7xxx/aic79xx_pci.c 		error = ahd_default_config(ahd);
ahd               624 drivers/scsi/aic7xxx/aic79xx_pci.c 		kfree(ahd->seep_config);
ahd               625 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->seep_config = NULL;
ahd               627 drivers/scsi/aic7xxx/aic79xx_pci.c 		error = ahd_parse_cfgdata(ahd, sc);
ahd               633 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_configure_termination(ahd, adapter_control);
ahd               639 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control)
ahd               646 drivers/scsi/aic7xxx/aic79xx_pci.c 	devconfig = ahd_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4);
ahd               648 drivers/scsi/aic7xxx/aic79xx_pci.c 	if ((ahd->flags & AHD_STPWLEVEL_A) != 0)
ahd               652 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd), (devconfig & STPWLEVEL) ? "on" : "off");
ahd               653 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
ahd               656 drivers/scsi/aic7xxx/aic79xx_pci.c 	if ((ahd->flags & AHD_CURRENT_SENSING) != 0) {
ahd               657 drivers/scsi/aic7xxx/aic79xx_pci.c 		(void)ahd_write_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, 0);
ahd               663 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_read_flexport(ahd, FLXADDR_TERMCTL, &termctl);
ahd               667 drivers/scsi/aic7xxx/aic79xx_pci.c 			       ahd_name(ahd));
ahd               675 drivers/scsi/aic7xxx/aic79xx_pci.c 		       "Using Defaults.\n", ahd_name(ahd));
ahd               682 drivers/scsi/aic7xxx/aic79xx_pci.c 			       ahd_name(ahd));
ahd               690 drivers/scsi/aic7xxx/aic79xx_pci.c 		       "Using Defaults.\n", ahd_name(ahd));
ahd               697 drivers/scsi/aic7xxx/aic79xx_pci.c 	sxfrctl1 = ahd_inb(ahd, SXFRCTL1) & ~STPWEN;
ahd               698 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->flags &= ~AHD_TERM_ENB_A;
ahd               700 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->flags |= AHD_TERM_ENB_A;
ahd               704 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, SXFRCTL1, sxfrctl1|STPWEN);
ahd               705 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, SXFRCTL1, sxfrctl1);
ahd               707 drivers/scsi/aic7xxx/aic79xx_pci.c 	error = ahd_write_flexport(ahd, FLXADDR_TERMCTL, termctl);
ahd               710 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd));
ahd               713 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd),
ahd               717 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd),
ahd               721 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd),
ahd               725 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd),
ahd               783 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_intr(struct ahd_softc *ahd)
ahd               792 drivers/scsi/aic7xxx/aic79xx_pci.c 	intstat = ahd_inb(ahd, INTSTAT);
ahd               795 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_pci_split_intr(ahd, intstat);
ahd               800 drivers/scsi/aic7xxx/aic79xx_pci.c 	printk("%s: PCI error Interrupt\n", ahd_name(ahd));
ahd               801 drivers/scsi/aic7xxx/aic79xx_pci.c 	saved_modes = ahd_save_modes(ahd);
ahd               802 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_dump_card_state(ahd);
ahd               803 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
ahd               808 drivers/scsi/aic7xxx/aic79xx_pci.c 		pci_status[i] = ahd_inb(ahd, reg);
ahd               810 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, reg, pci_status[i]);
ahd               827 drivers/scsi/aic7xxx/aic79xx_pci.c 				printk(s, ahd_name(ahd), pci_status_source[i]);
ahd               831 drivers/scsi/aic7xxx/aic79xx_pci.c 	pci_status1 = ahd_pci_read_config(ahd->dev_softc,
ahd               833 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
ahd               835 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_restore_modes(ahd, saved_modes);
ahd               836 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, CLRINT, CLRPCIINT);
ahd               837 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_unpause(ahd);
ahd               841 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
ahd               855 drivers/scsi/aic7xxx/aic79xx_pci.c 	pcix_status = ahd_pci_read_config(ahd->dev_softc, PCIXR_STATUS,
ahd               858 drivers/scsi/aic7xxx/aic79xx_pci.c 	       ahd_name(ahd), pcix_status);
ahd               859 drivers/scsi/aic7xxx/aic79xx_pci.c 	saved_modes = ahd_save_modes(ahd);
ahd               861 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_set_modes(ahd, i, i);
ahd               863 drivers/scsi/aic7xxx/aic79xx_pci.c 		split_status[i] = ahd_inb(ahd, DCHSPLTSTAT0);
ahd               864 drivers/scsi/aic7xxx/aic79xx_pci.c 		split_status1[i] = ahd_inb(ahd, DCHSPLTSTAT1);
ahd               866 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, DCHSPLTSTAT0, split_status[i]);
ahd               867 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, DCHSPLTSTAT1, split_status1[i]);
ahd               870 drivers/scsi/aic7xxx/aic79xx_pci.c 		sg_split_status[i] = ahd_inb(ahd, SGSPLTSTAT0);
ahd               871 drivers/scsi/aic7xxx/aic79xx_pci.c 		sg_split_status1[i] = ahd_inb(ahd, SGSPLTSTAT1);
ahd               873 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, SGSPLTSTAT0, sg_split_status[i]);
ahd               874 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd_outb(ahd, SGSPLTSTAT1, sg_split_status1[i]);
ahd               883 drivers/scsi/aic7xxx/aic79xx_pci.c 				printk(split_status_strings[bit], ahd_name(ahd),
ahd               890 drivers/scsi/aic7xxx/aic79xx_pci.c 				printk(split_status_strings[bit], ahd_name(ahd), "SG");
ahd               896 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_pci_write_config(ahd->dev_softc, PCIXR_STATUS,
ahd               898 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_outb(ahd, CLRINT, CLRSPLTINT);
ahd               899 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd_restore_modes(ahd, saved_modes);
ahd               903 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_aic7901_setup(struct ahd_softc *ahd)
ahd               906 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->chip = AHD_AIC7901;
ahd               907 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->features = AHD_AIC7901_FE;
ahd               908 drivers/scsi/aic7xxx/aic79xx_pci.c 	return (ahd_aic790X_setup(ahd));
ahd               912 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_aic7901A_setup(struct ahd_softc *ahd)
ahd               915 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->chip = AHD_AIC7901A;
ahd               916 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->features = AHD_AIC7901A_FE;
ahd               917 drivers/scsi/aic7xxx/aic79xx_pci.c 	return (ahd_aic790X_setup(ahd));
ahd               921 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_aic7902_setup(struct ahd_softc *ahd)
ahd               923 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->chip = AHD_AIC7902;
ahd               924 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->features = AHD_AIC7902_FE;
ahd               925 drivers/scsi/aic7xxx/aic79xx_pci.c 	return (ahd_aic790X_setup(ahd));
ahd               929 drivers/scsi/aic7xxx/aic79xx_pci.c ahd_aic790X_setup(struct ahd_softc *ahd)
ahd               934 drivers/scsi/aic7xxx/aic79xx_pci.c 	pci = ahd->dev_softc;
ahd               938 drivers/scsi/aic7xxx/aic79xx_pci.c 		       ahd_name(ahd), rev);
ahd               942 drivers/scsi/aic7xxx/aic79xx_pci.c 	ahd->channel = ahd_get_pci_function(pci) + 'A';
ahd               947 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->bugs |= AHD_SENT_SCB_UPDATE_BUG|AHD_ABORT_LQI_BUG
ahd               962 drivers/scsi/aic7xxx/aic79xx_pci.c 		AHD_SET_PRECOMP(ahd, AHD_PRECOMP_CUTBACK_29);
ahd               964 drivers/scsi/aic7xxx/aic79xx_pci.c 		if ((ahd->flags & AHD_HP_BOARD) == 0)
ahd               965 drivers/scsi/aic7xxx/aic79xx_pci.c 			AHD_SET_SLEWRATE(ahd, AHD_SLEWRATE_DEF_REVA);
ahd               971 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->features |= AHD_RTI|AHD_NEW_IOCELL_OPTS
ahd               974 drivers/scsi/aic7xxx/aic79xx_pci.c 		ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_EARLY_REQ_BUG;
ahd               978 drivers/scsi/aic7xxx/aic79xx_pci.c 			ahd->features |= AHD_AIC79XXB_SLOWCRC;
ahd               983 drivers/scsi/aic7xxx/aic79xx_pci.c 		if ((ahd->features & AHD_MULTI_FUNC) != 0)
ahd               984 drivers/scsi/aic7xxx/aic79xx_pci.c 			ahd->bugs |= AHD_INTCOLLISION_BUG|AHD_ABORT_LQI_BUG;
ahd               989 drivers/scsi/aic7xxx/aic79xx_pci.c 		AHD_SET_PRECOMP(ahd, AHD_PRECOMP_CUTBACK_29);
ahd               990 drivers/scsi/aic7xxx/aic79xx_pci.c 		AHD_SET_SLEWRATE(ahd, AHD_SLEWRATE_DEF_REVB);
ahd               991 drivers/scsi/aic7xxx/aic79xx_pci.c 		AHD_SET_AMPLITUDE(ahd, AHD_AMPLITUDE_DEF);
ahd                45 drivers/scsi/aic7xxx/aic79xx_proc.c static void	ahd_dump_target_state(struct ahd_softc *ahd,
ahd               157 drivers/scsi/aic7xxx/aic79xx_proc.c ahd_dump_target_state(struct ahd_softc *ahd, struct seq_file *m,
ahd               165 drivers/scsi/aic7xxx/aic79xx_proc.c 	tinfo = ahd_fetch_transinfo(ahd, channel, our_id,
ahd               170 drivers/scsi/aic7xxx/aic79xx_proc.c 	starget = ahd->platform_data->starget[target_id];
ahd               210 drivers/scsi/aic7xxx/aic79xx_proc.c 	struct	ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
ahd               219 drivers/scsi/aic7xxx/aic79xx_proc.c 	ahd_lock(ahd, &s);
ahd               220 drivers/scsi/aic7xxx/aic79xx_proc.c 	paused = ahd_is_paused(ahd);
ahd               222 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_pause(ahd);
ahd               224 drivers/scsi/aic7xxx/aic79xx_proc.c 	saved_modes = ahd_save_modes(ahd);
ahd               225 drivers/scsi/aic7xxx/aic79xx_proc.c 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd               237 drivers/scsi/aic7xxx/aic79xx_proc.c 	have_seeprom = ahd_acquire_seeprom(ahd);
ahd               244 drivers/scsi/aic7xxx/aic79xx_proc.c 		if (ahd->seep_config == NULL) {
ahd               245 drivers/scsi/aic7xxx/aic79xx_proc.c 			ahd->seep_config = kmalloc(sizeof(*ahd->seep_config), GFP_ATOMIC);
ahd               246 drivers/scsi/aic7xxx/aic79xx_proc.c 			if (ahd->seep_config == NULL) {
ahd               253 drivers/scsi/aic7xxx/aic79xx_proc.c 		start_addr = 32 * (ahd->channel - 'A');
ahd               254 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_write_seeprom(ahd, (u_int16_t *)buffer, start_addr,
ahd               256 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_read_seeprom(ahd, (uint16_t *)ahd->seep_config,
ahd               259 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_release_seeprom(ahd);
ahd               264 drivers/scsi/aic7xxx/aic79xx_proc.c 	ahd_restore_modes(ahd, saved_modes);
ahd               266 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_unpause(ahd);
ahd               267 drivers/scsi/aic7xxx/aic79xx_proc.c 	ahd_unlock(ahd, &s);
ahd               276 drivers/scsi/aic7xxx/aic79xx_proc.c 	struct	ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
ahd               283 drivers/scsi/aic7xxx/aic79xx_proc.c 	seq_printf(m, "%s\n", ahd->description);
ahd               284 drivers/scsi/aic7xxx/aic79xx_proc.c 	ahd_controller_info(ahd, ahd_info);
ahd               287 drivers/scsi/aic7xxx/aic79xx_proc.c 		  ahd->scb_data.numscbs, AHD_NSEG);
ahd               291 drivers/scsi/aic7xxx/aic79xx_proc.c 	if (ahd->seep_config == NULL)
ahd               295 drivers/scsi/aic7xxx/aic79xx_proc.c 		for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) {
ahd               300 drivers/scsi/aic7xxx/aic79xx_proc.c 				  ((uint16_t*)ahd->seep_config)[i]);
ahd               306 drivers/scsi/aic7xxx/aic79xx_proc.c 	if ((ahd->features & AHD_WIDE) == 0)
ahd               311 drivers/scsi/aic7xxx/aic79xx_proc.c 		ahd_dump_target_state(ahd, m, ahd->our_id, 'A',