ahc                56 drivers/scsi/aic7xxx/aic7770.c static int aic7770_chip_init(struct ahc_softc *ahc);
ahc                57 drivers/scsi/aic7xxx/aic7770.c static int aha2840_load_seeprom(struct ahc_softc *ahc);
ahc               119 drivers/scsi/aic7xxx/aic7770.c aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
ahc               127 drivers/scsi/aic7xxx/aic7770.c 	error = entry->setup(ahc);
ahc               132 drivers/scsi/aic7xxx/aic7770.c 	error = aic7770_map_registers(ahc, io);
ahc               142 drivers/scsi/aic7xxx/aic7770.c 	ahc_intr_enable(ahc, FALSE);
ahc               144 drivers/scsi/aic7xxx/aic7770.c 	ahc->description = entry->name;
ahc               145 drivers/scsi/aic7xxx/aic7770.c 	error = ahc_softc_init(ahc);
ahc               149 drivers/scsi/aic7xxx/aic7770.c 	ahc->bus_chip_init = aic7770_chip_init;
ahc               151 drivers/scsi/aic7xxx/aic7770.c 	error = ahc_reset(ahc, /*reinit*/FALSE);
ahc               156 drivers/scsi/aic7xxx/aic7770.c 	intdef = ahc_inb(ahc, INTDEF);
ahc               172 drivers/scsi/aic7xxx/aic7770.c 		ahc->flags |= AHC_EDGE_INTERRUPT;
ahc               174 drivers/scsi/aic7xxx/aic7770.c 	switch (ahc->chip & (AHC_EISA|AHC_VL)) {
ahc               181 drivers/scsi/aic7xxx/aic7770.c 		biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
ahc               182 drivers/scsi/aic7xxx/aic7770.c 		scsiconf = ahc_inb(ahc, SCSICONF);
ahc               183 drivers/scsi/aic7xxx/aic7770.c 		scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
ahc               187 drivers/scsi/aic7xxx/aic7770.c 			ahc->flags |= 1;
ahc               190 drivers/scsi/aic7xxx/aic7770.c 			ahc->flags |= AHC_USEDEFAULTS;
ahc               192 drivers/scsi/aic7xxx/aic7770.c 			if ((ahc->features & AHC_WIDE) != 0) {
ahc               193 drivers/scsi/aic7xxx/aic7770.c 				ahc->our_id = scsiconf1 & HWSCSIID;
ahc               195 drivers/scsi/aic7xxx/aic7770.c 					ahc->flags |= AHC_TERM_ENB_A;
ahc               197 drivers/scsi/aic7xxx/aic7770.c 				ahc->our_id = scsiconf & HSCSIID;
ahc               198 drivers/scsi/aic7xxx/aic7770.c 				ahc->our_id_b = scsiconf1 & HSCSIID;
ahc               200 drivers/scsi/aic7xxx/aic7770.c 					ahc->flags |= AHC_TERM_ENB_A;
ahc               202 drivers/scsi/aic7xxx/aic7770.c 					ahc->flags |= AHC_TERM_ENB_B;
ahc               205 drivers/scsi/aic7xxx/aic7770.c 		if ((ahc_inb(ahc, HA_274_BIOSGLOBAL) & HA_274_EXTENDED_TRANS))
ahc               206 drivers/scsi/aic7xxx/aic7770.c 			ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B;
ahc               211 drivers/scsi/aic7xxx/aic7770.c 		have_seeprom = aha2840_load_seeprom(ahc);
ahc               218 drivers/scsi/aic7xxx/aic7770.c 		kfree(ahc->seep_config);
ahc               219 drivers/scsi/aic7xxx/aic7770.c 		ahc->seep_config = NULL;
ahc               225 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
ahc               228 drivers/scsi/aic7xxx/aic7770.c 	hostconf = ahc_inb(ahc, HOSTCONF);
ahc               229 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BUSSPD, hostconf & DFTHRSH);
ahc               230 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BUSTIME, (hostconf << 2) & BOFF);
ahc               232 drivers/scsi/aic7xxx/aic7770.c 	ahc->bus_softc.aic7770_softc.busspd = hostconf & DFTHRSH;
ahc               233 drivers/scsi/aic7xxx/aic7770.c 	ahc->bus_softc.aic7770_softc.bustime = (hostconf << 2) & BOFF;
ahc               238 drivers/scsi/aic7xxx/aic7770.c 	error = ahc_init(ahc);
ahc               242 drivers/scsi/aic7xxx/aic7770.c 	error = aic7770_map_int(ahc, irq);
ahc               246 drivers/scsi/aic7xxx/aic7770.c 	ahc->init_level++;
ahc               251 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BCTL, ENABLE);
ahc               256 drivers/scsi/aic7xxx/aic7770.c aic7770_chip_init(struct ahc_softc *ahc)
ahc               258 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BUSSPD, ahc->bus_softc.aic7770_softc.busspd);
ahc               259 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BUSTIME, ahc->bus_softc.aic7770_softc.bustime);
ahc               260 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
ahc               261 drivers/scsi/aic7xxx/aic7770.c 	ahc_outb(ahc, BCTL, ENABLE);
ahc               262 drivers/scsi/aic7xxx/aic7770.c 	return (ahc_chip_init(ahc));
ahc               269 drivers/scsi/aic7xxx/aic7770.c aha2840_load_seeprom(struct ahc_softc *ahc)
ahc               276 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_ahc = ahc;
ahc               287 drivers/scsi/aic7xxx/aic7770.c 	sc = ahc->seep_config;
ahc               290 drivers/scsi/aic7xxx/aic7770.c 		printk("%s: Reading SEEPROM...", ahc_name(ahc));
ahc               307 drivers/scsi/aic7xxx/aic7770.c 			printk("%s: No SEEPROM available\n", ahc_name(ahc));
ahc               308 drivers/scsi/aic7xxx/aic7770.c 		ahc->flags |= AHC_USEDEFAULTS;
ahc               318 drivers/scsi/aic7xxx/aic7770.c 		max_targ = (ahc->features & AHC_WIDE) != 0 ? 16 : 8;
ahc               330 drivers/scsi/aic7xxx/aic7770.c 			ahc_outb(ahc, TARG_SCSIRATE + i, target_settings);
ahc               332 drivers/scsi/aic7xxx/aic7770.c 		ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff));
ahc               333 drivers/scsi/aic7xxx/aic7770.c 		ahc_outb(ahc, DISC_DSB + 1, ~((discenable >> 8) & 0xff));
ahc               335 drivers/scsi/aic7xxx/aic7770.c 		ahc->our_id = sc->brtime_id & CFSCSIID;
ahc               337 drivers/scsi/aic7xxx/aic7770.c 		scsi_conf = (ahc->our_id & 0x7);
ahc               344 drivers/scsi/aic7xxx/aic7770.c 			ahc->flags |= AHC_EXTENDED_TRANS_A;
ahc               346 drivers/scsi/aic7xxx/aic7770.c 		ahc_outb(ahc, SCSICONF, scsi_conf);
ahc               349 drivers/scsi/aic7xxx/aic7770.c 			ahc->flags |= AHC_TERM_ENB_A;
ahc               355 drivers/scsi/aic7xxx/aic7770.c ahc_aic7770_VL_setup(struct ahc_softc *ahc)
ahc               359 drivers/scsi/aic7xxx/aic7770.c 	error = ahc_aic7770_setup(ahc);
ahc               360 drivers/scsi/aic7xxx/aic7770.c 	ahc->chip |= AHC_VL;
ahc               365 drivers/scsi/aic7xxx/aic7770.c ahc_aic7770_EISA_setup(struct ahc_softc *ahc)
ahc               369 drivers/scsi/aic7xxx/aic7770.c 	error = ahc_aic7770_setup(ahc);
ahc               370 drivers/scsi/aic7xxx/aic7770.c 	ahc->chip |= AHC_EISA;
ahc               375 drivers/scsi/aic7xxx/aic7770.c ahc_aic7770_setup(struct ahc_softc *ahc)
ahc               377 drivers/scsi/aic7xxx/aic7770.c 	ahc->channel = 'A';
ahc               378 drivers/scsi/aic7xxx/aic7770.c 	ahc->channel_b = 'B';
ahc               379 drivers/scsi/aic7xxx/aic7770.c 	ahc->chip = AHC_AIC7770;
ahc               380 drivers/scsi/aic7xxx/aic7770.c 	ahc->features = AHC_AIC7770_FE;
ahc               381 drivers/scsi/aic7xxx/aic7770.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG;
ahc               382 drivers/scsi/aic7xxx/aic7770.c 	ahc->flags |= AHC_PAGESCBS;
ahc               383 drivers/scsi/aic7xxx/aic7770.c 	ahc->instruction_ram_size = 448;
ahc                48 drivers/scsi/aic7xxx/aic7770_osm.c aic7770_map_registers(struct ahc_softc *ahc, u_int port)
ahc                55 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc->tag = BUS_SPACE_PIO;
ahc                56 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc->bsh.ioport = port;
ahc                61 drivers/scsi/aic7xxx/aic7770_osm.c aic7770_map_int(struct ahc_softc *ahc, u_int irq)
ahc                67 drivers/scsi/aic7xxx/aic7770_osm.c 	if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0)
ahc                70 drivers/scsi/aic7xxx/aic7770_osm.c 	error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc);
ahc                72 drivers/scsi/aic7xxx/aic7770_osm.c 		ahc->platform_data->irq = irq;
ahc                82 drivers/scsi/aic7xxx/aic7770_osm.c 	struct	ahc_softc *ahc;
ahc                91 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc = ahc_alloc(&aic7xxx_driver_template, name);
ahc                92 drivers/scsi/aic7xxx/aic7770_osm.c 	if (ahc == NULL)
ahc                94 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc->dev = dev;
ahc                95 drivers/scsi/aic7xxx/aic7770_osm.c 	error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
ahc                98 drivers/scsi/aic7xxx/aic7770_osm.c 		ahc->bsh.ioport = 0;
ahc                99 drivers/scsi/aic7xxx/aic7770_osm.c 		ahc_free(ahc);
ahc               103 drivers/scsi/aic7xxx/aic7770_osm.c  	dev_set_drvdata(dev, ahc);
ahc               105 drivers/scsi/aic7xxx/aic7770_osm.c 	error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
ahc               112 drivers/scsi/aic7xxx/aic7770_osm.c 	struct ahc_softc *ahc = dev_get_drvdata(dev);
ahc               115 drivers/scsi/aic7xxx/aic7770_osm.c 	if (ahc->platform_data && ahc->platform_data->host)
ahc               116 drivers/scsi/aic7xxx/aic7770_osm.c 			scsi_remove_host(ahc->platform_data->host);
ahc               118 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc_lock(ahc, &s);
ahc               119 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc_intr_enable(ahc, FALSE);
ahc               120 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc_unlock(ahc, &s);
ahc               122 drivers/scsi/aic7xxx/aic7770_osm.c 	ahc_free(ahc);
ahc                68 drivers/scsi/aic7xxx/aic7xxx.h #define SCSIID_TARGET(ahc, scsiid) \
ahc                69 drivers/scsi/aic7xxx/aic7xxx.h 	(((scsiid) & ((((ahc)->features & AHC_TWIN) != 0) ? TWIN_TID : TID)) \
ahc                73 drivers/scsi/aic7xxx/aic7xxx.h #define SCSIID_CHANNEL(ahc, scsiid) \
ahc                74 drivers/scsi/aic7xxx/aic7xxx.h 	((((ahc)->features & AHC_TWIN) != 0) \
ahc                77 drivers/scsi/aic7xxx/aic7xxx.h #define	SCB_IS_SCSIBUS_B(ahc, scb) \
ahc                78 drivers/scsi/aic7xxx/aic7xxx.h 	(SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B')
ahc                81 drivers/scsi/aic7xxx/aic7xxx.h #define	SCB_GET_TARGET(ahc, scb) \
ahc                82 drivers/scsi/aic7xxx/aic7xxx.h 	SCSIID_TARGET((ahc), (scb)->hscb->scsiid)
ahc                83 drivers/scsi/aic7xxx/aic7xxx.h #define	SCB_GET_CHANNEL(ahc, scb) \
ahc                84 drivers/scsi/aic7xxx/aic7xxx.h 	SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid)
ahc                87 drivers/scsi/aic7xxx/aic7xxx.h #define SCB_GET_TARGET_OFFSET(ahc, scb)	\
ahc                88 drivers/scsi/aic7xxx/aic7xxx.h 	(SCB_GET_TARGET(ahc, scb) + (SCB_IS_SCSIBUS_B(ahc, scb) ? 8 : 0))
ahc                89 drivers/scsi/aic7xxx/aic7xxx.h #define SCB_GET_TARGET_MASK(ahc, scb) \
ahc                90 drivers/scsi/aic7xxx/aic7xxx.h 	(0x01 << (SCB_GET_TARGET_OFFSET(ahc, scb)))
ahc              1138 drivers/scsi/aic7xxx/aic7xxx.h void			 ahc_pci_resume(struct ahc_softc *ahc);
ahc              1143 drivers/scsi/aic7xxx/aic7xxx.h int			 aic7770_config(struct ahc_softc *ahc,
ahc              1149 drivers/scsi/aic7xxx/aic7xxx.h void		ahc_qinfifo_requeue_tail(struct ahc_softc *ahc,
ahc              1151 drivers/scsi/aic7xxx/aic7xxx.h int		ahc_match_scb(struct ahc_softc *ahc, struct scb *scb,
ahc              1158 drivers/scsi/aic7xxx/aic7xxx.h void			 ahc_controller_info(struct ahc_softc *ahc, char *buf);
ahc              1159 drivers/scsi/aic7xxx/aic7xxx.h int			 ahc_chip_init(struct ahc_softc *ahc);
ahc              1160 drivers/scsi/aic7xxx/aic7xxx.h int			 ahc_init(struct ahc_softc *ahc);
ahc              1161 drivers/scsi/aic7xxx/aic7xxx.h void			 ahc_intr_enable(struct ahc_softc *ahc, int enable);
ahc              1162 drivers/scsi/aic7xxx/aic7xxx.h void			 ahc_pause_and_flushwork(struct ahc_softc *ahc);
ahc              1164 drivers/scsi/aic7xxx/aic7xxx.h int			 ahc_suspend(struct ahc_softc *ahc); 
ahc              1165 drivers/scsi/aic7xxx/aic7xxx.h int			 ahc_resume(struct ahc_softc *ahc);
ahc              1169 drivers/scsi/aic7xxx/aic7xxx.h void			 ahc_free(struct ahc_softc *ahc);
ahc              1170 drivers/scsi/aic7xxx/aic7xxx.h int			 ahc_reset(struct ahc_softc *ahc, int reinit);
ahc              1178 drivers/scsi/aic7xxx/aic7xxx.h int			ahc_search_qinfifo(struct ahc_softc *ahc, int target,
ahc              1182 drivers/scsi/aic7xxx/aic7xxx.h int			ahc_search_untagged_queues(struct ahc_softc *ahc,
ahc              1187 drivers/scsi/aic7xxx/aic7xxx.h int			ahc_search_disc_list(struct ahc_softc *ahc, int target,
ahc              1191 drivers/scsi/aic7xxx/aic7xxx.h int			ahc_reset_channel(struct ahc_softc *ahc, char channel,
ahc              1200 drivers/scsi/aic7xxx/aic7xxx.h const struct ahc_syncrate*	ahc_find_syncrate(struct ahc_softc *ahc, u_int *period,
ahc              1202 drivers/scsi/aic7xxx/aic7xxx.h u_int			ahc_find_period(struct ahc_softc *ahc,
ahc              1218 drivers/scsi/aic7xxx/aic7xxx.h void			ahc_set_width(struct ahc_softc *ahc,
ahc              1221 drivers/scsi/aic7xxx/aic7xxx.h void			ahc_set_syncrate(struct ahc_softc *ahc,
ahc              1237 drivers/scsi/aic7xxx/aic7xxx.h void		ahc_handle_en_lun(struct ahc_softc *ahc,
ahc              1239 drivers/scsi/aic7xxx/aic7xxx.h cam_status	ahc_find_tmode_devs(struct ahc_softc *ahc,
ahc              1265 drivers/scsi/aic7xxx/aic7xxx.h void			ahc_print_devinfo(struct ahc_softc *ahc,
ahc              1267 drivers/scsi/aic7xxx/aic7xxx.h void			ahc_dump_card_state(struct ahc_softc *ahc);
ahc              1276 drivers/scsi/aic7xxx/aic7xxx.h int		ahc_acquire_seeprom(struct ahc_softc *ahc,
ahc               134 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_force_renegotiation(struct ahc_softc *ahc,
ahc               137 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_alloc_tstate(struct ahc_softc *ahc,
ahc               140 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_free_tstate(struct ahc_softc *ahc,
ahc               144 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_devlimited_syncrate(struct ahc_softc *ahc,
ahc               149 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_update_pending_scbs(struct ahc_softc *ahc);
ahc               150 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_fetch_devinfo(struct ahc_softc *ahc,
ahc               152 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_scb_devinfo(struct ahc_softc *ahc,
ahc               155 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_assert_atn(struct ahc_softc *ahc);
ahc               156 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_setup_initiator_msgout(struct ahc_softc *ahc,
ahc               159 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_build_transfer_msg(struct ahc_softc *ahc,
ahc               161 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_construct_sdtr(struct ahc_softc *ahc,
ahc               164 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_construct_wdtr(struct ahc_softc *ahc,
ahc               167 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_construct_ppr(struct ahc_softc *ahc,
ahc               171 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_clear_msg_state(struct ahc_softc *ahc);
ahc               172 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_proto_violation(struct ahc_softc *ahc);
ahc               173 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_message_phase(struct ahc_softc *ahc);
ahc               179 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_sent_msg(struct ahc_softc *ahc, ahc_msgtype type,
ahc               181 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_parse_msg(struct ahc_softc *ahc,
ahc               183 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_handle_msg_reject(struct ahc_softc *ahc,
ahc               185 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_ign_wide_residue(struct ahc_softc *ahc,
ahc               187 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_reinitialize_dataptrs(struct ahc_softc *ahc);
ahc               188 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_devreset(struct ahc_softc *ahc,
ahc               193 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_setup_target_msgin(struct ahc_softc *ahc,
ahc               199 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_build_free_scb_list(struct ahc_softc *ahc);
ahc               200 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_init_scbdata(struct ahc_softc *ahc);
ahc               201 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_fini_scbdata(struct ahc_softc *ahc);
ahc               202 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_qinfifo_requeue(struct ahc_softc *ahc,
ahc               205 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_qinfifo_count(struct ahc_softc *ahc);
ahc               206 drivers/scsi/aic7xxx/aic7xxx_core.c static u_int		ahc_rem_scb_from_disc_list(struct ahc_softc *ahc,
ahc               208 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_add_curscb_to_free_list(struct ahc_softc *ahc);
ahc               209 drivers/scsi/aic7xxx/aic7xxx_core.c static u_int		ahc_rem_wscb(struct ahc_softc *ahc,
ahc               211 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_reset_current_bus(struct ahc_softc *ahc);
ahc               213 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_dumpseq(struct ahc_softc *ahc);
ahc               215 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_loadseq(struct ahc_softc *ahc);
ahc               216 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_check_patch(struct ahc_softc *ahc,
ahc               219 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_download_instr(struct ahc_softc *ahc,
ahc               222 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_queue_lstate_event(struct ahc_softc *ahc,
ahc               227 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_update_scsiid(struct ahc_softc *ahc,
ahc               229 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_handle_target_cmd(struct ahc_softc *ahc,
ahc               233 drivers/scsi/aic7xxx/aic7xxx_core.c static u_int		ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl);
ahc               234 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl);
ahc               235 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_busy_tcl(struct ahc_softc *ahc,
ahc               239 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_run_untagged_queues(struct ahc_softc *ahc);
ahc               240 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_run_untagged_queue(struct ahc_softc *ahc,
ahc               244 drivers/scsi/aic7xxx/aic7xxx_core.c static void		 ahc_alloc_scbs(struct ahc_softc *ahc);
ahc               248 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_clear_intstat(struct ahc_softc *ahc);
ahc               249 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_run_qoutfifo(struct ahc_softc *ahc);
ahc               251 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_run_tqinfifo(struct ahc_softc *ahc, int paused);
ahc               253 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_brkadrint(struct ahc_softc *ahc);
ahc               254 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat);
ahc               255 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_handle_scsiint(struct ahc_softc *ahc,
ahc               257 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_clear_critical_section(struct ahc_softc *ahc);
ahc               260 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
ahc               261 drivers/scsi/aic7xxx/aic7xxx_core.c static int		ahc_abort_scbs(struct ahc_softc *ahc, int target,
ahc               264 drivers/scsi/aic7xxx/aic7xxx_core.c static void		ahc_calc_residual(struct ahc_softc *ahc,
ahc               268 drivers/scsi/aic7xxx/aic7xxx_core.c static inline void	ahc_freeze_untagged_queues(struct ahc_softc *ahc);
ahc               269 drivers/scsi/aic7xxx/aic7xxx_core.c static inline void	ahc_release_untagged_queues(struct ahc_softc *ahc);
ahc               276 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_freeze_untagged_queues(struct ahc_softc *ahc)
ahc               278 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) == 0)
ahc               279 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->untagged_queue_lock++;
ahc               289 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_release_untagged_queues(struct ahc_softc *ahc)
ahc               291 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) == 0) {
ahc               292 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->untagged_queue_lock--;
ahc               293 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->untagged_queue_lock == 0)
ahc               294 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_run_untagged_queues(ahc);
ahc               308 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_pause_bug_fix(struct ahc_softc *ahc)
ahc               310 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc               311 drivers/scsi/aic7xxx/aic7xxx_core.c 		(void)ahc_inb(ahc, CCSCBCTL);
ahc               319 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_is_paused(struct ahc_softc *ahc)
ahc               321 drivers/scsi/aic7xxx/aic7xxx_core.c 	return ((ahc_inb(ahc, HCNTRL) & PAUSE) != 0);
ahc               332 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_pause(struct ahc_softc *ahc)
ahc               334 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNTRL, ahc->pause);
ahc               340 drivers/scsi/aic7xxx/aic7xxx_core.c 	while (ahc_is_paused(ahc) == 0)
ahc               343 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_pause_bug_fix(ahc);
ahc               357 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_unpause(struct ahc_softc *ahc)
ahc               359 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0)
ahc               360 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HCNTRL, ahc->unpause);
ahc               388 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index)
ahc               390 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (ahc->scb_data->hscb_busaddr
ahc               395 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
ahc               397 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_sync(ahc, ahc->scb_data->hscb_dmat,
ahc               398 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->scb_data->hscb_dmamap,
ahc               399 drivers/scsi/aic7xxx/aic7xxx_core.c 			/*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb),
ahc               404 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
ahc               409 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap,
ahc               417 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index)
ahc               419 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo);
ahc               429 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
ahc               435 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_calc_residual(ahc, scb);
ahc               443 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id,
ahc               454 drivers/scsi/aic7xxx/aic7xxx_core.c 	*tstate = ahc->enabled_targets[our_id];
ahc               459 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_inw(struct ahc_softc *ahc, u_int port)
ahc               461 drivers/scsi/aic7xxx/aic7xxx_core.c 	uint16_t r = ahc_inb(ahc, port+1) << 8;
ahc               462 drivers/scsi/aic7xxx/aic7xxx_core.c 	return r | ahc_inb(ahc, port);
ahc               466 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_outw(struct ahc_softc *ahc, u_int port, u_int value)
ahc               468 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port, value & 0xFF);
ahc               469 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+1, (value >> 8) & 0xFF);
ahc               473 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_inl(struct ahc_softc *ahc, u_int port)
ahc               475 drivers/scsi/aic7xxx/aic7xxx_core.c 	return ((ahc_inb(ahc, port))
ahc               476 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+1) << 8)
ahc               477 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+2) << 16)
ahc               478 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+3) << 24));
ahc               482 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_outl(struct ahc_softc *ahc, u_int port, uint32_t value)
ahc               484 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port, (value) & 0xFF);
ahc               485 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+1, ((value) >> 8) & 0xFF);
ahc               486 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+2, ((value) >> 16) & 0xFF);
ahc               487 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+3, ((value) >> 24) & 0xFF);
ahc               491 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_inq(struct ahc_softc *ahc, u_int port)
ahc               493 drivers/scsi/aic7xxx/aic7xxx_core.c 	return ((ahc_inb(ahc, port))
ahc               494 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+1) << 8)
ahc               495 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+2) << 16)
ahc               496 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, port+3) << 24)
ahc               497 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (((uint64_t)ahc_inb(ahc, port+4)) << 32)
ahc               498 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (((uint64_t)ahc_inb(ahc, port+5)) << 40)
ahc               499 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (((uint64_t)ahc_inb(ahc, port+6)) << 48)
ahc               500 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (((uint64_t)ahc_inb(ahc, port+7)) << 56));
ahc               504 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t value)
ahc               506 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port, value & 0xFF);
ahc               507 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+1, (value >> 8) & 0xFF);
ahc               508 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+2, (value >> 16) & 0xFF);
ahc               509 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+3, (value >> 24) & 0xFF);
ahc               510 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+4, (value >> 32) & 0xFF);
ahc               511 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+5, (value >> 40) & 0xFF);
ahc               512 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+6, (value >> 48) & 0xFF);
ahc               513 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, port+7, (value >> 56) & 0xFF);
ahc               520 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_get_scb(struct ahc_softc *ahc)
ahc               524 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
ahc               525 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_alloc_scbs(ahc);
ahc               526 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
ahc               530 drivers/scsi/aic7xxx/aic7xxx_core.c 	SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
ahc               538 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_free_scb(struct ahc_softc *ahc, struct scb *scb)
ahc               544 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->scb_data->scbindex[hscb->tag] = NULL;
ahc               548 drivers/scsi/aic7xxx/aic7xxx_core.c 	SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
ahc               551 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_platform_scb_free(ahc, scb);
ahc               555 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_lookup_scb(struct ahc_softc *ahc, u_int tag)
ahc               559 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc->scb_data->scbindex[tag];
ahc               561 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_sync_scb(ahc, scb,
ahc               567 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb)
ahc               584 drivers/scsi/aic7xxx/aic7xxx_core.c 	q_hscb = ahc->next_queued_scb->hscb;
ahc               589 drivers/scsi/aic7xxx/aic7xxx_core.c 		    ahc_htole32(ahc_hscb_busaddr(ahc, q_hscb->tag)
ahc               596 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->next_queued_scb->hscb = scb->hscb;
ahc               600 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->scb_data->scbindex[scb->hscb->tag] = scb;
ahc               607 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
ahc               609 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_swap_with_next_hscb(ahc, scb);
ahc               626 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
ahc               632 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
ahc               635 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc               636 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
ahc               638 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_AUTOPAUSE) == 0)
ahc               639 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_pause(ahc);
ahc               640 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext);
ahc               641 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_AUTOPAUSE) == 0)
ahc               642 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unpause(ahc);
ahc               647 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
ahc               651 drivers/scsi/aic7xxx/aic7xxx_core.c 	offset = scb - ahc->scb_data->scbarray;
ahc               652 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (&ahc->scb_data->sense[offset]);
ahc               656 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
ahc               660 drivers/scsi/aic7xxx/aic7xxx_core.c 	offset = scb - ahc->scb_data->scbarray;
ahc               661 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (ahc->scb_data->sense_busaddr
ahc               667 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_sync_qoutfifo(struct ahc_softc *ahc, int op)
ahc               669 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
ahc               674 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_sync_tqinfifo(struct ahc_softc *ahc, int op)
ahc               677 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_TARGETROLE) != 0) {
ahc               678 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_sync(ahc, ahc->shared_data_dmat,
ahc               679 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->shared_data_dmamap,
ahc               680 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_targetcmd_offset(ahc, 0),
ahc               694 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_check_cmdcmpltqueues(struct ahc_softc *ahc)
ahc               699 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
ahc               700 drivers/scsi/aic7xxx/aic7xxx_core.c 			/*offset*/ahc->qoutfifonext, /*len*/1,
ahc               702 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL)
ahc               705 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_TARGETROLE) != 0
ahc               706 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc->flags & AHC_TQINFIFO_BLOCKED) == 0) {
ahc               707 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_sync(ahc, ahc->shared_data_dmat,
ahc               708 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->shared_data_dmamap,
ahc               709 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_targetcmd_offset(ahc, ahc->tqinfifofnext),
ahc               712 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->targetcmds[ahc->tqinfifonext].cmd_valid != 0)
ahc               723 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_intr(struct ahc_softc *ahc)
ahc               727 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->pause & INTEN) == 0) {
ahc               742 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == 0
ahc               743 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc_check_cmdcmpltqueues(ahc) != 0))
ahc               746 drivers/scsi/aic7xxx/aic7xxx_core.c 		intstat = ahc_inb(ahc, INTSTAT);
ahc               751 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->unsolicited_ints > 500) {
ahc               752 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->unsolicited_ints = 0;
ahc               753 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->chip & AHC_PCI) != 0
ahc               754 drivers/scsi/aic7xxx/aic7xxx_core.c 			 && (ahc_inb(ahc, ERROR) & PCIERRSTAT) != 0)
ahc               755 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->bus_intr(ahc);
ahc               758 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->unsolicited_ints++;
ahc               761 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->unsolicited_ints = 0;
ahc               764 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRINT, CLRCMDINT);
ahc               774 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_flush_device_writes(ahc);
ahc               775 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_run_qoutfifo(ahc);
ahc               777 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_TARGETROLE) != 0)
ahc               778 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_run_tqinfifo(ahc, /*paused*/FALSE);
ahc               786 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (intstat == 0xFF && (ahc->features & AHC_REMOVABLE) != 0) {
ahc               789 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_handle_brkadrint(ahc);
ahc               792 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause_bug_fix(ahc);
ahc               795 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_handle_seqint(ahc, intstat);
ahc               798 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_handle_scsiint(ahc, intstat);
ahc               808 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_restart(struct ahc_softc *ahc)
ahc               812 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_pause(ahc);
ahc               815 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_clear_msg_state(ahc);
ahc               817 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISIGO, 0);		/* De-assert BSY */
ahc               818 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, MSG_OUT, MSG_NOOP);	/* No message to send */
ahc               819 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SXFRCTL1, ahc_inb(ahc, SXFRCTL1) & ~BITBUCKET);
ahc               820 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, LASTPHASE, P_BUSFREE);
ahc               821 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SAVED_SCSIID, 0xFF);
ahc               822 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SAVED_LUN, 0xFF);
ahc               831 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, TQINPOS, ahc->tqinfifonext);
ahc               834 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISEQ,
ahc               835 drivers/scsi/aic7xxx/aic7xxx_core.c 		 ahc_inb(ahc, SCSISEQ_TEMPLATE) & (ENSELI|ENRSELI|ENAUTOATNP));
ahc               836 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_CMD_CHAN) != 0) {
ahc               838 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CCSCBCNT, 0);
ahc               839 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CCSGCTL, 0);
ahc               840 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CCSCBCTL, 0);
ahc               847 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc_inb(ahc, SEQ_FLAGS2) & SCB_DMA) != 0) {
ahc               848 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_add_curscb_to_free_list(ahc);
ahc               849 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SEQ_FLAGS2,
ahc               850 drivers/scsi/aic7xxx/aic7xxx_core.c 			 ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA);
ahc               858 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRINT, CLRSEQINT);
ahc               860 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, MWI_RESIDUAL, 0);
ahc               861 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQCTL, ahc->seqctl);
ahc               862 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR0, 0);
ahc               863 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR1, 0);
ahc               868 drivers/scsi/aic7xxx/aic7xxx_core.c 	sblkctl = ahc_inb(ahc, SBLKCTL);
ahc               869 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SBLKCTL, (sblkctl & ~(DIAGLEDEN|DIAGLEDON)));
ahc               871 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_unpause(ahc);
ahc               876 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_run_qoutfifo(struct ahc_softc *ahc)
ahc               881 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
ahc               882 drivers/scsi/aic7xxx/aic7xxx_core.c 	while (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL) {
ahc               884 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc->qoutfifo[ahc->qoutfifonext];
ahc               885 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->qoutfifonext & 0x03) == 0x03) {
ahc               895 drivers/scsi/aic7xxx/aic7xxx_core.c 			modnext = ahc->qoutfifonext & ~0x3;
ahc               896 drivers/scsi/aic7xxx/aic7xxx_core.c 			*((uint32_t *)(&ahc->qoutfifo[modnext])) = 0xFFFFFFFFUL;
ahc               897 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dmamap_sync(ahc, ahc->shared_data_dmat,
ahc               898 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc->shared_data_dmamap,
ahc               902 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qoutfifonext++;
ahc               904 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scb_index);
ahc               908 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc), scb_index,
ahc               909 drivers/scsi/aic7xxx/aic7xxx_core.c 			       (ahc->qoutfifonext - 1) & 0xFF);
ahc               917 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_update_residual(ahc, scb);
ahc               918 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_done(ahc, scb);
ahc               923 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_run_untagged_queues(struct ahc_softc *ahc)
ahc               928 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_run_untagged_queue(ahc, &ahc->untagged_queues[i]);
ahc               932 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_run_untagged_queue(struct ahc_softc *ahc, struct scb_tailq *queue)
ahc               936 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->untagged_queue_lock != 0)
ahc               942 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_queue_scb(ahc, scb);
ahc               948 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_brkadrint(struct ahc_softc *ahc)
ahc               957 drivers/scsi/aic7xxx/aic7xxx_core.c 	error = ahc_inb(ahc, ERROR);
ahc               961 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_name(ahc), ahc_hard_errors[i].errmesg,
ahc               962 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_inb(ahc, SEQADDR0) |
ahc               963 drivers/scsi/aic7xxx/aic7xxx_core.c 	       (ahc_inb(ahc, SEQADDR1) << 8));
ahc               965 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dump_card_state(ahc);
ahc               968 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS,
ahc               973 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_shutdown(ahc);
ahc               977 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
ahc               982 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_fetch_devinfo(ahc, &devinfo);
ahc               990 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRINT, CLRSEQINT);
ahc              1002 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, RETURN_1, 0);
ahc              1013 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_TAG);
ahc              1014 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scb_index);
ahc              1016 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_devinfo(ahc, &devinfo);
ahc              1020 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              1040 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_freeze_devq(ahc, scb);
ahc              1046 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc));
ahc              1058 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1067 drivers/scsi/aic7xxx/aic7xxx_core.c 			targ_info = ahc_fetch_transinfo(ahc,
ahc              1078 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_update_residual(ahc, scb);
ahc              1081 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1085 drivers/scsi/aic7xxx/aic7xxx_core.c 			sg->addr = ahc_get_sense_bufaddr(ahc, scb);
ahc              1086 drivers/scsi/aic7xxx/aic7xxx_core.c 			sg->len = ahc_get_sense_bufsize(ahc, scb);
ahc              1122 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_update_neg_request(ahc, &devinfo,
ahc              1138 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_qinfifo_requeue_tail(ahc, scb);
ahc              1139 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, RETURN_1, SEND_SENSE);
ahc              1155 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ,
ahc              1156 drivers/scsi/aic7xxx/aic7xxx_core.c 			 ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP));
ahc              1160 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo.channel, devinfo.target);
ahc              1163 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
ahc              1164 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
ahc              1167 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
ahc              1168 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_index_busy_tcl(ahc,
ahc              1169 drivers/scsi/aic7xxx/aic7xxx_core.c 			    BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
ahc              1170 drivers/scsi/aic7xxx/aic7xxx_core.c 				      ahc_inb(ahc, SAVED_LUN))),
ahc              1171 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SINDEX));
ahc              1174 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID),
ahc              1175 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG),
ahc              1176 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCB_CONTROL));
ahc              1178 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI));
ahc              1179 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0));
ahc              1180 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL));
ahc              1181 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dump_card_state(ahc);
ahc              1182 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_buf[0] = MSG_BUS_DEV_RESET;
ahc              1183 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len = 1;
ahc              1184 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_index = 0;
ahc              1185 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc              1186 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, MSG_OUT, HOST_MSG);
ahc              1187 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_assert_atn(ahc);
ahc              1192 drivers/scsi/aic7xxx/aic7xxx_core.c 		u_int rejbyte = ahc_inb(ahc, ACCUM);
ahc              1195 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo.channel, devinfo.target, rejbyte);
ahc              1200 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_handle_proto_violation(ahc);
ahc              1204 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_handle_ign_wide_residue(ahc, &devinfo);
ahc              1207 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_reinitialize_dataptrs(ahc);
ahc              1213 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastphase = ahc_inb(ahc, LASTPHASE);
ahc              1216 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo.channel, devinfo.target,
ahc              1217 drivers/scsi/aic7xxx/aic7xxx_core.c 		       lastphase, ahc_inb(ahc, SCSISIGI));
ahc              1224 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastphase = ahc_inb(ahc, LASTPHASE);
ahc              1227 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo.channel, devinfo.target,
ahc              1228 drivers/scsi/aic7xxx/aic7xxx_core.c 		       lastphase, ahc_inb(ahc, SCSISIGI));
ahc              1229 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              1245 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msg_type == MSG_TYPE_NONE) {
ahc              1250 drivers/scsi/aic7xxx/aic7xxx_core.c 			bus_phase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
ahc              1260 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_clear_intstat(ahc);
ahc              1261 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_restart(ahc);
ahc              1265 drivers/scsi/aic7xxx/aic7xxx_core.c 			scb_index = ahc_inb(ahc, SCB_TAG);
ahc              1266 drivers/scsi/aic7xxx/aic7xxx_core.c 			scb = ahc_lookup_scb(ahc, scb_index);
ahc              1274 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_setup_initiator_msgout(ahc,
ahc              1278 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc->msg_type =
ahc              1280 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc->msgin_index = 0;
ahc              1286 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc->msg_type =
ahc              1288 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc->msgin_index = 0;
ahc              1291 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_setup_target_msgin(ahc,
ahc              1298 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_handle_message_phase(ahc);
ahc              1315 drivers/scsi/aic7xxx/aic7xxx_core.c 		 && (ahc_inb(ahc, SSTAT1) & SCSIPERR) != 0) {
ahc              1317 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_DT) == 0) {
ahc              1326 drivers/scsi/aic7xxx/aic7xxx_core.c 				curphase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
ahc              1327 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, LASTPHASE, curphase);
ahc              1328 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SCSISIGO, curphase);
ahc              1330 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc_inb(ahc, SCSISIGI) & (CDI|MSGI)) == 0) {
ahc              1339 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SXFRCTL1,
ahc              1340 drivers/scsi/aic7xxx/aic7xxx_core.c 					 ahc_inb(ahc, SXFRCTL1) | BITBUCKET);
ahc              1343 drivers/scsi/aic7xxx/aic7xxx_core.c 					if ((ahc_inb(ahc, SCSISIGI)
ahc              1348 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SXFRCTL1,
ahc              1349 drivers/scsi/aic7xxx/aic7xxx_core.c 					 ahc_inb(ahc, SXFRCTL1) & ~BITBUCKET);
ahc              1354 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_print_devinfo(ahc, &devinfo);
ahc              1357 drivers/scsi/aic7xxx/aic7xxx_core.c 					scb_index = ahc_inb(ahc, SCB_TAG);
ahc              1358 drivers/scsi/aic7xxx/aic7xxx_core.c 					scb = ahc_lookup_scb(ahc, scb_index);
ahc              1362 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_reset_channel(ahc, devinfo.channel, 
ahc              1366 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_inb(ahc, SCSIDATL);
ahc              1381 drivers/scsi/aic7xxx/aic7xxx_core.c 		u_int scbindex = ahc_inb(ahc, SCB_TAG);
ahc              1382 drivers/scsi/aic7xxx/aic7xxx_core.c 		u_int lastphase = ahc_inb(ahc, LASTPHASE);
ahc              1385 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scbindex);
ahc              1390 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_path(ahc, scb);
ahc              1395 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_path(ahc, scb);
ahc              1397 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't",
ahc              1415 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_freeze_devq(ahc, scb);
ahc              1424 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              1429 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SXFRCTL0,
ahc              1430 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SXFRCTL0) | CLRSTCNT|CLRCHN);
ahc              1431 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SXFRCTL0,
ahc              1432 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SXFRCTL0) | CLRSTCNT|CLRCHN);
ahc              1434 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) {
ahc              1438 drivers/scsi/aic7xxx/aic7xxx_core.c 			dscommand1 = ahc_inb(ahc, DSCOMMAND1);
ahc              1439 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, DSCOMMAND1, dscommand1 | HADDLDSEL0);
ahc              1440 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, HADDR, 0);
ahc              1441 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, DSCOMMAND1, dscommand1);
ahc              1450 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo.channel, devinfo.target,
ahc              1452 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbindex = ahc_inb(ahc, SCB_TAG);
ahc              1453 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scbindex);
ahc              1460 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
ahc              1461 drivers/scsi/aic7xxx/aic7xxx_core.c 					   SCB_GET_CHANNEL(ahc, scb),
ahc              1469 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%s: No free or disconnected SCBs\n", ahc_name(ahc));
ahc              1470 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dump_card_state(ahc);
ahc              1478 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbptr = ahc_inb(ahc, SCBPTR);
ahc              1480 drivers/scsi/aic7xxx/aic7xxx_core.c 		       scbptr, ahc_inb(ahc, ARG_1),
ahc              1481 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc->scb_data->hscbs[scbptr].tag);
ahc              1482 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dump_card_state(ahc);
ahc              1488 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%s: BTT calculation out of range\n", ahc_name(ahc));
ahc              1491 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
ahc              1492 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
ahc              1495 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
ahc              1496 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_index_busy_tcl(ahc,
ahc              1497 drivers/scsi/aic7xxx/aic7xxx_core.c 			    BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
ahc              1498 drivers/scsi/aic7xxx/aic7xxx_core.c 				      ahc_inb(ahc, SAVED_LUN))),
ahc              1499 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SINDEX),
ahc              1500 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, ACCUM));
ahc              1503 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID),
ahc              1504 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG),
ahc              1505 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCB_CONTROL));
ahc              1507 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI));
ahc              1508 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dump_card_state(ahc);
ahc              1515 drivers/scsi/aic7xxx/aic7xxx_core.c 		       intstat, ahc_inb(ahc, SCSISIGI));
ahc              1524 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_unpause(ahc);
ahc              1528 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
ahc              1537 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TWIN) != 0
ahc              1538 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && ((ahc_inb(ahc, SBLKCTL) & SELBUSB) != 0))
ahc              1544 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              1545 drivers/scsi/aic7xxx/aic7xxx_core.c 		status0 = ahc_inb(ahc, SSTAT0) & IOERR;
ahc              1548 drivers/scsi/aic7xxx/aic7xxx_core.c 	status = ahc_inb(ahc, SSTAT1) & (SELTO|SCSIRSTI|BUSFREE|SCSIPERR);
ahc              1550 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_TWIN) != 0) {
ahc              1552 drivers/scsi/aic7xxx/aic7xxx_core.c 		 	ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
ahc              1553 drivers/scsi/aic7xxx/aic7xxx_core.c 			status = ahc_inb(ahc, SSTAT1)
ahc              1558 drivers/scsi/aic7xxx/aic7xxx_core.c 			printk("%s: Spurious SCSI interrupt\n", ahc_name(ahc));
ahc              1559 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              1560 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unpause(ahc);
ahc              1566 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_clear_critical_section(ahc);
ahc              1568 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, SCB_TAG);
ahc              1569 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc_lookup_scb(ahc, scb_index);
ahc              1571 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc_inb(ahc, SEQ_FLAGS) & NOT_IDENTIFIED) != 0)
ahc              1574 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0
ahc              1578 drivers/scsi/aic7xxx/aic7xxx_core.c 		now_lvd = ahc_inb(ahc, SBLKCTL) & ENAB40;
ahc              1580 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), now_lvd ? "LVD" : "SE");
ahc              1581 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT0, CLRIOERR);
ahc              1592 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_reset_channel(ahc, intr_channel,
ahc              1596 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_name(ahc), intr_channel);
ahc              1598 drivers/scsi/aic7xxx/aic7xxx_core.c 		 	ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
ahc              1599 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_reset_channel(ahc, intr_channel, /*Initiate Reset*/FALSE);
ahc              1621 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastphase = ahc_inb(ahc, LASTPHASE);
ahc              1622 drivers/scsi/aic7xxx/aic7xxx_core.c 		curphase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
ahc              1623 drivers/scsi/aic7xxx/aic7xxx_core.c 		sstat2 = ahc_inb(ahc, SSTAT2);
ahc              1624 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT1, CLRSCSIPERR);
ahc              1636 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc_inb(ahc, SSTAT1) & SCSIPERR) != 0
ahc              1652 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1655 drivers/scsi/aic7xxx/aic7xxx_core.c 			printk("%s:%c:%d: ", ahc_name(ahc), intr_channel,
ahc              1656 drivers/scsi/aic7xxx/aic7xxx_core.c 			       SCSIID_TARGET(ahc, ahc_inb(ahc, SAVED_SCSIID)));
ahc              1657 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsirate = ahc_inb(ahc, SCSIRATE);
ahc              1662 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_inw(ahc, SEQADDR0),
ahc              1664 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_DT) != 0) {
ahc              1680 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_DT) != 0
ahc              1698 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msg_type != MSG_TYPE_NONE)
ahc              1699 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->send_msg_perror = TRUE;
ahc              1701 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, MSG_OUT, mesg_out);
ahc              1708 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_fetch_devinfo(ahc, &devinfo);
ahc              1709 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_force_renegotiation(ahc, &devinfo);
ahc              1711 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              1712 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              1717 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, 0);
ahc              1720 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_clear_msg_state(ahc);
ahc              1723 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENBUSFREE);
ahc              1724 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRBUSFREE|CLRSCSIPERR);
ahc              1734 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT0, CLRSELINGO);
ahc              1736 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbptr = ahc_inb(ahc, WAITING_SCBH);
ahc              1737 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, scbptr);
ahc              1738 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_TAG);
ahc              1740 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scb_index);
ahc              1744 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc), scbptr, scb_index);
ahc              1745 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              1750 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1755 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_scb_devinfo(ahc, &devinfo, scb);
ahc              1757 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_freeze_devq(ahc, scb);
ahc              1765 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_handle_devreset(ahc, &devinfo,
ahc              1770 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              1771 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              1773 drivers/scsi/aic7xxx/aic7xxx_core.c 		&& (ahc_inb(ahc, SIMODE1) & ENBUSFREE) != 0) {
ahc              1789 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ,
ahc              1790 drivers/scsi/aic7xxx/aic7xxx_core.c 			 ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP));
ahc              1798 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENBUSFREE);
ahc              1799 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT1, CLRBUSFREE|CLRSCSIPERR);
ahc              1807 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastphase = ahc_inb(ahc, LASTPHASE);
ahc              1808 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
ahc              1809 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_lun = ahc_inb(ahc, SAVED_LUN);
ahc              1810 drivers/scsi/aic7xxx/aic7xxx_core.c 		target = SCSIID_TARGET(ahc, saved_scsiid);
ahc              1812 drivers/scsi/aic7xxx/aic7xxx_core.c 		channel = SCSIID_CHANNEL(ahc, saved_scsiid);
ahc              1821 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc_sent_msg(ahc, AHCMSG_1B, MSG_ABORT_TAG, TRUE)
ahc              1822 drivers/scsi/aic7xxx/aic7xxx_core.c 			 || ahc_sent_msg(ahc, AHCMSG_1B, MSG_ABORT, TRUE)) {
ahc              1823 drivers/scsi/aic7xxx/aic7xxx_core.c 				if (ahc->msgout_buf[ahc->msgout_index - 1]
ahc              1826 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1830 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_abort_scbs(ahc, target, channel,
ahc              1835 drivers/scsi/aic7xxx/aic7xxx_core.c 			} else if (ahc_sent_msg(ahc, AHCMSG_1B,
ahc              1845 drivers/scsi/aic7xxx/aic7xxx_core.c 				 && ahc_match_scb(ahc, scb, target, channel,
ahc              1858 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_handle_devreset(ahc, &devinfo,
ahc              1863 drivers/scsi/aic7xxx/aic7xxx_core.c 			} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
ahc              1872 drivers/scsi/aic7xxx/aic7xxx_core.c 				tinfo = ahc_fetch_transinfo(ahc,
ahc              1880 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_qinfifo_requeue_tail(ahc, scb);
ahc              1882 drivers/scsi/aic7xxx/aic7xxx_core.c 			} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
ahc              1888 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_set_width(ahc, &devinfo,
ahc              1892 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_qinfifo_requeue_tail(ahc, scb);
ahc              1894 drivers/scsi/aic7xxx/aic7xxx_core.c 			} else if (ahc_sent_msg(ahc, AHCMSG_EXT,
ahc              1900 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_set_syncrate(ahc, &devinfo,
ahc              1906 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_qinfifo_requeue_tail(ahc, scb);
ahc              1920 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_print_path(ahc, scb);
ahc              1921 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_abort_scbs(ahc, target, channel,
ahc              1930 drivers/scsi/aic7xxx/aic7xxx_core.c 				printk("%s: ", ahc_name(ahc));
ahc              1943 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_force_renegotiation(ahc, &devinfo);
ahc              1948 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_inb(ahc, SEQADDR0)
ahc              1949 drivers/scsi/aic7xxx/aic7xxx_core.c 				| (ahc_inb(ahc, SEQADDR1) << 8));
ahc              1951 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              1952 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              1955 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), status);
ahc              1956 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              1965 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_force_renegotiation(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              1970 drivers/scsi/aic7xxx/aic7xxx_core.c 	targ_info = ahc_fetch_transinfo(ahc,
ahc              1975 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_update_neg_request(ahc, devinfo, tstate,
ahc              1981 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_clear_critical_section(struct ahc_softc *ahc)
ahc              1988 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->num_critical_sections == 0)
ahc              2000 drivers/scsi/aic7xxx/aic7xxx_core.c 		seqaddr = ahc_inb(ahc, SEQADDR0)
ahc              2001 drivers/scsi/aic7xxx/aic7xxx_core.c 			| (ahc_inb(ahc, SEQADDR1) << 8);
ahc              2010 drivers/scsi/aic7xxx/aic7xxx_core.c 		cs = ahc->critical_sections;
ahc              2011 drivers/scsi/aic7xxx/aic7xxx_core.c 		for (i = 0; i < ahc->num_critical_sections; i++, cs++) {
ahc              2017 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (i == ahc->num_critical_sections)
ahc              2022 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc));
ahc              2023 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              2036 drivers/scsi/aic7xxx/aic7xxx_core.c 			simode0 = ahc_inb(ahc, SIMODE0);
ahc              2037 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SIMODE0, 0);
ahc              2038 drivers/scsi/aic7xxx/aic7xxx_core.c 			simode1 = ahc_inb(ahc, SIMODE1);
ahc              2039 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_DT) != 0)
ahc              2048 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SIMODE1, simode1 & ENBUSFREE);
ahc              2050 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SIMODE1, 0);
ahc              2051 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              2052 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SEQCTL, ahc->seqctl | STEP);
ahc              2055 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_DT) != 0) {
ahc              2056 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRSINT1, CLRBUSFREE);
ahc              2057 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              2059 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HCNTRL, ahc->unpause);
ahc              2060 drivers/scsi/aic7xxx/aic7xxx_core.c 		while (!ahc_is_paused(ahc))
ahc              2064 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE0, simode0);
ahc              2065 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, simode1);
ahc              2066 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SEQCTL, ahc->seqctl);
ahc              2074 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_clear_intstat(struct ahc_softc *ahc)
ahc              2077 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRATNO|CLRSCSIRSTI
ahc              2080 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_flush_device_writes(ahc);
ahc              2081 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRSINT0, CLRSELDO|CLRSELDI|CLRSELINGO);
ahc              2082 drivers/scsi/aic7xxx/aic7xxx_core.c  	ahc_flush_device_writes(ahc);
ahc              2083 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc              2084 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_flush_device_writes(ahc);
ahc              2133 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_alloc_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel)
ahc              2139 drivers/scsi/aic7xxx/aic7xxx_core.c 	master_tstate = ahc->enabled_targets[ahc->our_id];
ahc              2142 drivers/scsi/aic7xxx/aic7xxx_core.c 		master_tstate = ahc->enabled_targets[ahc->our_id_b + 8];
ahc              2144 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->enabled_targets[scsi_id] != NULL
ahc              2145 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && ahc->enabled_targets[scsi_id] != master_tstate)
ahc              2147 drivers/scsi/aic7xxx/aic7xxx_core.c 		      ahc_name(ahc));
ahc              2170 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->enabled_targets[scsi_id] = tstate;
ahc              2180 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
ahc              2188 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (((channel == 'B' && scsi_id == ahc->our_id_b)
ahc              2189 drivers/scsi/aic7xxx/aic7xxx_core.c 	  || (channel == 'A' && scsi_id == ahc->our_id))
ahc              2195 drivers/scsi/aic7xxx/aic7xxx_core.c 	tstate = ahc->enabled_targets[scsi_id];
ahc              2198 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->enabled_targets[scsi_id] = NULL;
ahc              2209 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_devlimited_syncrate(struct ahc_softc *ahc,
ahc              2216 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              2217 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc_inb(ahc, SBLKCTL) & ENAB40) != 0
ahc              2218 drivers/scsi/aic7xxx/aic7xxx_core.c 		 && (ahc_inb(ahc, SSTAT2) & EXP_ACTIVE) == 0) {
ahc              2225 drivers/scsi/aic7xxx/aic7xxx_core.c 	} else if ((ahc->features & AHC_ULTRA) != 0) {
ahc              2255 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (ahc_find_syncrate(ahc, period, ppr_options, maxsync));
ahc              2264 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_find_syncrate(struct ahc_softc *ahc, u_int *period,
ahc              2269 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_DT) == 0)
ahc              2279 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & (AHC_DT | AHC_ULTRA2)) == 0
ahc              2282 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & (AHC_DT | AHC_ULTRA2 | AHC_ULTRA)) == 0
ahc              2294 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0
ahc              2325 drivers/scsi/aic7xxx/aic7xxx_core.c 	 || ((ahc->features & AHC_ULTRA2) != 0
ahc              2340 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
ahc              2344 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              2350 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_DT) == 0 && maxsync < AHC_SYNCRATE_ULTRA2)
ahc              2352 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & (AHC_DT | AHC_ULTRA2)) == 0
ahc              2355 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & (AHC_DT | AHC_ULTRA2 | AHC_ULTRA)) == 0
ahc              2363 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              2381 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_validate_offset(struct ahc_softc *ahc,
ahc              2391 drivers/scsi/aic7xxx/aic7xxx_core.c 	} else if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              2413 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_validate_width(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo,
ahc              2418 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->features & AHC_WIDE) {
ahc              2443 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_update_neg_request(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              2457 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_WIDE) != 0)
ahc              2486 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              2506 drivers/scsi/aic7xxx/aic7xxx_core.c 	tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
ahc              2533 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              2562 drivers/scsi/aic7xxx/aic7xxx_core.c 				sxfrctl0 = ahc_inb(ahc, SXFRCTL0);
ahc              2566 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SXFRCTL0, sxfrctl0);
ahc              2570 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSIRATE, scsirate);
ahc              2571 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_ULTRA2) != 0)
ahc              2572 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SCSIOFFSET, offset);
ahc              2580 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_send_async(ahc, devinfo->channel, devinfo->target,
ahc              2585 drivers/scsi/aic7xxx/aic7xxx_core.c 				       "offset = 0x%x\n", ahc_name(ahc),
ahc              2592 drivers/scsi/aic7xxx/aic7xxx_core.c 				       ahc_name(ahc), devinfo->target);
ahc              2597 drivers/scsi/aic7xxx/aic7xxx_core.c 	update_needed += ahc_update_neg_request(ahc, devinfo, tstate,
ahc              2601 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_update_pending_scbs(ahc);
ahc              2613 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_set_width(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              2624 drivers/scsi/aic7xxx/aic7xxx_core.c 	tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
ahc              2646 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSIRATE, scsirate);
ahc              2650 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_send_async(ahc, devinfo->channel, devinfo->target,
ahc              2654 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc), devinfo->target,
ahc              2659 drivers/scsi/aic7xxx/aic7xxx_core.c 	update_needed += ahc_update_neg_request(ahc, devinfo, tstate,
ahc              2662 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_update_pending_scbs(ahc);
ahc              2669 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_set_tags(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
ahc              2674 drivers/scsi/aic7xxx/aic7xxx_core.c  	ahc_platform_set_tags(ahc, sdev, devinfo, alg);
ahc              2675 drivers/scsi/aic7xxx/aic7xxx_core.c  	ahc_send_async(ahc, devinfo->channel, devinfo->target,
ahc              2685 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_update_pending_scbs(struct ahc_softc *ahc)
ahc              2698 drivers/scsi/aic7xxx/aic7xxx_core.c 	LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) {
ahc              2704 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scb_devinfo(ahc, &devinfo, pending_scb);
ahc              2705 drivers/scsi/aic7xxx/aic7xxx_core.c 		tinfo = ahc_fetch_transinfo(ahc, devinfo.channel,
ahc              2719 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_sync_scb(ahc, pending_scb,
ahc              2727 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_is_paused(ahc)) {
ahc              2731 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              2734 drivers/scsi/aic7xxx/aic7xxx_core.c 	saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              2736 drivers/scsi/aic7xxx/aic7xxx_core.c 	for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
ahc              2741 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, i);
ahc              2742 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_tag = ahc_inb(ahc, SCB_TAG);
ahc              2743 drivers/scsi/aic7xxx/aic7xxx_core.c 		pending_scb = ahc_lookup_scb(ahc, scb_tag);
ahc              2748 drivers/scsi/aic7xxx/aic7xxx_core.c 		control = ahc_inb(ahc, SCB_CONTROL);
ahc              2751 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_CONTROL, control);
ahc              2752 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_SCSIRATE, pending_hscb->scsirate);
ahc              2753 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_SCSIOFFSET, pending_hscb->scsioffset);
ahc              2755 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              2758 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              2763 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_fetch_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              2769 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_inb(ahc, SSTAT0) & TARGET)
ahc              2775 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc->features & AHC_MULTI_TID) != 0
ahc              2776 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc_inb(ahc, SEQ_FLAGS)
ahc              2779 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc_inb(ahc, TARGIDIN) & OID;
ahc              2780 drivers/scsi/aic7xxx/aic7xxx_core.c 	} else if ((ahc->features & AHC_ULTRA2) != 0)
ahc              2781 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc_inb(ahc, SCSIID_ULTRA2) & OID;
ahc              2783 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc_inb(ahc, SCSIID) & OID;
ahc              2785 drivers/scsi/aic7xxx/aic7xxx_core.c 	saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
ahc              2788 drivers/scsi/aic7xxx/aic7xxx_core.c 			    SCSIID_TARGET(ahc, saved_scsiid),
ahc              2789 drivers/scsi/aic7xxx/aic7xxx_core.c 			    ahc_inb(ahc, SAVED_LUN),
ahc              2790 drivers/scsi/aic7xxx/aic7xxx_core.c 			    SCSIID_CHANNEL(ahc, saved_scsiid),
ahc              2828 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_print_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              2830 drivers/scsi/aic7xxx/aic7xxx_core.c 	printk("%s:%c:%d:%d: ", ahc_name(ahc), devinfo->channel,
ahc              2835 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_scb_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              2845 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahc, scb),
ahc              2846 drivers/scsi/aic7xxx/aic7xxx_core.c 			    SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
ahc              2852 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_assert_atn(struct ahc_softc *ahc)
ahc              2857 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_DT) == 0)
ahc              2858 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsisigo |= ahc_inb(ahc, SCSISIGI);
ahc              2859 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISIGO, scsisigo);
ahc              2869 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_setup_initiator_msgout(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              2877 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index = 0;
ahc              2878 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len = 0;
ahc              2881 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && ahc_inb(ahc, MSG_OUT) == MSG_IDENTIFYFLAG) {
ahc              2887 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_buf[ahc->msgout_index++] = identify_msg;
ahc              2888 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len++;
ahc              2891 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf[ahc->msgout_index++] =
ahc              2893 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
ahc              2894 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_len += 2;
ahc              2899 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_buf[ahc->msgout_index++] = MSG_BUS_DEV_RESET;
ahc              2900 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len++;
ahc              2901 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_path(ahc, scb);
ahc              2910 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
ahc              2913 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf[ahc->msgout_index++] = MSG_ABORT_TAG;
ahc              2915 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf[ahc->msgout_index++] = MSG_ABORT;
ahc              2916 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len++;
ahc              2917 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_path(ahc, scb);
ahc              2927 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
ahc              2929 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_build_transfer_msg(ahc, devinfo);
ahc              2937 drivers/scsi/aic7xxx/aic7xxx_core.c 		      ahc_inb(ahc, MSG_OUT), scb->flags);
ahc              2944 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCB_CONTROL, ahc_inb(ahc, SCB_CONTROL) & ~MK_MESSAGE);
ahc              2946 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index = 0;
ahc              2947 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc              2955 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              2972 drivers/scsi/aic7xxx/aic7xxx_core.c 	tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
ahc              2986 drivers/scsi/aic7xxx/aic7xxx_core.c 	rate = ahc_devlimited_syncrate(ahc, tinfo, &period,
ahc              3007 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_WIDE) != 0)
ahc              3013 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_devinfo(ahc, devinfo);
ahc              3033 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_validate_offset(ahc, tinfo, rate, &offset,
ahc              3038 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_construct_ppr(ahc, devinfo, period, offset,
ahc              3041 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_construct_sdtr(ahc, devinfo, period, offset);
ahc              3044 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_construct_wdtr(ahc, devinfo, tinfo->goal.width);
ahc              3053 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_construct_sdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              3058 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index += spi_populate_sync_msg(
ahc              3059 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf + ahc->msgout_index, period, offset);
ahc              3060 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len += 5;
ahc              3063 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo->channel, devinfo->target,
ahc              3073 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_construct_wdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              3076 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index += spi_populate_width_msg(
ahc              3077 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf + ahc->msgout_index, bus_width);
ahc              3078 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len += 4;
ahc              3081 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo->channel, devinfo->target,
ahc              3091 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_construct_ppr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              3097 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index += spi_populate_ppr_msg(
ahc              3098 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf + ahc->msgout_index, period, offset,
ahc              3100 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len += 8;
ahc              3103 drivers/scsi/aic7xxx/aic7xxx_core.c 		       "offset %x, ppr_options %x\n", ahc_name(ahc),
ahc              3113 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_clear_msg_state(struct ahc_softc *ahc)
ahc              3115 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len = 0;
ahc              3116 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgin_index = 0;
ahc              3117 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msg_type = MSG_TYPE_NONE;
ahc              3118 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0) {
ahc              3123 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc              3125 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, MSG_OUT, MSG_NOOP);
ahc              3126 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQ_FLAGS2,
ahc              3127 drivers/scsi/aic7xxx/aic7xxx_core.c 		 ahc_inb(ahc, SEQ_FLAGS2) & ~TARGET_MSG_PENDING);
ahc              3131 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_proto_violation(struct ahc_softc *ahc)
ahc              3141 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_fetch_devinfo(ahc, &devinfo);
ahc              3142 drivers/scsi/aic7xxx/aic7xxx_core.c 	scbid = ahc_inb(ahc, SCB_TAG);
ahc              3143 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc_lookup_scb(ahc, scbid);
ahc              3144 drivers/scsi/aic7xxx/aic7xxx_core.c 	seq_flags = ahc_inb(ahc, SEQ_FLAGS);
ahc              3145 drivers/scsi/aic7xxx/aic7xxx_core.c 	curphase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
ahc              3146 drivers/scsi/aic7xxx/aic7xxx_core.c 	lastphase = ahc_inb(ahc, LASTPHASE);
ahc              3154 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_devinfo(ahc, &devinfo);
ahc              3163 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_devinfo(ahc, &devinfo);
ahc              3169 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_path(ahc, scb);
ahc              3171 drivers/scsi/aic7xxx/aic7xxx_core.c 		} else if ((ahc_inb(ahc, SCB_CONTROL) & STATUS_RCVD) == 0) {
ahc              3179 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_path(ahc, scb);
ahc              3182 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_path(ahc, scb);
ahc              3184 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              3196 drivers/scsi/aic7xxx/aic7xxx_core.c 		found = ahc_reset_channel(ahc, 'A', TRUE);
ahc              3198 drivers/scsi/aic7xxx/aic7xxx_core.c 		       "%d SCBs aborted\n", ahc_name(ahc), 'A', found);
ahc              3205 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ,
ahc              3206 drivers/scsi/aic7xxx/aic7xxx_core.c 			 ahc_inb(ahc, SCSISEQ) & ~ENSELO);
ahc              3207 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_assert_atn(ahc);
ahc              3208 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, MSG_OUT, HOST_MSG);
ahc              3210 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_devinfo(ahc, &devinfo);
ahc              3211 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_buf[0] = MSG_ABORT_TASK;
ahc              3212 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_len = 1;
ahc              3213 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_index = 0;
ahc              3214 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc              3216 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_path(ahc, scb);
ahc              3228 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_message_phase(struct ahc_softc *ahc)
ahc              3234 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_fetch_devinfo(ahc, &devinfo);
ahc              3236 drivers/scsi/aic7xxx/aic7xxx_core.c 	bus_phase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK;
ahc              3239 drivers/scsi/aic7xxx/aic7xxx_core.c 	switch (ahc->msg_type) {
ahc              3246 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msgout_len == 0)
ahc              3251 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_devinfo(ahc, &devinfo);
ahc              3271 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc              3272 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->send_msg_perror = FALSE;
ahc              3273 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msg_type = MSG_TYPE_INITIATOR_MSGIN;
ahc              3274 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgin_index = 0;
ahc              3281 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->send_msg_perror) {
ahc              3282 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc              3283 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRSINT1, CLRREQINIT);
ahc              3286 drivers/scsi/aic7xxx/aic7xxx_core.c 				printk(" byte 0x%x\n", ahc->send_msg_perror);
ahc              3288 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSIDATL, MSG_PARITY_ERROR);
ahc              3292 drivers/scsi/aic7xxx/aic7xxx_core.c 		msgdone	= ahc->msgout_index == ahc->msgout_len;
ahc              3299 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_index = 0;
ahc              3300 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_assert_atn(ahc);
ahc              3303 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastbyte = ahc->msgout_index == (ahc->msgout_len - 1);
ahc              3306 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRSINT1, CLRATNO);
ahc              3313 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, CLRSINT1, CLRREQINIT);
ahc              3317 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc->msgout_buf[ahc->msgout_index]);
ahc              3319 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIDATL, ahc->msgout_buf[ahc->msgout_index++]);
ahc              3329 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_print_devinfo(ahc, &devinfo);
ahc              3342 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgin_index = 0;
ahc              3344 drivers/scsi/aic7xxx/aic7xxx_core.c 			 && (ahc->send_msg_perror == TRUE
ahc              3345 drivers/scsi/aic7xxx/aic7xxx_core.c 			  || (ahc->msgout_len != 0
ahc              3346 drivers/scsi/aic7xxx/aic7xxx_core.c 			   && ahc->msgout_index == 0))) {
ahc              3347 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msg_type = MSG_TYPE_INITIATOR_MSGOUT;
ahc              3355 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgin_buf[ahc->msgin_index] = ahc_inb(ahc, SCSIBUSL);
ahc              3359 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc->msgin_buf[ahc->msgin_index]);
ahc              3362 drivers/scsi/aic7xxx/aic7xxx_core.c 		message_done = ahc_parse_msg(ahc, &devinfo);
ahc              3369 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgin_index = 0;
ahc              3376 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgout_len != 0) {
ahc              3379 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_print_devinfo(ahc, &devinfo);
ahc              3383 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_assert_atn(ahc);
ahc              3386 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgin_index++;
ahc              3392 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, CLRSINT1, CLRREQINIT);
ahc              3393 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_inb(ahc, SCSIDATL);
ahc              3402 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msgout_len == 0)
ahc              3411 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc_inb(ahc, SCSISIGI) & ATNI) != 0
ahc              3412 drivers/scsi/aic7xxx/aic7xxx_core.c 		 && ahc->msgout_index > 0)
ahc              3425 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msg_type = MSG_TYPE_TARGET_MSGOUT;
ahc              3426 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSISIGO, P_MESGOUT | BSYO);
ahc              3427 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgin_index = 0;
ahc              3429 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_inb(ahc, SCSIDATL);
ahc              3430 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SXFRCTL0,
ahc              3431 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SXFRCTL0) | SPIOEN);
ahc              3435 drivers/scsi/aic7xxx/aic7xxx_core.c 		msgdone = ahc->msgout_index == ahc->msgout_len;
ahc              3437 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SXFRCTL0,
ahc              3438 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SXFRCTL0) & ~SPIOEN);
ahc              3446 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) | SPIOEN);
ahc              3447 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIDATL, ahc->msgout_buf[ahc->msgout_index++]);
ahc              3459 drivers/scsi/aic7xxx/aic7xxx_core.c 		lastbyte = (ahc_inb(ahc, SCSISIGI) & ATNI) == 0;
ahc              3466 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SXFRCTL0, ahc_inb(ahc, SXFRCTL0) & ~SPIOEN);
ahc              3467 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgin_buf[ahc->msgin_index] = ahc_inb(ahc, SCSIDATL);
ahc              3468 drivers/scsi/aic7xxx/aic7xxx_core.c 		msgdone = ahc_parse_msg(ahc, &devinfo);
ahc              3479 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgin_index++;
ahc              3486 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgin_index = 0;
ahc              3492 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgout_len != 0) {
ahc              3493 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SCSISIGO, P_MESGIN | BSYO);
ahc              3494 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, SXFRCTL0,
ahc              3495 drivers/scsi/aic7xxx/aic7xxx_core.c 					 ahc_inb(ahc, SXFRCTL0) | SPIOEN);
ahc              3496 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msg_type = MSG_TYPE_TARGET_MSGIN;
ahc              3497 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgin_index = 0;
ahc              3506 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SXFRCTL0,
ahc              3507 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SXFRCTL0) | SPIOEN);
ahc              3517 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_clear_msg_state(ahc);
ahc              3518 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, RETURN_1, EXIT_MSG_LOOP);
ahc              3520 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, RETURN_1, CONT_MSG_LOOP);
ahc              3530 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_sent_msg(struct ahc_softc *ahc, ahc_msgtype type, u_int msgval, int full)
ahc              3538 drivers/scsi/aic7xxx/aic7xxx_core.c 	while (index < ahc->msgout_len) {
ahc              3539 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msgout_buf[index] == MSG_EXTENDED) {
ahc              3542 drivers/scsi/aic7xxx/aic7xxx_core.c 			end_index = index + 1 + ahc->msgout_buf[index + 1];
ahc              3543 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgout_buf[index+2] == msgval
ahc              3547 drivers/scsi/aic7xxx/aic7xxx_core.c 					if (ahc->msgout_index > end_index)
ahc              3549 drivers/scsi/aic7xxx/aic7xxx_core.c 				} else if (ahc->msgout_index > index)
ahc              3553 drivers/scsi/aic7xxx/aic7xxx_core.c 		} else if (ahc->msgout_buf[index] >= MSG_SIMPLE_TASK
ahc              3554 drivers/scsi/aic7xxx/aic7xxx_core.c 			&& ahc->msgout_buf[index] <= MSG_IGN_WIDE_RESIDUE) {
ahc              3561 drivers/scsi/aic7xxx/aic7xxx_core.c 			 && ahc->msgout_buf[index] == msgval
ahc              3562 drivers/scsi/aic7xxx/aic7xxx_core.c 			 && ahc->msgout_index > index)
ahc              3577 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              3589 drivers/scsi/aic7xxx/aic7xxx_core.c 	tinfo = ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid,
ahc              3604 drivers/scsi/aic7xxx/aic7xxx_core.c 	switch (ahc->msgin_buf[0]) {
ahc              3617 drivers/scsi/aic7xxx/aic7xxx_core.c 		response = ahc_handle_msg_reject(ahc, devinfo);
ahc              3625 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msgin_index < 2)
ahc              3627 drivers/scsi/aic7xxx/aic7xxx_core.c 		switch (ahc->msgin_buf[2]) {
ahc              3636 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_buf[1] != MSG_EXT_SDTR_LEN) {
ahc              3648 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_index < (MSG_EXT_SDTR_LEN + 1))
ahc              3651 drivers/scsi/aic7xxx/aic7xxx_core.c 			period = ahc->msgin_buf[3];
ahc              3653 drivers/scsi/aic7xxx/aic7xxx_core.c 			saved_offset = offset = ahc->msgin_buf[4];
ahc              3654 drivers/scsi/aic7xxx/aic7xxx_core.c 			syncrate = ahc_devlimited_syncrate(ahc, tinfo, &period,
ahc              3657 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_validate_offset(ahc, tinfo, syncrate, &offset,
ahc              3664 drivers/scsi/aic7xxx/aic7xxx_core.c 				       ahc_name(ahc), devinfo->channel,
ahc              3666 drivers/scsi/aic7xxx/aic7xxx_core.c 				       ahc->msgin_buf[3], saved_offset,
ahc              3669 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_syncrate(ahc, devinfo, 
ahc              3680 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_SDTR, TRUE)) {
ahc              3694 drivers/scsi/aic7xxx/aic7xxx_core.c 					       ahc_name(ahc), devinfo->channel,
ahc              3697 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3698 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_len = 0;
ahc              3699 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_construct_sdtr(ahc, devinfo,
ahc              3701 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3714 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_buf[1] != MSG_EXT_WDTR_LEN) {
ahc              3726 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_index < (MSG_EXT_WDTR_LEN + 1))
ahc              3729 drivers/scsi/aic7xxx/aic7xxx_core.c 			bus_width = ahc->msgin_buf[3];
ahc              3731 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_validate_width(ahc, tinfo, &bus_width,
ahc              3736 drivers/scsi/aic7xxx/aic7xxx_core.c 				       ahc_name(ahc), devinfo->channel,
ahc              3741 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_WDTR, TRUE)) {
ahc              3752 drivers/scsi/aic7xxx/aic7xxx_core.c 					       ahc_name(ahc), devinfo->channel,
ahc              3765 drivers/scsi/aic7xxx/aic7xxx_core.c 					       ahc_name(ahc), devinfo->channel,
ahc              3768 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3769 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_len = 0;
ahc              3770 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_construct_wdtr(ahc, devinfo, bus_width);
ahc              3771 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3784 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_update_neg_request(ahc, devinfo, tstate,
ahc              3786 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_width(ahc, devinfo, bus_width,
ahc              3794 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3795 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_len = 0;
ahc              3796 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_build_transfer_msg(ahc, devinfo);
ahc              3797 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3814 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_buf[1] != MSG_EXT_PPR_LEN) {
ahc              3826 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc->msgin_index < (MSG_EXT_PPR_LEN + 1))
ahc              3829 drivers/scsi/aic7xxx/aic7xxx_core.c 			period = ahc->msgin_buf[3];
ahc              3830 drivers/scsi/aic7xxx/aic7xxx_core.c 			offset = ahc->msgin_buf[5];
ahc              3831 drivers/scsi/aic7xxx/aic7xxx_core.c 			bus_width = ahc->msgin_buf[6];
ahc              3833 drivers/scsi/aic7xxx/aic7xxx_core.c 			ppr_options = ahc->msgin_buf[7];
ahc              3854 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_validate_width(ahc, tinfo, &bus_width,
ahc              3856 drivers/scsi/aic7xxx/aic7xxx_core.c 			syncrate = ahc_devlimited_syncrate(ahc, tinfo, &period,
ahc              3859 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_validate_offset(ahc, tinfo, syncrate,
ahc              3863 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_PPR, TRUE)) {
ahc              3883 drivers/scsi/aic7xxx/aic7xxx_core.c 					       ahc_name(ahc), devinfo->channel,
ahc              3888 drivers/scsi/aic7xxx/aic7xxx_core.c 					       ahc_name(ahc), devinfo->channel,
ahc              3890 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3891 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_len = 0;
ahc              3892 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_construct_ppr(ahc, devinfo, period, offset,
ahc              3894 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->msgout_index = 0;
ahc              3902 drivers/scsi/aic7xxx/aic7xxx_core.c 				       ahc_name(ahc), devinfo->channel,
ahc              3904 drivers/scsi/aic7xxx/aic7xxx_core.c 				       saved_width, ahc->msgin_buf[3],
ahc              3908 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_width(ahc, devinfo, bus_width,
ahc              3911 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_syncrate(ahc, devinfo,
ahc              3928 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_handle_devreset(ahc, devinfo,
ahc              3932 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              3947 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->msgin_buf[0] == MSG_ABORT_TAG)
ahc              3948 drivers/scsi/aic7xxx/aic7xxx_core.c 			tag = ahc_inb(ahc, INITIATOR_TAG);
ahc              3949 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_abort_scbs(ahc, devinfo->target, devinfo->channel,
ahc              3953 drivers/scsi/aic7xxx/aic7xxx_core.c 		tstate = ahc->enabled_targets[devinfo->our_scsiid];
ahc              3959 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_queue_lstate_event(ahc, lstate,
ahc              3961 drivers/scsi/aic7xxx/aic7xxx_core.c 						       ahc->msgin_buf[0],
ahc              3963 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_send_lstate_events(ahc, lstate);
ahc              3966 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              3981 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_index = 0;
ahc              3982 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len = 1;
ahc              3983 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_buf[0] = MSG_MESSAGE_REJECT;
ahc              3990 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len = 0;
ahc              3999 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              4014 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, SCB_TAG);
ahc              4015 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc_lookup_scb(ahc, scb_index);
ahc              4016 drivers/scsi/aic7xxx/aic7xxx_core.c 	tinfo = ahc_fetch_transinfo(ahc, devinfo->channel,
ahc              4020 drivers/scsi/aic7xxx/aic7xxx_core.c 	last_msg = ahc_inb(ahc, LAST_MSG);
ahc              4022 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_PPR, /*full*/FALSE)) {
ahc              4030 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc), devinfo->channel,
ahc              4036 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_index = 0;
ahc              4037 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_len = 0;
ahc              4038 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_build_transfer_msg(ahc, devinfo);
ahc              4039 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->msgout_index = 0;
ahc              4041 drivers/scsi/aic7xxx/aic7xxx_core.c 	} else if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) {
ahc              4045 drivers/scsi/aic7xxx/aic7xxx_core.c 		       "8bit transfers\n", ahc_name(ahc),
ahc              4047 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_set_width(ahc, devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahc              4060 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_index = 0;
ahc              4061 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_len = 0;
ahc              4062 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_build_transfer_msg(ahc, devinfo);
ahc              4063 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->msgout_index = 0;
ahc              4066 drivers/scsi/aic7xxx/aic7xxx_core.c 	} else if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_SDTR, /*full*/FALSE)) {
ahc              4068 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_set_syncrate(ahc, devinfo, /*syncrate*/NULL, /*period*/0,
ahc              4074 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo->channel,
ahc              4084 drivers/scsi/aic7xxx/aic7xxx_core.c 			       "Performing non-tagged I/O\n", ahc_name(ahc),
ahc              4086 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_tags(ahc, scb->io_ctx, devinfo, AHC_QUEUE_NONE);
ahc              4091 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc_name(ahc), devinfo->channel, devinfo->target,
ahc              4094 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_tags(ahc, scb->io_ctx, devinfo, AHC_QUEUE_BASIC);
ahc              4102 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_CONTROL,
ahc              4103 drivers/scsi/aic7xxx/aic7xxx_core.c 			 ahc_inb(ahc, SCB_CONTROL) & mask);
ahc              4107 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, MSG_OUT, MSG_IDENTIFYFLAG);
ahc              4108 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_assert_atn(ahc);
ahc              4114 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_SCB_BTT) == 0) {
ahc              4118 drivers/scsi/aic7xxx/aic7xxx_core.c 			    &(ahc->untagged_queues[devinfo->target_offset]);
ahc              4122 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_busy_tcl(ahc, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
ahc              4130 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
ahc              4131 drivers/scsi/aic7xxx/aic7xxx_core.c 				   SCB_GET_CHANNEL(ahc, scb),
ahc              4140 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), devinfo->channel, devinfo->target,
ahc              4150 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_ign_wide_residue(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              4155 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, SCB_TAG);
ahc              4156 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc_lookup_scb(ahc, scb_index);
ahc              4161 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc_inb(ahc, SEQ_FLAGS) & DPHASE) == 0
ahc              4177 drivers/scsi/aic7xxx/aic7xxx_core.c 		sgptr = ahc_inb(ahc, SCB_RESIDUAL_SGPTR);
ahc              4179 drivers/scsi/aic7xxx/aic7xxx_core.c 		 && (ahc_inb(ahc, SCB_LUN) & SCB_XFERLEN_ODD) != 0) {
ahc              4193 drivers/scsi/aic7xxx/aic7xxx_core.c 			sgptr = ahc_inl(ahc, SCB_RESIDUAL_SGPTR);
ahc              4194 drivers/scsi/aic7xxx/aic7xxx_core.c 			data_cnt = ahc_inl(ahc, SCB_RESIDUAL_DATACNT);
ahc              4205 drivers/scsi/aic7xxx/aic7xxx_core.c 			data_addr = ahc_inl(ahc, SHADDR);
ahc              4239 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outl(ahc, SCB_RESIDUAL_SGPTR, sgptr);
ahc              4240 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outl(ahc, SCB_RESIDUAL_DATACNT, data_cnt);
ahc              4247 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCB_LUN,
ahc              4248 drivers/scsi/aic7xxx/aic7xxx_core.c 				 ahc_inb(ahc, SCB_LUN) ^ SCB_XFERLEN_ODD);
ahc              4259 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_reinitialize_dataptrs(struct ahc_softc *ahc)
ahc              4268 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, SCB_TAG);
ahc              4269 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb = ahc_lookup_scb(ahc, scb_index);
ahc              4270 drivers/scsi/aic7xxx/aic7xxx_core.c 	sgptr = (ahc_inb(ahc, SCB_RESIDUAL_SGPTR + 3) << 24)
ahc              4271 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, SCB_RESIDUAL_SGPTR + 2) << 16)
ahc              4272 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, SCB_RESIDUAL_SGPTR + 1) << 8)
ahc              4273 drivers/scsi/aic7xxx/aic7xxx_core.c 	      |	ahc_inb(ahc, SCB_RESIDUAL_SGPTR);
ahc              4281 drivers/scsi/aic7xxx/aic7xxx_core.c 	resid = (ahc_inb(ahc, SCB_RESIDUAL_DATACNT + 2) << 16)
ahc              4282 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | (ahc_inb(ahc, SCB_RESIDUAL_DATACNT + 1) << 8)
ahc              4283 drivers/scsi/aic7xxx/aic7xxx_core.c 	      | ahc_inb(ahc, SCB_RESIDUAL_DATACNT);
ahc              4288 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) {
ahc              4291 drivers/scsi/aic7xxx/aic7xxx_core.c 		dscommand1 = ahc_inb(ahc, DSCOMMAND1);
ahc              4292 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, DSCOMMAND1, dscommand1 | HADDLDSEL0);
ahc              4293 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HADDR,
ahc              4295 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, DSCOMMAND1, dscommand1);
ahc              4297 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HADDR + 3, dataptr >> 24);
ahc              4298 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HADDR + 2, dataptr >> 16);
ahc              4299 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HADDR + 1, dataptr >> 8);
ahc              4300 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HADDR, dataptr);
ahc              4301 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNT + 2, resid >> 16);
ahc              4302 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNT + 1, resid >> 8);
ahc              4303 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNT, resid);
ahc              4304 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) == 0) {
ahc              4305 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, STCNT + 2, resid >> 16);
ahc              4306 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, STCNT + 1, resid >> 8);
ahc              4307 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, STCNT, resid);
ahc              4315 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_devreset(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              4324 drivers/scsi/aic7xxx/aic7xxx_core.c 	found = ahc_abort_scbs(ahc, devinfo->target, devinfo->channel,
ahc              4333 drivers/scsi/aic7xxx/aic7xxx_core.c 	tstate = ahc->enabled_targets[devinfo->our_scsiid];
ahc              4342 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_queue_lstate_event(ahc, lstate, devinfo->our_scsiid,
ahc              4344 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_send_lstate_events(ahc, lstate);
ahc              4352 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_set_width(ahc, devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahc              4354 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_set_syncrate(ahc, devinfo, /*syncrate*/NULL,
ahc              4359 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_send_async(ahc, devinfo->channel, devinfo->target,
ahc              4364 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%s: %s on %c:%d. %d SCBs aborted\n", ahc_name(ahc),
ahc              4370 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_setup_target_msgin(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
ahc              4379 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index = 0;
ahc              4380 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_len = 0;
ahc              4383 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_build_transfer_msg(ahc, devinfo);
ahc              4387 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msgout_index = 0;
ahc              4388 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->msg_type = MSG_TYPE_TARGET_MSGIN;
ahc              4399 drivers/scsi/aic7xxx/aic7xxx_core.c 	struct  ahc_softc *ahc;
ahc              4403 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc = kmalloc(sizeof(*ahc), GFP_ATOMIC);
ahc              4404 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (!ahc) {
ahc              4410 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc = device_get_softc((device_t)platform_arg);
ahc              4412 drivers/scsi/aic7xxx/aic7xxx_core.c 	memset(ahc, 0, sizeof(*ahc));
ahc              4413 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
ahc              4414 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->seep_config == NULL) {
ahc              4416 drivers/scsi/aic7xxx/aic7xxx_core.c 		kfree(ahc);
ahc              4421 drivers/scsi/aic7xxx/aic7xxx_core.c 	LIST_INIT(&ahc->pending_scbs);
ahc              4423 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->name = name;
ahc              4424 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->unit = -1;
ahc              4425 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->description = NULL;
ahc              4426 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->channel = 'A';
ahc              4427 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->channel_b = 'B';
ahc              4428 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->chip = AHC_NONE;
ahc              4429 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->features = AHC_FENONE;
ahc              4430 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->bugs = AHC_BUGNONE;
ahc              4431 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->flags = AHC_FNONE;
ahc              4437 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->seqctl = FASTMODE;
ahc              4440 drivers/scsi/aic7xxx/aic7xxx_core.c 		TAILQ_INIT(&ahc->untagged_queues[i]);
ahc              4441 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_platform_alloc(ahc, platform_arg) != 0) {
ahc              4442 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_free(ahc);
ahc              4443 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc = NULL;
ahc              4445 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (ahc);
ahc              4449 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_softc_init(struct ahc_softc *ahc)
ahc              4453 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->chip & AHC_PCI) == 0)
ahc              4454 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->unpause = ahc_inb(ahc, HCNTRL) & IRQMS;
ahc              4456 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->unpause = 0;
ahc              4457 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->pause = ahc->unpause | PAUSE; 
ahc              4459 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->scb_data == NULL) {
ahc              4460 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->scb_data = kzalloc(sizeof(*ahc->scb_data), GFP_ATOMIC);
ahc              4461 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->scb_data == NULL)
ahc              4469 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_set_unit(struct ahc_softc *ahc, int unit)
ahc              4471 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->unit = unit;
ahc              4475 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_set_name(struct ahc_softc *ahc, char *name)
ahc              4477 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->name != NULL)
ahc              4478 drivers/scsi/aic7xxx/aic7xxx_core.c 		kfree(ahc->name);
ahc              4479 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->name = name;
ahc              4483 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_free(struct ahc_softc *ahc)
ahc              4487 drivers/scsi/aic7xxx/aic7xxx_core.c 	switch (ahc->init_level) {
ahc              4490 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_shutdown(ahc);
ahc              4493 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_unload(ahc, ahc->shared_data_dmat,
ahc              4494 drivers/scsi/aic7xxx/aic7xxx_core.c 				  ahc->shared_data_dmamap);
ahc              4497 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamem_free(ahc, ahc->shared_data_dmat, ahc->qoutfifo,
ahc              4498 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->shared_data_dmamap);
ahc              4499 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_destroy(ahc, ahc->shared_data_dmat,
ahc              4500 drivers/scsi/aic7xxx/aic7xxx_core.c 				   ahc->shared_data_dmamap);
ahc              4503 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dma_tag_destroy(ahc, ahc->shared_data_dmat);
ahc              4510 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_platform_free(ahc);
ahc              4511 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_fini_scbdata(ahc);
ahc              4515 drivers/scsi/aic7xxx/aic7xxx_core.c 		tstate = ahc->enabled_targets[i];
ahc              4534 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->black_hole != NULL) {
ahc              4535 drivers/scsi/aic7xxx/aic7xxx_core.c 		xpt_free_path(ahc->black_hole->path);
ahc              4536 drivers/scsi/aic7xxx/aic7xxx_core.c 		kfree(ahc->black_hole);
ahc              4539 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->name != NULL)
ahc              4540 drivers/scsi/aic7xxx/aic7xxx_core.c 		kfree(ahc->name);
ahc              4541 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->seep_config != NULL)
ahc              4542 drivers/scsi/aic7xxx/aic7xxx_core.c 		kfree(ahc->seep_config);
ahc              4544 drivers/scsi/aic7xxx/aic7xxx_core.c 	kfree(ahc);
ahc              4552 drivers/scsi/aic7xxx/aic7xxx_core.c 	struct	ahc_softc *ahc;
ahc              4555 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc = (struct ahc_softc *)arg;
ahc              4558 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_reset(ahc, /*reinit*/FALSE);
ahc              4559 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISEQ, 0);
ahc              4560 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SXFRCTL0, 0);
ahc              4561 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, DSPCISTATUS, 0);
ahc              4564 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, i, 0);
ahc              4577 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_reset(struct ahc_softc *ahc, int reinit)
ahc              4589 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_pause(ahc);
ahc              4591 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->chip & AHC_CHIPID_MASK) == AHC_AIC7770) {
ahc              4598 drivers/scsi/aic7xxx/aic7xxx_core.c 		sblkctl = ahc_inb(ahc, SBLKCTL);
ahc              4599 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl | SELBUSB);
ahc              4600 drivers/scsi/aic7xxx/aic7xxx_core.c 		sxfrctl1_b = ahc_inb(ahc, SXFRCTL1);
ahc              4601 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl & ~SELBUSB);
ahc              4603 drivers/scsi/aic7xxx/aic7xxx_core.c 	sxfrctl1_a = ahc_inb(ahc, SXFRCTL1);
ahc              4605 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNTRL, CHIPRST | ahc->pause);
ahc              4616 drivers/scsi/aic7xxx/aic7xxx_core.c 	} while (--wait && !(ahc_inb(ahc, HCNTRL) & CHIPRSTACK));
ahc              4620 drivers/scsi/aic7xxx/aic7xxx_core.c 		       "Trying to initialize anyway.\n", ahc_name(ahc));
ahc              4622 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNTRL, ahc->pause);
ahc              4625 drivers/scsi/aic7xxx/aic7xxx_core.c 	sblkctl = ahc_inb(ahc, SBLKCTL) & (SELBUSB|SELWIDE);
ahc              4627 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->chip & AHC_PCI) != 0)
ahc              4635 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->features |= AHC_WIDE;
ahc              4639 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->features |= AHC_TWIN;
ahc              4654 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TWIN) != 0) {
ahc              4657 drivers/scsi/aic7xxx/aic7xxx_core.c 		sblkctl = ahc_inb(ahc, SBLKCTL);
ahc              4658 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl | SELBUSB);
ahc              4659 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SXFRCTL1, sxfrctl1_b);
ahc              4660 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl & ~SELBUSB);
ahc              4662 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SXFRCTL1, sxfrctl1_a);
ahc              4670 drivers/scsi/aic7xxx/aic7xxx_core.c 		error = ahc->bus_chip_init(ahc);
ahc              4673 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dumpseq(ahc);
ahc              4683 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_probe_scbs(struct ahc_softc *ahc) {
ahc              4688 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, i);
ahc              4689 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_BASE, i);
ahc              4690 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_inb(ahc, SCB_BASE) != i)
ahc              4692 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, 0);
ahc              4693 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_inb(ahc, SCB_BASE) != 0)
ahc              4709 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_build_free_scb_list(struct ahc_softc *ahc)
ahc              4715 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_LSCBS_ENABLED) != 0)
ahc              4718 drivers/scsi/aic7xxx/aic7xxx_core.c 	for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
ahc              4721 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, i);
ahc              4729 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCB_BASE+j, 0xFF);
ahc              4732 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_CONTROL, 0);
ahc              4735 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_PAGESCBS) != 0)
ahc              4736 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCB_NEXT, i+1);
ahc              4738 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCB_NEXT, SCB_LIST_NULL);
ahc              4741 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_TAG, SCB_LIST_NULL);
ahc              4742 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_SCSIID, 0xFF);
ahc              4743 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_LUN, 0xFF);
ahc              4746 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_PAGESCBS) != 0) {
ahc              4748 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, FREE_SCBH, 0);
ahc              4751 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, FREE_SCBH, SCB_LIST_NULL);
ahc              4755 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, i-1);
ahc              4756 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCB_NEXT, SCB_LIST_NULL);
ahc              4760 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_init_scbdata(struct ahc_softc *ahc)
ahc              4764 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_data = ahc->scb_data;
ahc              4776 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_data->maxhscbs = ahc_probe_scbs(ahc);
ahc              4777 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->scb_data->maxhscbs == 0) {
ahc              4778 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%s: No SCB space found\n", ahc_name(ahc));
ahc              4793 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
ahc              4808 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dmamem_alloc(ahc, scb_data->hscb_dmat,
ahc              4817 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_load(ahc, scb_data->hscb_dmat, scb_data->hscb_dmamap,
ahc              4825 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
ahc              4840 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dmamem_alloc(ahc, scb_data->sense_dmat,
ahc              4849 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_load(ahc, scb_data->sense_dmat, scb_data->sense_dmamap,
ahc              4857 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/8,
ahc              4873 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_alloc_scbs(ahc);
ahc              4878 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc));
ahc              4885 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->next_queued_scb = ahc_get_scb(ahc);
ahc              4898 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_fini_scbdata(struct ahc_softc *ahc)
ahc              4902 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_data = ahc->scb_data;
ahc              4914 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dmamap_unload(ahc, scb_data->sg_dmat,
ahc              4916 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dmamem_free(ahc, scb_data->sg_dmat,
ahc              4921 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
ahc              4925 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_unload(ahc, scb_data->sense_dmat,
ahc              4929 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense,
ahc              4931 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_destroy(ahc, scb_data->sense_dmat,
ahc              4935 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dma_tag_destroy(ahc, scb_data->sense_dmat);
ahc              4938 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_unload(ahc, scb_data->hscb_dmat,
ahc              4942 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs,
ahc              4944 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_destroy(ahc, scb_data->hscb_dmat,
ahc              4948 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat);
ahc              4958 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_alloc_scbs(struct ahc_softc *ahc)
ahc              4968 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_data = ahc->scb_data;
ahc              4981 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dmamem_alloc(ahc, scb_data->sg_dmat,
ahc              4990 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_load(ahc, scb_data->sg_dmat, sg_map->sg_dmamap,
ahc              5013 drivers/scsi/aic7xxx/aic7xxx_core.c 		next_scb->ahc_softc = ahc;
ahc              5016 drivers/scsi/aic7xxx/aic7xxx_core.c 		next_scb->hscb->tag = ahc->scb_data->numscbs;
ahc              5017 drivers/scsi/aic7xxx/aic7xxx_core.c 		SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs,
ahc              5022 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->scb_data->numscbs++;
ahc              5027 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_controller_info(struct ahc_softc *ahc, char *buf)
ahc              5031 drivers/scsi/aic7xxx/aic7xxx_core.c 	len = sprintf(buf, "%s: ", ahc_chip_names[ahc->chip & AHC_CHIPID_MASK]);
ahc              5033 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TWIN) != 0)
ahc              5036 drivers/scsi/aic7xxx/aic7xxx_core.c 			      ahc->our_id, ahc->our_id_b,
ahc              5037 drivers/scsi/aic7xxx/aic7xxx_core.c 			      (ahc->flags & AHC_PRIMARY_CHANNEL) + 'A');
ahc              5043 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA) != 0) {
ahc              5045 drivers/scsi/aic7xxx/aic7xxx_core.c 		} else if ((ahc->features & AHC_DT) != 0) {
ahc              5047 drivers/scsi/aic7xxx/aic7xxx_core.c 		} else if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              5050 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_WIDE) != 0) {
ahc              5056 drivers/scsi/aic7xxx/aic7xxx_core.c 			      speed, type, ahc->channel, ahc->our_id);
ahc              5060 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_PAGESCBS) != 0)
ahc              5062 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->scb_data->maxhscbs, AHC_MAX_QUEUE);
ahc              5064 drivers/scsi/aic7xxx/aic7xxx_core.c 		sprintf(buf, "%d SCBs", ahc->scb_data->maxhscbs);
ahc              5068 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_chip_init(struct ahc_softc *ahc)
ahc              5077 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQ_FLAGS, 0);
ahc              5078 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQ_FLAGS2, 0);
ahc              5081 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->features & AHC_TWIN) {
ahc              5086 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) | SELBUSB);
ahc              5087 drivers/scsi/aic7xxx/aic7xxx_core.c 		term = (ahc->flags & AHC_TERM_ENB_B) != 0 ? STPWEN : 0;
ahc              5088 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIID, ahc->our_id_b);
ahc              5089 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsi_conf = ahc_inb(ahc, SCSICONF + 1);
ahc              5090 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SXFRCTL1, (scsi_conf & (ENSPCHK|STIMESEL))
ahc              5091 drivers/scsi/aic7xxx/aic7xxx_core.c 					|term|ahc->seltime_b|ENSTIMER|ACTNEGEN);
ahc              5092 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0)
ahc              5093 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SIMODE0, ahc_inb(ahc, SIMODE0)|ENIOERR);
ahc              5094 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, ENSELTIMO|ENSCSIRST|ENSCSIPERR);
ahc              5095 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SXFRCTL0, DFON|SPIOEN);
ahc              5098 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~SELBUSB);
ahc              5100 drivers/scsi/aic7xxx/aic7xxx_core.c 	term = (ahc->flags & AHC_TERM_ENB_A) != 0 ? STPWEN : 0;
ahc              5101 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              5102 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIID_ULTRA2, ahc->our_id);
ahc              5104 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIID, ahc->our_id);
ahc              5105 drivers/scsi/aic7xxx/aic7xxx_core.c 	scsi_conf = ahc_inb(ahc, SCSICONF);
ahc              5106 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SXFRCTL1, (scsi_conf & (ENSPCHK|STIMESEL))
ahc              5107 drivers/scsi/aic7xxx/aic7xxx_core.c 				|term|ahc->seltime
ahc              5109 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              5110 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE0, ahc_inb(ahc, SIMODE0)|ENIOERR);
ahc              5111 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SIMODE1, ENSELTIMO|ENSCSIRST|ENSCSIPERR);
ahc              5112 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SXFRCTL0, DFON|SPIOEN);
ahc              5116 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unbusy_tcl(ahc, BUILD_TCL(i << 4, 0));
ahc              5117 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_SCB_BTT) != 0) {
ahc              5125 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_unbusy_tcl(ahc, BUILD_TCL(i << 4, lun));
ahc              5131 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qoutfifo[i] = SCB_LIST_NULL;
ahc              5132 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_qoutfifo(ahc, BUS_DMASYNC_PREREAD);
ahc              5135 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qinfifo[i] = SCB_LIST_NULL;
ahc              5137 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_MULTI_TID) != 0) {
ahc              5138 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, TARGID, 0);
ahc              5139 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, TARGID + 1, 0);
ahc              5145 drivers/scsi/aic7xxx/aic7xxx_core.c 	physaddr = ahc->scb_data->hscb_busaddr;
ahc              5146 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HSCB_ADDR, physaddr & 0xFF);
ahc              5147 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HSCB_ADDR + 1, (physaddr >> 8) & 0xFF);
ahc              5148 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HSCB_ADDR + 2, (physaddr >> 16) & 0xFF);
ahc              5149 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HSCB_ADDR + 3, (physaddr >> 24) & 0xFF);
ahc              5151 drivers/scsi/aic7xxx/aic7xxx_core.c 	physaddr = ahc->shared_data_busaddr;
ahc              5152 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SHARED_DATA_ADDR, physaddr & 0xFF);
ahc              5153 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SHARED_DATA_ADDR + 1, (physaddr >> 8) & 0xFF);
ahc              5154 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SHARED_DATA_ADDR + 2, (physaddr >> 16) & 0xFF);
ahc              5155 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SHARED_DATA_ADDR + 3, (physaddr >> 24) & 0xFF);
ahc              5162 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE, 5);
ahc              5163 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 1, 9);
ahc              5164 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 2, 9);
ahc              5165 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 3, 0);
ahc              5166 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 4, 15);
ahc              5167 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 5, 11);
ahc              5168 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 6, 0);
ahc              5169 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CMDSIZE_TABLE + 7, 0);
ahc              5171 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_HS_MAILBOX) != 0)
ahc              5172 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HS_MAILBOX, 0);
ahc              5175 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TARGETMODE) != 0) {
ahc              5176 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->tqinfifonext = 1;
ahc              5177 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, KERNEL_TQINPOS, ahc->tqinfifonext - 1);
ahc              5178 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, TQINPOS, ahc->tqinfifonext);
ahc              5180 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qinfifonext = 0;
ahc              5181 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qoutfifonext = 0;
ahc              5182 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc              5183 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, QOFF_CTLSTA, SCB_QSIZE_256);
ahc              5184 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
ahc              5185 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SNSCB_QOFF, ahc->qinfifonext);
ahc              5186 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SDSCB_QOFF, 0);
ahc              5188 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext);
ahc              5189 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, QINPOS, ahc->qinfifonext);
ahc              5190 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, QOUTPOS, ahc->qoutfifonext);
ahc              5194 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, WAITING_SCBH, SCB_LIST_NULL);
ahc              5197 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, DISCONNECTED_SCBH, SCB_LIST_NULL);
ahc              5200 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, MSG_OUT, MSG_NOOP);
ahc              5208 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_INITIATORROLE) != 0)
ahc              5210 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISEQ_TEMPLATE, scsiseq_template);
ahc              5213 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_build_free_scb_list(ahc);
ahc              5218 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, NEXT_QUEUED_SCB, ahc->next_queued_scb->hscb->tag);
ahc              5226 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc));
ahc              5228 drivers/scsi/aic7xxx/aic7xxx_core.c 	error = ahc_loadseq(ahc);
ahc              5232 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              5243 drivers/scsi/aic7xxx/aic7xxx_core.c 		     (ahc_inb(ahc, SBLKCTL) & (ENAB40|ENAB20)) == 0 && wait;
ahc              5247 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_restart(ahc);
ahc              5255 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_init(struct ahc_softc *ahc)
ahc              5267 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_SEQUENCER_DEBUG;
ahc              5276 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk (" 0x%x", ahc_inb(ahc, i));
ahc              5278 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_MORE_SRAM) != 0) {
ahc              5283 drivers/scsi/aic7xxx/aic7xxx_core.c 			printk (" 0x%x", ahc_inb(ahc, i));
ahc              5291 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              5292 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, CLRINT, CLRBRKADRINT);
ahc              5299 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_USEDEFAULTS) != 0)
ahc              5300 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->our_id = ahc->our_id_b = 7;
ahc              5305 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->flags |= AHC_INITIATORROLE;
ahc              5310 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) == 0)
ahc              5311 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->features &= ~AHC_TARGETMODE;
ahc              5313 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->init_level++;
ahc              5325 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TARGETMODE) != 0)
ahc              5328 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
ahc              5336 drivers/scsi/aic7xxx/aic7xxx_core.c 			       /*flags*/0, &ahc->shared_data_dmat) != 0) {
ahc              5340 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->init_level++;
ahc              5343 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_dmamem_alloc(ahc, ahc->shared_data_dmat,
ahc              5344 drivers/scsi/aic7xxx/aic7xxx_core.c 			     (void **)&ahc->qoutfifo,
ahc              5345 drivers/scsi/aic7xxx/aic7xxx_core.c 			     BUS_DMA_NOWAIT, &ahc->shared_data_dmamap) != 0) {
ahc              5349 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->init_level++;
ahc              5352 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dmamap_load(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap,
ahc              5353 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->qoutfifo, driver_data_size, ahc_dmamap_cb,
ahc              5354 drivers/scsi/aic7xxx/aic7xxx_core.c 			&ahc->shared_data_busaddr, /*flags*/0);
ahc              5356 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TARGETMODE) != 0) {
ahc              5357 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->targetcmds = (struct target_cmd *)ahc->qoutfifo;
ahc              5358 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qoutfifo = (uint8_t *)&ahc->targetcmds[AHC_TMODE_CMDS];
ahc              5359 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->dma_bug_buf = ahc->shared_data_busaddr
ahc              5363 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->targetcmds[i].cmd_valid = 0;
ahc              5364 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_sync_tqinfifo(ahc, BUS_DMASYNC_PREREAD);
ahc              5365 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qoutfifo = (uint8_t *)&ahc->targetcmds[256];
ahc              5367 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qinfifo = &ahc->qoutfifo[256];
ahc              5369 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->init_level++;
ahc              5372 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->scb_data->maxhscbs == 0)
ahc              5373 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_init_scbdata(ahc) != 0)
ahc              5381 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_alloc_tstate(ahc, ahc->our_id, 'A') == NULL) {
ahc              5383 drivers/scsi/aic7xxx/aic7xxx_core.c 		       "Failing attach\n", ahc_name(ahc));
ahc              5387 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TWIN) != 0) {
ahc              5388 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_alloc_tstate(ahc, ahc->our_id_b, 'B') == NULL) {
ahc              5390 drivers/scsi/aic7xxx/aic7xxx_core.c 			       "Failing attach\n", ahc_name(ahc));
ahc              5395 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->scb_data->maxhscbs < AHC_SCB_MAX_ALLOC) {
ahc              5396 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_PAGESCBS;
ahc              5398 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags &= ~AHC_PAGESCBS;
ahc              5405 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_name(ahc),
ahc              5416 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->features & AHC_TWIN) {
ahc              5417 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsi_conf = ahc_inb(ahc, SCSICONF + 1);
ahc              5419 drivers/scsi/aic7xxx/aic7xxx_core.c 		 && (ahc->flags & AHC_INITIATORROLE) != 0)
ahc              5420 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->flags |= AHC_RESET_BUS_B;
ahc              5423 drivers/scsi/aic7xxx/aic7xxx_core.c 	scsi_conf = ahc_inb(ahc, SCSICONF);
ahc              5425 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (ahc->flags & AHC_INITIATORROLE) != 0)
ahc              5426 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_RESET_BUS_A;
ahc              5432 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_USEDEFAULTS) != 0) {
ahc              5434 drivers/scsi/aic7xxx/aic7xxx_core.c 			"device parameters\n", ahc_name(ahc));
ahc              5435 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B|
ahc              5438 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA) != 0)
ahc              5441 drivers/scsi/aic7xxx/aic7xxx_core.c 		discenable = ~((ahc_inb(ahc, DISC_DSB + 1) << 8)
ahc              5442 drivers/scsi/aic7xxx/aic7xxx_core.c 			   | ahc_inb(ahc, DISC_DSB));
ahc              5443 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & (AHC_ULTRA|AHC_ULTRA2)) != 0)
ahc              5444 drivers/scsi/aic7xxx/aic7xxx_core.c 			ultraenb = (ahc_inb(ahc, ULTRA_ENB + 1) << 8)
ahc              5445 drivers/scsi/aic7xxx/aic7xxx_core.c 				      | ahc_inb(ahc, ULTRA_ENB);
ahc              5448 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & (AHC_WIDE|AHC_TWIN)) == 0)
ahc              5459 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc->our_id;
ahc              5461 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (i > 7 && (ahc->features & AHC_TWIN) != 0) {
ahc              5463 drivers/scsi/aic7xxx/aic7xxx_core.c 			our_id = ahc->our_id_b;
ahc              5466 drivers/scsi/aic7xxx/aic7xxx_core.c 		tinfo = ahc_fetch_transinfo(ahc, channel, our_id,
ahc              5470 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->flags & AHC_USEDEFAULTS) {
ahc              5471 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_WIDE) != 0)
ahc              5485 drivers/scsi/aic7xxx/aic7xxx_core.c 			scsirate = ahc_inb(ahc, TARG_SCSIRATE + i);
ahc              5487 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              5502 drivers/scsi/aic7xxx/aic7xxx_core.c 					offset = ahc_inb(ahc, TARG_OFFSET + i);
ahc              5507 drivers/scsi/aic7xxx/aic7xxx_core.c 				if ((ahc->features & AHC_DT) != 0)
ahc              5510 drivers/scsi/aic7xxx/aic7xxx_core.c 				    ahc_find_period(ahc, scsirate, maxsync);
ahc              5516 drivers/scsi/aic7xxx/aic7xxx_core.c 				 && (ahc->features & AHC_DT) != 0)
ahc              5527 drivers/scsi/aic7xxx/aic7xxx_core.c 				    ahc_find_period(ahc, scsirate,
ahc              5537 drivers/scsi/aic7xxx/aic7xxx_core.c 			 && (ahc->features & AHC_WIDE) != 0)
ahc              5540 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_DT) != 0)
ahc              5551 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->user_discenable = discenable;
ahc              5552 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->user_tagenable = tagenable;
ahc              5554 drivers/scsi/aic7xxx/aic7xxx_core.c 	return (ahc->bus_chip_init(ahc));
ahc              5558 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_intr_enable(struct ahc_softc *ahc, int enable)
ahc              5562 drivers/scsi/aic7xxx/aic7xxx_core.c 	hcntrl = ahc_inb(ahc, HCNTRL);
ahc              5564 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->pause &= ~INTEN;
ahc              5565 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->unpause &= ~INTEN;
ahc              5568 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->pause |= INTEN;
ahc              5569 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->unpause |= INTEN;
ahc              5571 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, HCNTRL, hcntrl);
ahc              5582 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_pause_and_flushwork(struct ahc_softc *ahc)
ahc              5589 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->flags |= AHC_ALL_INTERRUPTS;
ahc              5593 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unpause(ahc);
ahc              5600 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_intr(ahc);
ahc              5601 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              5603 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, ahc_inb(ahc, SCSISEQ) & ~ENSELO);
ahc              5604 drivers/scsi/aic7xxx/aic7xxx_core.c 		intstat = ahc_inb(ahc, INTSTAT);
ahc              5606 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_clear_critical_section(ahc);
ahc              5607 drivers/scsi/aic7xxx/aic7xxx_core.c 			intstat = ahc_inb(ahc, INTSTAT);
ahc              5610 drivers/scsi/aic7xxx/aic7xxx_core.c 	      && (intstat != 0xFF || (ahc->features & AHC_REMOVABLE) == 0)
ahc              5612 drivers/scsi/aic7xxx/aic7xxx_core.c 	       || (ahc_inb(ahc, SSTAT0) & (SELDO|SELINGO)) != 0));
ahc              5615 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_inb(ahc, INTSTAT));
ahc              5617 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_platform_flushwork(ahc);
ahc              5618 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->flags &= ~AHC_ALL_INTERRUPTS;
ahc              5623 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_suspend(struct ahc_softc *ahc)
ahc              5626 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_pause_and_flushwork(ahc);
ahc              5628 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (LIST_FIRST(&ahc->pending_scbs) != NULL) {
ahc              5629 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              5639 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->pending_device != NULL) {
ahc              5640 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              5644 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_shutdown(ahc);
ahc              5649 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_resume(struct ahc_softc *ahc)
ahc              5652 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_reset(ahc, /*reinit*/TRUE);
ahc              5653 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_intr_enable(ahc, TRUE); 
ahc              5654 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_restart(ahc);
ahc              5664 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl)
ahc              5669 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) != 0) {
ahc              5672 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              5673 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, TCL_LUN(tcl));
ahc              5674 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbid = ahc_inb(ahc, SCB_64_BTT + TCL_TARGET_OFFSET(tcl));
ahc              5675 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              5678 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbid = ahc_inb(ahc, BUSY_TARGETS + target_offset);
ahc              5685 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl)
ahc              5689 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) != 0) {
ahc              5692 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              5693 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, TCL_LUN(tcl));
ahc              5694 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_64_BTT+TCL_TARGET_OFFSET(tcl), SCB_LIST_NULL);
ahc              5695 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              5698 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, BUSY_TARGETS + target_offset, SCB_LIST_NULL);
ahc              5703 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_busy_tcl(struct ahc_softc *ahc, u_int tcl, u_int scbid)
ahc              5707 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) != 0) {
ahc              5710 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              5711 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, TCL_LUN(tcl));
ahc              5712 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_64_BTT + TCL_TARGET_OFFSET(tcl), scbid);
ahc              5713 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              5716 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, BUSY_TARGETS + target_offset, scbid);
ahc              5722 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
ahc              5725 drivers/scsi/aic7xxx/aic7xxx_core.c 	int targ = SCB_GET_TARGET(ahc, scb);
ahc              5726 drivers/scsi/aic7xxx/aic7xxx_core.c 	char chan = SCB_GET_CHANNEL(ahc, scb);
ahc              5758 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
ahc              5764 drivers/scsi/aic7xxx/aic7xxx_core.c 	target = SCB_GET_TARGET(ahc, scb);
ahc              5766 drivers/scsi/aic7xxx/aic7xxx_core.c 	channel = SCB_GET_CHANNEL(ahc, scb);
ahc              5768 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_search_qinfifo(ahc, target, channel, lun,
ahc              5772 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_platform_freeze_devq(ahc, scb);
ahc              5776 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, struct scb *scb)
ahc              5781 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_qinfifo_count(ahc) != 0) {
ahc              5785 drivers/scsi/aic7xxx/aic7xxx_core.c 		prev_pos = ahc->qinfifonext - 1;
ahc              5786 drivers/scsi/aic7xxx/aic7xxx_core.c 		prev_tag = ahc->qinfifo[prev_pos];
ahc              5787 drivers/scsi/aic7xxx/aic7xxx_core.c 		prev_scb = ahc_lookup_scb(ahc, prev_tag);
ahc              5789 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_qinfifo_requeue(ahc, prev_scb, scb);
ahc              5790 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc              5791 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
ahc              5793 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext);
ahc              5798 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_qinfifo_requeue(struct ahc_softc *ahc, struct scb *prev_scb,
ahc              5802 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
ahc              5805 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_sync_scb(ahc, prev_scb, 
ahc              5808 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
ahc              5809 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb->hscb->next = ahc->next_queued_scb->hscb->tag;
ahc              5810 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
ahc              5814 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_qinfifo_count(struct ahc_softc *ahc)
ahc              5819 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc              5820 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinpos = ahc_inb(ahc, SNSCB_QOFF);
ahc              5821 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SNSCB_QOFF, qinpos);
ahc              5823 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinpos = ahc_inb(ahc, QINPOS);
ahc              5824 drivers/scsi/aic7xxx/aic7xxx_core.c 	diff = ahc->qinfifonext - qinpos;
ahc              5829 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
ahc              5844 drivers/scsi/aic7xxx/aic7xxx_core.c 	qintail = ahc->qinfifonext;
ahc              5845 drivers/scsi/aic7xxx/aic7xxx_core.c 	have_qregs = (ahc->features & AHC_QUEUE_REGS) != 0;
ahc              5847 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinstart = ahc_inb(ahc, SNSCB_QOFF);
ahc              5848 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SNSCB_QOFF, qinstart);
ahc              5850 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinstart = ahc_inb(ahc, QINPOS);
ahc              5860 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_freeze_untagged_queues(ahc);
ahc              5867 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->qinfifonext = qinpos;
ahc              5868 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, NEXT_QUEUED_SCB, ahc->next_queued_scb->hscb->tag);
ahc              5871 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]);
ahc              5874 drivers/scsi/aic7xxx/aic7xxx_core.c 				qinpos, ahc->qinfifo[qinpos]);
ahc              5878 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_match_scb(ahc, scb, target, channel, lun, tag, role)) {
ahc              5897 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_done(ahc, scb);
ahc              5904 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_qinfifo_requeue(ahc, prev_scb, scb);
ahc              5909 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_qinfifo_requeue(ahc, prev_scb, scb);
ahc              5915 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc              5916 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext);
ahc              5918 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext);
ahc              5923 drivers/scsi/aic7xxx/aic7xxx_core.c 	 && (qinstart != ahc->qinfifonext)) {
ahc              5936 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]);
ahc              5940 drivers/scsi/aic7xxx/aic7xxx_core.c 				found, qinstart, ahc->qinfifonext);
ahc              5950 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->scb_data->scbindex[scb->hscb->tag] = NULL;
ahc              5951 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_swap_with_next_hscb(ahc, scb);
ahc              5953 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->qinfifo[qinstart] = scb->hscb->tag;
ahc              5956 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
ahc              5959 drivers/scsi/aic7xxx/aic7xxx_core.c 		qintail = ahc->qinfifonext - 1;
ahc              5960 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, ahc->qinfifo[qintail]);
ahc              5961 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb->hscb->next = ahc->next_queued_scb->hscb->tag;
ahc              5967 drivers/scsi/aic7xxx/aic7xxx_core.c 	curscbptr = ahc_inb(ahc, SCBPTR);
ahc              5968 drivers/scsi/aic7xxx/aic7xxx_core.c 	next = ahc_inb(ahc, WAITING_SCBH);  /* Start at head of list. */
ahc              5974 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, next);
ahc              5975 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_TAG);
ahc              5976 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (scb_index >= ahc->scb_data->numscbs) {
ahc              5979 drivers/scsi/aic7xxx/aic7xxx_core.c 			       scb_index, ahc->scb_data->numscbs);
ahc              5980 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              5983 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb = ahc_lookup_scb(ahc, scb_index);
ahc              5989 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_match_scb(ahc, scb, target, channel,
ahc              6010 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_done(ahc, scb);
ahc              6014 drivers/scsi/aic7xxx/aic7xxx_core.c 				next = ahc_rem_wscb(ahc, next, prev);
ahc              6018 drivers/scsi/aic7xxx/aic7xxx_core.c 				next = ahc_inb(ahc, SCB_NEXT);
ahc              6024 drivers/scsi/aic7xxx/aic7xxx_core.c 			next = ahc_inb(ahc, SCB_NEXT);
ahc              6027 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, curscbptr);
ahc              6029 drivers/scsi/aic7xxx/aic7xxx_core.c 	found += ahc_search_untagged_queues(ahc, /*ahc_io_ctx_t*/NULL, target,
ahc              6033 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_release_untagged_queues(ahc);
ahc              6038 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_search_untagged_queues(struct ahc_softc *ahc, ahc_io_ctx_t ctx,
ahc              6052 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_freeze_untagged_queues(ahc);
ahc              6057 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_SCB_BTT) == 0) {
ahc              6075 drivers/scsi/aic7xxx/aic7xxx_core.c 		untagged_q = &(ahc->untagged_queues[i]);
ahc              6094 drivers/scsi/aic7xxx/aic7xxx_core.c 			if (ahc_match_scb(ahc, scb, target, channel, lun,
ahc              6117 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_done(ahc, scb);
ahc              6131 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_release_untagged_queues(ahc);
ahc              6136 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_search_disc_list(struct ahc_softc *ahc, int target, char channel,
ahc              6147 drivers/scsi/aic7xxx/aic7xxx_core.c 	next = ahc_inb(ahc, DISCONNECTED_SCBH);
ahc              6152 drivers/scsi/aic7xxx/aic7xxx_core.c 		active_scb = ahc_inb(ahc, SCBPTR);
ahc              6160 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, next);
ahc              6161 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_TAG);
ahc              6162 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (scb_index >= ahc->scb_data->numscbs) {
ahc              6165 drivers/scsi/aic7xxx/aic7xxx_core.c 			       scb_index, ahc->scb_data->numscbs);
ahc              6166 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_dump_card_state(ahc);
ahc              6175 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbp = ahc_lookup_scb(ahc, scb_index);
ahc              6176 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_match_scb(ahc, scbp, target, channel, lun,
ahc              6181 drivers/scsi/aic7xxx/aic7xxx_core.c 				    ahc_rem_scb_from_disc_list(ahc, prev, next);
ahc              6184 drivers/scsi/aic7xxx/aic7xxx_core.c 				next = ahc_inb(ahc, SCB_NEXT);
ahc              6190 drivers/scsi/aic7xxx/aic7xxx_core.c 			next = ahc_inb(ahc, SCB_NEXT);
ahc              6194 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, active_scb);
ahc              6203 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_rem_scb_from_disc_list(struct ahc_softc *ahc, u_int prev, u_int scbptr)
ahc              6207 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, scbptr);
ahc              6208 drivers/scsi/aic7xxx/aic7xxx_core.c 	next = ahc_inb(ahc, SCB_NEXT);
ahc              6210 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCB_CONTROL, 0);
ahc              6212 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_add_curscb_to_free_list(ahc);
ahc              6215 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, prev);
ahc              6216 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_NEXT, next);
ahc              6218 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, DISCONNECTED_SCBH, next);
ahc              6229 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_add_curscb_to_free_list(struct ahc_softc *ahc)
ahc              6235 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCB_TAG, SCB_LIST_NULL);
ahc              6237 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_PAGESCBS) != 0) {
ahc              6238 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_NEXT, ahc_inb(ahc, FREE_SCBH));
ahc              6239 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, FREE_SCBH, ahc_inb(ahc, SCBPTR));
ahc              6248 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_rem_wscb(struct ahc_softc *ahc, u_int scbpos, u_int prev)
ahc              6256 drivers/scsi/aic7xxx/aic7xxx_core.c 	curscb = ahc_inb(ahc, SCBPTR);
ahc              6257 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, scbpos);
ahc              6258 drivers/scsi/aic7xxx/aic7xxx_core.c 	next = ahc_inb(ahc, SCB_NEXT);
ahc              6261 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCB_CONTROL, 0);
ahc              6263 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_add_curscb_to_free_list(ahc);
ahc              6268 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, WAITING_SCBH, next); 
ahc              6274 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, (ahc_inb(ahc, SCSISEQ) & ~ENSELO));
ahc              6280 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, prev);
ahc              6281 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCB_NEXT, next);
ahc              6287 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, curscb);
ahc              6299 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_abort_scbs(struct ahc_softc *ahc, int target, char channel,
ahc              6316 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_freeze_untagged_queues(ahc);
ahc              6319 drivers/scsi/aic7xxx/aic7xxx_core.c 	active_scb = ahc_inb(ahc, SCBPTR);
ahc              6321 drivers/scsi/aic7xxx/aic7xxx_core.c 	found = ahc_search_qinfifo(ahc, target, channel, lun, SCB_LIST_NULL,
ahc              6346 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_SCB_BTT) != 0)
ahc              6360 drivers/scsi/aic7xxx/aic7xxx_core.c 				scbid = ahc_index_busy_tcl(ahc, tcl);
ahc              6361 drivers/scsi/aic7xxx/aic7xxx_core.c 				scbp = ahc_lookup_scb(ahc, scbid);
ahc              6363 drivers/scsi/aic7xxx/aic7xxx_core.c 				 || ahc_match_scb(ahc, scbp, target, channel,
ahc              6366 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_unbusy_tcl(ahc, BUILD_TCL(i << 4, j));
ahc              6376 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_search_disc_list(ahc, target, channel, lun, tag,
ahc              6388 drivers/scsi/aic7xxx/aic7xxx_core.c 	for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
ahc              6391 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, i);
ahc              6392 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbid = ahc_inb(ahc, SCB_TAG);
ahc              6393 drivers/scsi/aic7xxx/aic7xxx_core.c 		scbp = ahc_lookup_scb(ahc, scbid);
ahc              6396 drivers/scsi/aic7xxx/aic7xxx_core.c 		  && ahc_match_scb(ahc, scbp, target, channel, lun, tag, role)))
ahc              6397 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_add_curscb_to_free_list(ahc);
ahc              6406 drivers/scsi/aic7xxx/aic7xxx_core.c 	scbp_next = LIST_FIRST(&ahc->pending_scbs);
ahc              6410 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_match_scb(ahc, scbp, target, channel, lun, tag, role)) {
ahc              6420 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_done(ahc, scbp);
ahc              6424 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, active_scb);
ahc              6425 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_platform_abort_scbs(ahc, target, channel, lun, tag, role, status);
ahc              6426 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_release_untagged_queues(ahc);
ahc              6431 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_reset_current_bus(struct ahc_softc *ahc)
ahc              6435 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENSCSIRST);
ahc              6436 drivers/scsi/aic7xxx/aic7xxx_core.c 	scsiseq = ahc_inb(ahc, SCSISEQ);
ahc              6437 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISEQ, scsiseq | SCSIRSTO);
ahc              6438 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_flush_device_writes(ahc);
ahc              6441 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCSISEQ, scsiseq & ~SCSIRSTO);
ahc              6443 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_clear_intstat(ahc);
ahc              6446 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) | ENSCSIRST);
ahc              6450 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_reset_channel(struct ahc_softc *ahc, char channel, int initiate_reset)
ahc              6461 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->pending_device = NULL;
ahc              6468 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_pause(ahc);
ahc              6471 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_clear_critical_section(ahc);
ahc              6478 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_run_qoutfifo(ahc);
ahc              6490 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_TARGETROLE) != 0) {
ahc              6491 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_run_tqinfifo(ahc, /*paused*/TRUE);
ahc              6498 drivers/scsi/aic7xxx/aic7xxx_core.c 	sblkctl = ahc_inb(ahc, SBLKCTL);
ahc              6500 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TWIN) != 0
ahc              6503 drivers/scsi/aic7xxx/aic7xxx_core.c 	scsiseq = ahc_inb(ahc, SCSISEQ_TEMPLATE);
ahc              6509 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl ^ SELBUSB);
ahc              6510 drivers/scsi/aic7xxx/aic7xxx_core.c 		simode1 = ahc_inb(ahc, SIMODE1) & ~(ENBUSFREE|ENSCSIRST);
ahc              6517 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_TARGETROLE) != 0)
ahc              6520 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, simode1);
ahc              6522 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_reset_current_bus(ahc);
ahc              6523 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_clear_intstat(ahc);
ahc              6524 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, scsiseq & (ENSELI|ENRSELI|ENAUTOATNP));
ahc              6525 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SBLKCTL, sblkctl);
ahc              6529 drivers/scsi/aic7xxx/aic7xxx_core.c 		simode1 = ahc_inb(ahc, SIMODE1) & ~(ENBUSFREE|ENSCSIRST);
ahc              6536 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_TARGETROLE) != 0)
ahc              6539 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SIMODE1, simode1);
ahc              6541 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_reset_current_bus(ahc);
ahc              6542 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_clear_intstat(ahc);
ahc              6543 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSISEQ, scsiseq & (ENSELI|ENRSELI|ENAUTOATNP));
ahc              6551 drivers/scsi/aic7xxx/aic7xxx_core.c 	found = ahc_abort_scbs(ahc, CAM_TARGET_WILDCARD, channel,
ahc              6555 drivers/scsi/aic7xxx/aic7xxx_core.c 	max_scsiid = (ahc->features & AHC_WIDE) ? 15 : 7;
ahc              6566 drivers/scsi/aic7xxx/aic7xxx_core.c 		tstate = ahc->enabled_targets[target];
ahc              6576 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_queue_lstate_event(ahc, lstate, CAM_TARGET_WILDCARD,
ahc              6578 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_send_lstate_events(ahc, lstate);
ahc              6583 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_send_async(ahc, devinfo.channel, CAM_TARGET_WILDCARD,
ahc              6591 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->enabled_targets[target] == NULL)
ahc              6599 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahc              6601 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_set_syncrate(ahc, &devinfo, /*syncrate*/NULL,
ahc              6609 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              6611 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              6621 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
ahc              6696 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_print_path(ahc, scb);
ahc              6709 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_queue_lstate_event(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate,
ahc              6760 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_send_lstate_events(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate)
ahc              6796 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_dumpseq(struct ahc_softc* ahc)
ahc              6800 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE|LOADRAM);
ahc              6801 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR0, 0);
ahc              6802 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR1, 0);
ahc              6803 drivers/scsi/aic7xxx/aic7xxx_core.c 	for (i = 0; i < ahc->instruction_ram_size; i++) {
ahc              6806 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_insb(ahc, SEQRAM, ins_bytes, 4);
ahc              6816 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_loadseq(struct ahc_softc *ahc)
ahc              6841 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc->targetcmds != NULL)
ahc              6844 drivers/scsi/aic7xxx/aic7xxx_core.c 	download_consts[CACHESIZE_MASK] = ahc->pci_cachesize - 1;
ahc              6845 drivers/scsi/aic7xxx/aic7xxx_core.c 	download_consts[INVERTED_CACHESIZE_MASK] = ~(ahc->pci_cachesize - 1);
ahc              6846 drivers/scsi/aic7xxx/aic7xxx_core.c 	sg_prefetch_cnt = ahc->pci_cachesize;
ahc              6856 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE|LOADRAM);
ahc              6857 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR0, 0);
ahc              6858 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQADDR1, 0);
ahc              6861 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_check_patch(ahc, &cur_patch, i, &skip_addr) == 0) {
ahc              6869 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (downloaded == ahc->instruction_ram_size) {
ahc              6876 drivers/scsi/aic7xxx/aic7xxx_core.c 			       "size of %d!\n", ahc_name(ahc),
ahc              6877 drivers/scsi/aic7xxx/aic7xxx_core.c 			       ahc->instruction_ram_size);
ahc              6902 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_download_instr(ahc, i, download_consts);
ahc              6906 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc->num_critical_sections = cs_count;
ahc              6910 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->critical_sections = kmalloc(cs_count, GFP_ATOMIC);
ahc              6911 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->critical_sections == NULL)
ahc              6913 drivers/scsi/aic7xxx/aic7xxx_core.c 		memcpy(ahc->critical_sections, cs_table, cs_count);
ahc              6915 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE);
ahc              6920 drivers/scsi/aic7xxx/aic7xxx_core.c 		       ahc_name(ahc), ahc->features, ahc->bugs, ahc->flags);
ahc              6926 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch,
ahc              6939 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (cur_patch->patch_func(ahc) == 0) {
ahc              6962 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
ahc              7003 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_check_patch(ahc, &cur_patch, i, &skip_addr);
ahc              7029 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_CMD_CHAN) == 0
ahc              7040 drivers/scsi/aic7xxx/aic7xxx_core.c 				      ahc_name(ahc));
ahc              7046 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              7078 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outsb(ahc, SEQRAM, instr.bytes, 4);
ahc              7135 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_dump_card_state(struct ahc_softc *ahc)
ahc              7151 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (ahc_is_paused(ahc)) {
ahc              7155 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              7158 drivers/scsi/aic7xxx/aic7xxx_core.c 	saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              7159 drivers/scsi/aic7xxx/aic7xxx_core.c 	last_phase = ahc_inb(ahc, LASTPHASE);
ahc              7162 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_name(ahc), ahc_lookup_phase_entry(last_phase)->phasemsg,
ahc              7163 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
ahc              7167 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_inb(ahc, ACCUM), ahc_inb(ahc, SINDEX), ahc_inb(ahc, DINDEX),
ahc              7168 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_inb(ahc, ARG_2));
ahc              7169 drivers/scsi/aic7xxx/aic7xxx_core.c 	printk("HCNT = 0x%x SCBPTR = 0x%x\n", ahc_inb(ahc, HCNT),
ahc              7170 drivers/scsi/aic7xxx/aic7xxx_core.c 	       ahc_inb(ahc, SCBPTR));
ahc              7172 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_DT) != 0)
ahc              7173 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scsiphase_print(ahc_inb(ahc, SCSIPHASE), &cur_col, 50);
ahc              7174 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_scsisigi_print(ahc_inb(ahc, SCSISIGI), &cur_col, 50);
ahc              7175 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_error_print(ahc_inb(ahc, ERROR), &cur_col, 50);
ahc              7176 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_scsibusl_print(ahc_inb(ahc, SCSIBUSL), &cur_col, 50);
ahc              7177 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_lastphase_print(ahc_inb(ahc, LASTPHASE), &cur_col, 50);
ahc              7178 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_scsiseq_print(ahc_inb(ahc, SCSISEQ), &cur_col, 50);
ahc              7179 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sblkctl_print(ahc_inb(ahc, SBLKCTL), &cur_col, 50);
ahc              7180 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_scsirate_print(ahc_inb(ahc, SCSIRATE), &cur_col, 50);
ahc              7181 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_seqctl_print(ahc_inb(ahc, SEQCTL), &cur_col, 50);
ahc              7182 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_seq_flags_print(ahc_inb(ahc, SEQ_FLAGS), &cur_col, 50);
ahc              7183 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sstat0_print(ahc_inb(ahc, SSTAT0), &cur_col, 50);
ahc              7184 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sstat1_print(ahc_inb(ahc, SSTAT1), &cur_col, 50);
ahc              7185 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sstat2_print(ahc_inb(ahc, SSTAT2), &cur_col, 50);
ahc              7186 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sstat3_print(ahc_inb(ahc, SSTAT3), &cur_col, 50);
ahc              7187 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_simode0_print(ahc_inb(ahc, SIMODE0), &cur_col, 50);
ahc              7188 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_simode1_print(ahc_inb(ahc, SIMODE1), &cur_col, 50);
ahc              7189 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sxfrctl0_print(ahc_inb(ahc, SXFRCTL0), &cur_col, 50);
ahc              7190 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dfcntrl_print(ahc_inb(ahc, DFCNTRL), &cur_col, 50);
ahc              7191 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_dfstatus_print(ahc_inb(ahc, DFSTATUS), &cur_col, 50);
ahc              7196 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8));
ahc              7197 drivers/scsi/aic7xxx/aic7xxx_core.c 	printk("\nSCB count = %d\n", ahc->scb_data->numscbs);
ahc              7198 drivers/scsi/aic7xxx/aic7xxx_core.c 	printk("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
ahc              7199 drivers/scsi/aic7xxx/aic7xxx_core.c 	printk("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
ahc              7202 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
ahc              7203 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinpos = ahc_inb(ahc, SNSCB_QOFF);
ahc              7204 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SNSCB_QOFF, qinpos);
ahc              7206 drivers/scsi/aic7xxx/aic7xxx_core.c 		qinpos = ahc_inb(ahc, QINPOS);
ahc              7207 drivers/scsi/aic7xxx/aic7xxx_core.c 	qintail = ahc->qinfifonext;
ahc              7209 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%d ", ahc->qinfifo[qinpos]);
ahc              7215 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, WAITING_SCBH);
ahc              7218 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, scb_index);
ahc              7219 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
ahc              7220 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_NEXT);
ahc              7225 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, DISCONNECTED_SCBH);
ahc              7228 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, scb_index);
ahc              7229 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
ahc              7230 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_NEXT);
ahc              7234 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
ahc              7236 drivers/scsi/aic7xxx/aic7xxx_core.c 	qoutpos = ahc->qoutfifonext;
ahc              7238 drivers/scsi/aic7xxx/aic7xxx_core.c 	while (ahc->qoutfifo[qoutpos] != SCB_LIST_NULL && i++ < 256) {
ahc              7239 drivers/scsi/aic7xxx/aic7xxx_core.c 		printk("%d ", ahc->qoutfifo[qoutpos]);
ahc              7245 drivers/scsi/aic7xxx/aic7xxx_core.c 	scb_index = ahc_inb(ahc, FREE_SCBH);
ahc              7248 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, scb_index);
ahc              7250 drivers/scsi/aic7xxx/aic7xxx_core.c 		scb_index = ahc_inb(ahc, SCB_NEXT);
ahc              7255 drivers/scsi/aic7xxx/aic7xxx_core.c 	for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
ahc              7256 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCBPTR, i);
ahc              7259 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL), &cur_col, 60);
ahc              7260 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scb_scsiid_print(ahc_inb(ahc, SCB_SCSIID), &cur_col, 60);
ahc              7261 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scb_lun_print(ahc_inb(ahc, SCB_LUN), &cur_col, 60);
ahc              7262 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60);
ahc              7268 drivers/scsi/aic7xxx/aic7xxx_core.c 	LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
ahc              7275 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->flags & AHC_PAGESCBS) == 0) {
ahc              7276 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCBPTR, scb->hscb->tag);
ahc              7278 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL),
ahc              7280 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60);
ahc              7288 drivers/scsi/aic7xxx/aic7xxx_core.c 	SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) {
ahc              7295 drivers/scsi/aic7xxx/aic7xxx_core.c 	maxtarget = (ahc->features & (AHC_WIDE|AHC_TWIN)) ? 15 : 7;
ahc              7297 drivers/scsi/aic7xxx/aic7xxx_core.c 		untagged_q = &ahc->untagged_queues[target];
ahc              7311 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              7313 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              7319 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb,
ahc              7325 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_TARGETMODE) == 0)
ahc              7335 drivers/scsi/aic7xxx/aic7xxx_core.c 		*lstate = ahc->black_hole;
ahc              7339 drivers/scsi/aic7xxx/aic7xxx_core.c 		max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
ahc              7346 drivers/scsi/aic7xxx/aic7xxx_core.c 		*tstate = ahc->enabled_targets[ccb->ccb_h.target_id];
ahc              7360 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
ahc              7374 drivers/scsi/aic7xxx/aic7xxx_core.c 	status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate, &lstate,
ahc              7383 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc->our_id;
ahc              7385 drivers/scsi/aic7xxx/aic7xxx_core.c 		our_id = ahc->our_id_b;
ahc              7407 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_MULTIROLE) != 0) {
ahc              7409 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_MULTI_TID) != 0
ahc              7410 drivers/scsi/aic7xxx/aic7xxx_core.c 		   	 && (ahc->flags & AHC_INITIATORROLE) != 0) {
ahc              7419 drivers/scsi/aic7xxx/aic7xxx_core.c 			} else if ((ahc->flags & AHC_INITIATORROLE) != 0
ahc              7420 drivers/scsi/aic7xxx/aic7xxx_core.c 				|| ahc->enabled_luns > 0) {
ahc              7430 drivers/scsi/aic7xxx/aic7xxx_core.c 		} else if ((ahc->features & AHC_MULTI_TID) == 0
ahc              7431 drivers/scsi/aic7xxx/aic7xxx_core.c 			&& ahc->enabled_luns > 0) {
ahc              7446 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->flags & AHC_TARGETROLE) == 0
ahc              7452 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_lock(ahc, &s);
ahc              7453 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (LIST_FIRST(&ahc->pending_scbs) != NULL) {
ahc              7455 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unlock(ahc, &s);
ahc              7458 drivers/scsi/aic7xxx/aic7xxx_core.c 		saved_flags = ahc->flags;
ahc              7459 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_TARGETROLE;
ahc              7460 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->features & AHC_MULTIROLE) == 0)
ahc              7461 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->flags &= ~AHC_INITIATORROLE;
ahc              7462 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              7463 drivers/scsi/aic7xxx/aic7xxx_core.c 		error = ahc_loadseq(ahc);
ahc              7473 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->flags = saved_flags;
ahc              7474 drivers/scsi/aic7xxx/aic7xxx_core.c 			(void)ahc_loadseq(ahc);
ahc              7475 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_restart(ahc);
ahc              7476 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unlock(ahc, &s);
ahc              7480 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_restart(ahc);
ahc              7481 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unlock(ahc, &s);
ahc              7486 drivers/scsi/aic7xxx/aic7xxx_core.c 	channel = SIM_CHANNEL(ahc, sim);
ahc              7518 drivers/scsi/aic7xxx/aic7xxx_core.c 			tstate = ahc_alloc_tstate(ahc, target, channel);
ahc              7546 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_lock(ahc, &s);
ahc              7547 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              7550 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->enabled_luns++;
ahc              7552 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_MULTI_TID) != 0) {
ahc              7555 drivers/scsi/aic7xxx/aic7xxx_core.c 				targid_mask = ahc_inb(ahc, TARGID)
ahc              7556 drivers/scsi/aic7xxx/aic7xxx_core.c 					    | (ahc_inb(ahc, TARGID + 1) << 8);
ahc              7559 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, TARGID, targid_mask);
ahc              7560 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, TARGID+1, (targid_mask >> 8));
ahc              7562 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_update_scsiid(ahc, targid_mask);
ahc              7567 drivers/scsi/aic7xxx/aic7xxx_core.c 				channel = SIM_CHANNEL(ahc, sim);
ahc              7568 drivers/scsi/aic7xxx/aic7xxx_core.c 				our_id = SIM_SCSI_ID(ahc, sim);
ahc              7579 drivers/scsi/aic7xxx/aic7xxx_core.c 					sblkctl = ahc_inb(ahc, SBLKCTL);
ahc              7582 drivers/scsi/aic7xxx/aic7xxx_core.c 					if ((ahc->features & AHC_TWIN) == 0)
ahc              7586 drivers/scsi/aic7xxx/aic7xxx_core.c 						ahc->our_id = target;
ahc              7588 drivers/scsi/aic7xxx/aic7xxx_core.c 						ahc->our_id_b = target;
ahc              7591 drivers/scsi/aic7xxx/aic7xxx_core.c 						ahc_outb(ahc, SBLKCTL,
ahc              7594 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_outb(ahc, SCSIID, target);
ahc              7597 drivers/scsi/aic7xxx/aic7xxx_core.c 						ahc_outb(ahc, SBLKCTL, sblkctl);
ahc              7601 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->black_hole = lstate;
ahc              7603 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->black_hole != NULL && ahc->enabled_luns > 0) {
ahc              7604 drivers/scsi/aic7xxx/aic7xxx_core.c 			scsiseq = ahc_inb(ahc, SCSISEQ_TEMPLATE);
ahc              7606 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSISEQ_TEMPLATE, scsiseq);
ahc              7607 drivers/scsi/aic7xxx/aic7xxx_core.c 			scsiseq = ahc_inb(ahc, SCSISEQ);
ahc              7609 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSISEQ, scsiseq);
ahc              7611 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              7612 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unlock(ahc, &s);
ahc              7625 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_lock(ahc, &s);
ahc              7628 drivers/scsi/aic7xxx/aic7xxx_core.c 		LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
ahc              7636 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_unlock(ahc, &s);
ahc              7652 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_unlock(ahc, &s);
ahc              7661 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_pause(ahc);
ahc              7665 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->enabled_luns--;
ahc              7673 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_free_tstate(ahc, target, channel,
ahc              7675 drivers/scsi/aic7xxx/aic7xxx_core.c 				if (ahc->features & AHC_MULTI_TID) {
ahc              7678 drivers/scsi/aic7xxx/aic7xxx_core.c 					targid_mask = ahc_inb(ahc, TARGID)
ahc              7679 drivers/scsi/aic7xxx/aic7xxx_core.c 						    | (ahc_inb(ahc, TARGID + 1)
ahc              7683 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_outb(ahc, TARGID, targid_mask);
ahc              7684 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_outb(ahc, TARGID+1,
ahc              7686 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_update_scsiid(ahc, targid_mask);
ahc              7691 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc->black_hole = NULL;
ahc              7699 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc->enabled_luns == 0) {
ahc              7703 drivers/scsi/aic7xxx/aic7xxx_core.c 			scsiseq = ahc_inb(ahc, SCSISEQ_TEMPLATE);
ahc              7705 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSISEQ_TEMPLATE, scsiseq);
ahc              7706 drivers/scsi/aic7xxx/aic7xxx_core.c 			scsiseq = ahc_inb(ahc, SCSISEQ);
ahc              7708 drivers/scsi/aic7xxx/aic7xxx_core.c 			ahc_outb(ahc, SCSISEQ, scsiseq);
ahc              7710 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_MULTIROLE) == 0) {
ahc              7712 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->flags &= ~AHC_TARGETROLE;
ahc              7713 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->flags |= AHC_INITIATORROLE;
ahc              7718 drivers/scsi/aic7xxx/aic7xxx_core.c 				(void)ahc_loadseq(ahc);
ahc              7719 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_restart(ahc);
ahc              7726 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unpause(ahc);
ahc              7727 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_unlock(ahc, &s);
ahc              7732 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_update_scsiid(struct ahc_softc *ahc, u_int targid_mask)
ahc              7737 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_MULTI_TID) == 0)
ahc              7746 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              7747 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsiid = ahc_inb(ahc, SCSIID_ULTRA2);
ahc              7749 drivers/scsi/aic7xxx/aic7xxx_core.c 		scsiid = ahc_inb(ahc, SCSIID);
ahc              7757 drivers/scsi/aic7xxx/aic7xxx_core.c 			our_id = ahc->our_id;
ahc              7763 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              7764 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIID_ULTRA2, scsiid);
ahc              7766 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_outb(ahc, SCSIID, scsiid);
ahc              7770 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_run_tqinfifo(struct ahc_softc *ahc, int paused)
ahc              7779 drivers/scsi/aic7xxx/aic7xxx_core.c 	if ((ahc->features & AHC_AUTOPAUSE) != 0)
ahc              7782 drivers/scsi/aic7xxx/aic7xxx_core.c 	ahc_sync_tqinfifo(ahc, BUS_DMASYNC_POSTREAD);
ahc              7783 drivers/scsi/aic7xxx/aic7xxx_core.c 	while ((cmd = &ahc->targetcmds[ahc->tqinfifonext])->cmd_valid != 0) {
ahc              7789 drivers/scsi/aic7xxx/aic7xxx_core.c 		if (ahc_handle_target_cmd(ahc, cmd) != 0)
ahc              7793 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc_dmamap_sync(ahc, ahc->shared_data_dmat,
ahc              7794 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc->shared_data_dmamap,
ahc              7795 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_targetcmd_offset(ahc, ahc->tqinfifonext),
ahc              7798 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->tqinfifonext++;
ahc              7804 drivers/scsi/aic7xxx/aic7xxx_core.c 		if ((ahc->tqinfifonext & (HOST_TQINPOS - 1)) == 1) {
ahc              7805 drivers/scsi/aic7xxx/aic7xxx_core.c 			if ((ahc->features & AHC_HS_MAILBOX) != 0) {
ahc              7808 drivers/scsi/aic7xxx/aic7xxx_core.c 				hs_mailbox = ahc_inb(ahc, HS_MAILBOX);
ahc              7810 drivers/scsi/aic7xxx/aic7xxx_core.c 				hs_mailbox |= ahc->tqinfifonext & HOST_TQINPOS;
ahc              7811 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, HS_MAILBOX, hs_mailbox);
ahc              7814 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_pause(ahc);	
ahc              7815 drivers/scsi/aic7xxx/aic7xxx_core.c 				ahc_outb(ahc, KERNEL_TQINPOS,
ahc              7816 drivers/scsi/aic7xxx/aic7xxx_core.c 					 ahc->tqinfifonext & HOST_TQINPOS);
ahc              7818 drivers/scsi/aic7xxx/aic7xxx_core.c 					ahc_unpause(ahc);
ahc              7825 drivers/scsi/aic7xxx/aic7xxx_core.c ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd)
ahc              7835 drivers/scsi/aic7xxx/aic7xxx_core.c 	initiator = SCSIID_TARGET(ahc, cmd->scsiid);
ahc              7840 drivers/scsi/aic7xxx/aic7xxx_core.c 	tstate = ahc->enabled_targets[target];
ahc              7849 drivers/scsi/aic7xxx/aic7xxx_core.c 		lstate = ahc->black_hole;
ahc              7853 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags |= AHC_TQINFIFO_BLOCKED;
ahc              7858 drivers/scsi/aic7xxx/aic7xxx_core.c 			printk("%s: ATIOs exhausted\n", ahc_name(ahc));
ahc              7861 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->flags &= ~AHC_TQINFIFO_BLOCKED;
ahc              7865 drivers/scsi/aic7xxx/aic7xxx_core.c 	       lstate == ahc->black_hole ? "(Black Holed)" : "");
ahc              7869 drivers/scsi/aic7xxx/aic7xxx_core.c 	if (lstate == ahc->black_hole) {
ahc              7927 drivers/scsi/aic7xxx/aic7xxx_core.c 		       initiator, target, lun, ahc->pending_device);
ahc              7929 drivers/scsi/aic7xxx/aic7xxx_core.c 		ahc->pending_device = lstate;
ahc                49 drivers/scsi/aic7xxx/aic7xxx_inline.h int  ahc_is_paused(struct ahc_softc *ahc);
ahc                50 drivers/scsi/aic7xxx/aic7xxx_inline.h void ahc_pause(struct ahc_softc *ahc);
ahc                51 drivers/scsi/aic7xxx/aic7xxx_inline.h void ahc_unpause(struct ahc_softc *ahc);
ahc                54 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_sync_sglist(struct ahc_softc *ahc,
ahc                58 drivers/scsi/aic7xxx/aic7xxx_inline.h static inline char *ahc_name(struct ahc_softc *ahc);
ahc                60 drivers/scsi/aic7xxx/aic7xxx_inline.h static inline char *ahc_name(struct ahc_softc *ahc)
ahc                62 drivers/scsi/aic7xxx/aic7xxx_inline.h 	return (ahc->name);
ahc                68 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_fetch_transinfo(struct ahc_softc *ahc,
ahc                73 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_inw(struct ahc_softc *ahc, u_int port);
ahc                74 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_outw(struct ahc_softc *ahc, u_int port,
ahc                77 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_inl(struct ahc_softc *ahc, u_int port);
ahc                78 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_outl(struct ahc_softc *ahc, u_int port,
ahc                81 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_inq(struct ahc_softc *ahc, u_int port);
ahc                82 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_outq(struct ahc_softc *ahc, u_int port,
ahc                85 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_get_scb(struct ahc_softc *ahc);
ahc                86 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_free_scb(struct ahc_softc *ahc, struct scb *scb);
ahc                88 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_lookup_scb(struct ahc_softc *ahc, u_int tag);
ahc                89 drivers/scsi/aic7xxx/aic7xxx_inline.h void	ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb);
ahc                91 drivers/scsi/aic7xxx/aic7xxx_inline.h 	ahc_get_sense_buf(struct ahc_softc *ahc,
ahc                95 drivers/scsi/aic7xxx/aic7xxx_inline.h int	ahc_intr(struct ahc_softc *ahc);
ahc               253 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
ahc               256 drivers/scsi/aic7xxx/aic7xxx_osm.c 	       ahc->platform_data->host->host_no,
ahc               257 drivers/scsi/aic7xxx/aic7xxx_osm.c 	       scb != NULL ? SCB_GET_CHANNEL(ahc, scb) : 'X',
ahc               258 drivers/scsi/aic7xxx/aic7xxx_osm.c 	       scb != NULL ? SCB_GET_TARGET(ahc, scb) : -1,
ahc               364 drivers/scsi/aic7xxx/aic7xxx_osm.c static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc,
ahc               366 drivers/scsi/aic7xxx/aic7xxx_osm.c static void ahc_linux_freeze_simq(struct ahc_softc *ahc);
ahc               367 drivers/scsi/aic7xxx/aic7xxx_osm.c static void ahc_linux_release_simq(struct ahc_softc *ahc);
ahc               369 drivers/scsi/aic7xxx/aic7xxx_osm.c static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
ahc               370 drivers/scsi/aic7xxx/aic7xxx_osm.c static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc,
ahc               399 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_inb(struct ahc_softc * ahc, long port)
ahc               403 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->tag == BUS_SPACE_MEMIO) {
ahc               404 drivers/scsi/aic7xxx/aic7xxx_osm.c 		x = readb(ahc->bsh.maddr + port);
ahc               406 drivers/scsi/aic7xxx/aic7xxx_osm.c 		x = inb(ahc->bsh.ioport + port);
ahc               413 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_outb(struct ahc_softc * ahc, long port, uint8_t val)
ahc               415 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->tag == BUS_SPACE_MEMIO) {
ahc               416 drivers/scsi/aic7xxx/aic7xxx_osm.c 		writeb(val, ahc->bsh.maddr + port);
ahc               418 drivers/scsi/aic7xxx/aic7xxx_osm.c 		outb(val, ahc->bsh.ioport + port);
ahc               424 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_outsb(struct ahc_softc * ahc, long port, uint8_t *array, int count)
ahc               434 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_outb(ahc, port, *array++);
ahc               438 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count)
ahc               448 drivers/scsi/aic7xxx/aic7xxx_osm.c 		*array++ = ahc_inb(ahc, port);
ahc               454 drivers/scsi/aic7xxx/aic7xxx_osm.c static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
ahc               459 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb)
ahc               464 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE);
ahc               470 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
ahc               484 drivers/scsi/aic7xxx/aic7xxx_osm.c 	 && (ahc->flags & AHC_39BIT_ADDRESSING) != 0)
ahc               500 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc;
ahc               503 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *(struct ahc_softc **)host->hostdata;
ahc               507 drivers/scsi/aic7xxx/aic7xxx_osm.c 	strcat(bp, ahc->description);
ahc               510 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_controller_info(ahc, ahc_info);
ahc               523 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	 ahc_softc *ahc;
ahc               528 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
ahc               530 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc               531 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data->qfrozen == 0) {
ahc               534 drivers/scsi/aic7xxx/aic7xxx_osm.c 		rtn = ahc_linux_run_command(ahc, dev, cmd);
ahc               536 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc               546 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	ahc_softc *ahc =
ahc               554 drivers/scsi/aic7xxx/aic7xxx_osm.c 	return &ahc->platform_data->starget[target_offset];
ahc               560 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	ahc_softc *ahc =
ahc               562 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct seeprom_config *sc = ahc->seep_config;
ahc               570 drivers/scsi/aic7xxx/aic7xxx_osm.c 	unsigned int our_id = ahc->our_id;
ahc               578 drivers/scsi/aic7xxx/aic7xxx_osm.c 		our_id = ahc->our_id_b;
ahc               580 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc               591 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->flags & AHC_NEWEEPROM_FMT) {
ahc               603 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc               614 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_find_period(ahc, scsirate, maxsync);
ahc               616 drivers/scsi/aic7xxx/aic7xxx_osm.c 		tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
ahc               622 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0,
ahc               624 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
ahc               626 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc               642 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	ahc_softc *ahc =
ahc               648 drivers/scsi/aic7xxx/aic7xxx_osm.c 		printk("%s: Slave Alloc %d\n", ahc_name(ahc), sdev->id);
ahc               674 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	ahc_softc *ahc;
ahc               676 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *((struct ahc_softc **)sdev->host->hostdata);
ahc               704 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	 ahc_softc *ahc;
ahc               707 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *((struct ahc_softc **)sdev->host->hostdata);
ahc               725 drivers/scsi/aic7xxx/aic7xxx_osm.c 		extended = (ahc->flags & AHC_EXTENDED_TRANS_A) != 0;
ahc               727 drivers/scsi/aic7xxx/aic7xxx_osm.c 		extended = (ahc->flags & AHC_EXTENDED_TRANS_B) != 0;
ahc               774 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc;
ahc               778 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
ahc               780 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc               781 drivers/scsi/aic7xxx/aic7xxx_osm.c 	found = ahc_reset_channel(ahc, scmd_channel(cmd) + 'A',
ahc               783 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc               787 drivers/scsi/aic7xxx/aic7xxx_osm.c 		       "%d SCBs aborted.\n", ahc_name(ahc), found);
ahc               819 drivers/scsi/aic7xxx/aic7xxx_osm.c #define BUILD_SCSIID(ahc, cmd)						    \
ahc               821 drivers/scsi/aic7xxx/aic7xxx_osm.c 	| (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
ahc               826 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent,
ahc               854 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dma_tag_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat)
ahc               860 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
ahc               864 drivers/scsi/aic7xxx/aic7xxx_osm.c 	*vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC);
ahc               871 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
ahc               874 drivers/scsi/aic7xxx/aic7xxx_osm.c 	dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map);
ahc               878 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dmamap_load(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map,
ahc               895 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dmamap_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
ahc               900 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_dmamap_unload(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
ahc              1086 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template)
ahc              1094 drivers/scsi/aic7xxx/aic7xxx_osm.c 	template->name = ahc->description;
ahc              1099 drivers/scsi/aic7xxx/aic7xxx_osm.c 	*((struct ahc_softc **)host->hostdata) = ahc;
ahc              1100 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->platform_data->host = host;
ahc              1104 drivers/scsi/aic7xxx/aic7xxx_osm.c 	host->this_id = ahc->our_id;
ahc              1105 drivers/scsi/aic7xxx/aic7xxx_osm.c 	host->irq = ahc->platform_data->irq;
ahc              1106 drivers/scsi/aic7xxx/aic7xxx_osm.c 	host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
ahc              1108 drivers/scsi/aic7xxx/aic7xxx_osm.c 	host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0;
ahc              1110 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &s);
ahc              1111 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_unit(ahc, ahc_linux_unit++);
ahc              1112 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &s);
ahc              1117 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_set_name(ahc, new_name);
ahc              1119 drivers/scsi/aic7xxx/aic7xxx_osm.c 	host->unique_id = ahc->unit;
ahc              1120 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_linux_initialize_scsi_bus(ahc);
ahc              1121 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_intr_enable(ahc, TRUE);
ahc              1125 drivers/scsi/aic7xxx/aic7xxx_osm.c 	retval = scsi_add_host(host, ahc->dev);
ahc              1142 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc)
ahc              1151 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &s);
ahc              1154 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc->flags &= ~(AHC_RESET_BUS_A|AHC_RESET_BUS_B);
ahc              1156 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if ((ahc->flags & AHC_RESET_BUS_A) != 0)
ahc              1157 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_reset_channel(ahc, 'A', /*initiate_reset*/TRUE);
ahc              1159 drivers/scsi/aic7xxx/aic7xxx_osm.c 		numtarg = (ahc->features & AHC_WIDE) ? 16 : 8;
ahc              1161 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if ((ahc->features & AHC_TWIN) != 0) {
ahc              1163 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if ((ahc->flags & AHC_RESET_BUS_B) != 0) {
ahc              1164 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_reset_channel(ahc, 'B', /*initiate_reset*/TRUE);
ahc              1185 drivers/scsi/aic7xxx/aic7xxx_osm.c 		our_id = ahc->our_id;
ahc              1187 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (i > 7 && (ahc->features & AHC_TWIN) != 0) {
ahc              1189 drivers/scsi/aic7xxx/aic7xxx_osm.c 			our_id = ahc->our_id_b;
ahc              1192 drivers/scsi/aic7xxx/aic7xxx_osm.c 		tinfo = ahc_fetch_transinfo(ahc, channel, our_id,
ahc              1196 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_update_neg_request(ahc, &devinfo, tstate,
ahc              1199 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &s);
ahc              1201 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if ((ahc->flags & (AHC_RESET_BUS_A|AHC_RESET_BUS_B)) != 0) {
ahc              1202 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_linux_freeze_simq(ahc);
ahc              1204 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_linux_release_simq(ahc);
ahc              1209 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
ahc              1212 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->platform_data =
ahc              1214 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data == NULL)
ahc              1216 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->platform_data->irq = AHC_LINUX_NOIRQ;
ahc              1217 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lockinit(ahc);
ahc              1218 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->seltime = (aic7xxx_seltime & 0x3) << 4;
ahc              1219 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->seltime_b = (aic7xxx_seltime & 0x3) << 4;
ahc              1221 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc->flags |= AHC_DISABLE_PCI_PERR;
ahc              1227 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_free(struct ahc_softc *ahc)
ahc              1232 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data != NULL) {
ahc              1235 drivers/scsi/aic7xxx/aic7xxx_osm.c 			starget = ahc->platform_data->starget[i];
ahc              1237 drivers/scsi/aic7xxx/aic7xxx_osm.c 				ahc->platform_data->starget[i] = NULL;
ahc              1241 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->platform_data->irq != AHC_LINUX_NOIRQ)
ahc              1242 drivers/scsi/aic7xxx/aic7xxx_osm.c 			free_irq(ahc->platform_data->irq, ahc);
ahc              1243 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->tag == BUS_SPACE_PIO
ahc              1244 drivers/scsi/aic7xxx/aic7xxx_osm.c 		 && ahc->bsh.ioport != 0)
ahc              1245 drivers/scsi/aic7xxx/aic7xxx_osm.c 			release_region(ahc->bsh.ioport, 256);
ahc              1246 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->tag == BUS_SPACE_MEMIO
ahc              1247 drivers/scsi/aic7xxx/aic7xxx_osm.c 		 && ahc->bsh.maddr != NULL) {
ahc              1248 drivers/scsi/aic7xxx/aic7xxx_osm.c 			iounmap(ahc->bsh.maddr);
ahc              1249 drivers/scsi/aic7xxx/aic7xxx_osm.c 			release_mem_region(ahc->platform_data->mem_busaddr,
ahc              1253 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->platform_data->host)
ahc              1254 drivers/scsi/aic7xxx/aic7xxx_osm.c 			scsi_host_put(ahc->platform_data->host);
ahc              1256 drivers/scsi/aic7xxx/aic7xxx_osm.c 		kfree(ahc->platform_data);
ahc              1261 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
ahc              1263 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_platform_abort_scbs(ahc, SCB_GET_TARGET(ahc, scb),
ahc              1264 drivers/scsi/aic7xxx/aic7xxx_osm.c 				SCB_GET_CHANNEL(ahc, scb),
ahc              1270 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
ahc              1305 drivers/scsi/aic7xxx/aic7xxx_osm.c 		usertags = ahc_linux_user_tagdepth(ahc, devinfo);
ahc              1350 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel,
ahc              1357 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
ahc              1363 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if ((ahc->user_discenable & devinfo->target_mask) != 0) {
ahc              1364 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) {
ahc              1378 drivers/scsi/aic7xxx/aic7xxx_osm.c 			tag_info = &aic7xxx_tag_info[ahc->unit];
ahc              1395 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)sdev->host->hostdata);
ahc              1399 drivers/scsi/aic7xxx/aic7xxx_osm.c 			  ? ahc->our_id : ahc->our_id_b,
ahc              1403 drivers/scsi/aic7xxx/aic7xxx_osm.c 	tags = ahc_linux_user_tagdepth(ahc, &devinfo);
ahc              1406 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_TAGGED);
ahc              1407 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_send_async(ahc, devinfo.channel, devinfo.target,
ahc              1409 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_print_devinfo(ahc, &devinfo);
ahc              1412 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_NONE);
ahc              1413 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_send_async(ahc, devinfo.channel, devinfo.target,
ahc              1419 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
ahc              1434 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data->qfrozen != 0)
ahc              1444 drivers/scsi/aic7xxx/aic7xxx_osm.c 	    && (ahc->features & AHC_SCB_BTT) == 0) {
ahc              1448 drivers/scsi/aic7xxx/aic7xxx_osm.c 		untagged_q = &(ahc->untagged_queues[target_offset]);
ahc              1462 drivers/scsi/aic7xxx/aic7xxx_osm.c 	scb = ahc_get_scb(ahc);
ahc              1477 drivers/scsi/aic7xxx/aic7xxx_osm.c 	hscb->scsiid = BUILD_SCSIID(ahc, cmd);
ahc              1479 drivers/scsi/aic7xxx/aic7xxx_osm.c 	mask = SCB_GET_TARGET_MASK(ahc, scb);
ahc              1480 drivers/scsi/aic7xxx/aic7xxx_osm.c 	tinfo = ahc_fetch_transinfo(ahc, SCB_GET_CHANNEL(ahc, scb),
ahc              1482 drivers/scsi/aic7xxx/aic7xxx_osm.c 				    SCB_GET_TARGET(ahc, scb), &tstate);
ahc              1488 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if ((ahc->user_discenable & mask) != 0)
ahc              1537 drivers/scsi/aic7xxx/aic7xxx_osm.c 			consumed = ahc_linux_map_seg(ahc, scb,
ahc              1564 drivers/scsi/aic7xxx/aic7xxx_osm.c 	LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
ahc              1576 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_queue_scb(ahc, scb);
ahc              1586 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct	ahc_softc *ahc;
ahc              1590 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = (struct ahc_softc *) dev_id;
ahc              1591 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags); 
ahc              1592 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ours = ahc_intr(ahc);
ahc              1593 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              1598 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_platform_flushwork(struct ahc_softc *ahc)
ahc              1604 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_send_async(struct ahc_softc *ahc, char channel,
ahc              1619 drivers/scsi/aic7xxx/aic7xxx_osm.c 		tinfo = ahc_fetch_transinfo(ahc, channel,
ahc              1620 drivers/scsi/aic7xxx/aic7xxx_osm.c 						channel == 'A' ? ahc->our_id
ahc              1621 drivers/scsi/aic7xxx/aic7xxx_osm.c 							       : ahc->our_id_b,
ahc              1642 drivers/scsi/aic7xxx/aic7xxx_osm.c 		starget = ahc->platform_data->starget[target_offset];
ahc              1671 drivers/scsi/aic7xxx/aic7xxx_osm.c 		scsi_report_device_reset(ahc->platform_data->host,
ahc              1676 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->platform_data->host != NULL) {
ahc              1677 drivers/scsi/aic7xxx/aic7xxx_osm.c 			scsi_report_bus_reset(ahc->platform_data->host,
ahc              1690 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_done(struct ahc_softc *ahc, struct scb *scb)
ahc              1700 drivers/scsi/aic7xxx/aic7xxx_osm.c 		target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
ahc              1701 drivers/scsi/aic7xxx/aic7xxx_osm.c 		untagged_q = &(ahc->untagged_queues[target_offset]);
ahc              1711 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_dump_card_state(ahc);
ahc              1722 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_linux_unmap_scb(ahc, scb);
ahc              1739 drivers/scsi/aic7xxx/aic7xxx_osm.c 				ahc_print_path(ahc, scb);
ahc              1757 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_print_path(ahc, scb);
ahc              1762 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_print_path(ahc, scb);
ahc              1773 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_linux_handle_scsi_status(ahc, cmd->device, scb);
ahc              1801 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc->platform_data->eh_done)
ahc              1802 drivers/scsi/aic7xxx/aic7xxx_osm.c 			complete(ahc->platform_data->eh_done);
ahc              1805 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_free_scb(ahc, scb);
ahc              1806 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_linux_queue_cmd_complete(ahc, cmd);
ahc              1810 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
ahc              1817 drivers/scsi/aic7xxx/aic7xxx_osm.c 			    ahc->our_id,
ahc              1852 drivers/scsi/aic7xxx/aic7xxx_osm.c 			       ahc_get_sense_buf(ahc, scb), sense_size);
ahc              1909 drivers/scsi/aic7xxx/aic7xxx_osm.c 					ahc_print_path(ahc, scb);
ahc              1919 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_platform_set_tags(ahc, sdev, &devinfo,
ahc              1930 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_platform_set_tags(ahc, sdev, &devinfo,
ahc              1939 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, struct scsi_cmnd *cmd)
ahc              2009 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_freeze_simq(struct ahc_softc *ahc)
ahc              2013 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &s);
ahc              2014 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc->platform_data->qfrozen++;
ahc              2015 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data->qfrozen == 1) {
ahc              2016 drivers/scsi/aic7xxx/aic7xxx_osm.c 		scsi_block_requests(ahc->platform_data->host);
ahc              2019 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_platform_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS,
ahc              2023 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &s);
ahc              2027 drivers/scsi/aic7xxx/aic7xxx_osm.c ahc_linux_release_simq(struct ahc_softc *ahc)
ahc              2033 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &s);
ahc              2034 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data->qfrozen > 0)
ahc              2035 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc->platform_data->qfrozen--;
ahc              2036 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (ahc->platform_data->qfrozen == 0)
ahc              2038 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &s);
ahc              2046 drivers/scsi/aic7xxx/aic7xxx_osm.c 		scsi_unblock_requests(ahc->platform_data->host);
ahc              2052 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc;
ahc              2070 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
ahc              2080 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2097 drivers/scsi/aic7xxx/aic7xxx_osm.c 		       ahc_name(ahc), cmd->device->channel, cmd->device->id,
ahc              2104 drivers/scsi/aic7xxx/aic7xxx_osm.c 	 && ahc_search_untagged_queues(ahc, cmd, cmd->device->id,
ahc              2109 drivers/scsi/aic7xxx/aic7xxx_osm.c 		       ahc_name(ahc), cmd->device->channel, cmd->device->id,
ahc              2118 drivers/scsi/aic7xxx/aic7xxx_osm.c 	LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) {
ahc              2126 drivers/scsi/aic7xxx/aic7xxx_osm.c 		LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) {
ahc              2127 drivers/scsi/aic7xxx/aic7xxx_osm.c 		  	if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
ahc              2153 drivers/scsi/aic7xxx/aic7xxx_osm.c 	was_paused = ahc_is_paused(ahc);
ahc              2154 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_pause_and_flushwork(ahc);
ahc              2163 drivers/scsi/aic7xxx/aic7xxx_osm.c 	       ahc_name(ahc), was_paused ? "" : "not ");
ahc              2164 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_dump_card_state(ahc);
ahc              2168 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if (ahc_search_qinfifo(ahc, cmd->device->id,
ahc              2175 drivers/scsi/aic7xxx/aic7xxx_osm.c 			       ahc_name(ahc), cmd->device->channel,
ahc              2180 drivers/scsi/aic7xxx/aic7xxx_osm.c 	} else if (ahc_search_qinfifo(ahc, cmd->device->id,
ahc              2189 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (disconnected && (ahc_inb(ahc, SEQ_FLAGS) & NOT_IDENTIFIED) == 0) {
ahc              2192 drivers/scsi/aic7xxx/aic7xxx_osm.c 		bus_scb = ahc_lookup_scb(ahc, ahc_inb(ahc, SCB_TAG));
ahc              2196 drivers/scsi/aic7xxx/aic7xxx_osm.c 		      && ahc_inb(ahc, SAVED_SCSIID) == pending_scb->hscb->scsiid
ahc              2197 drivers/scsi/aic7xxx/aic7xxx_osm.c 		      && ahc_inb(ahc, SAVED_LUN) == SCB_GET_LUN(pending_scb))
ahc              2209 drivers/scsi/aic7xxx/aic7xxx_osm.c 	last_phase = ahc_inb(ahc, LASTPHASE);
ahc              2210 drivers/scsi/aic7xxx/aic7xxx_osm.c 	saved_scbptr = ahc_inb(ahc, SCBPTR);
ahc              2211 drivers/scsi/aic7xxx/aic7xxx_osm.c 	active_scb_index = ahc_inb(ahc, SCB_TAG);
ahc              2212 drivers/scsi/aic7xxx/aic7xxx_osm.c 	saved_scsiid = ahc_inb(ahc, SAVED_SCSIID);
ahc              2216 drivers/scsi/aic7xxx/aic7xxx_osm.c 	   && SCSIID_TARGET(ahc, saved_scsiid) == scmd_id(cmd)))) {
ahc              2222 drivers/scsi/aic7xxx/aic7xxx_osm.c 		pending_scb = ahc_lookup_scb(ahc, active_scb_index);
ahc              2224 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_outb(ahc, MSG_OUT, HOST_MSG);
ahc              2225 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_outb(ahc, SCSISIGO, last_phase|ATNO);
ahc              2256 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_search_disc_list(ahc, cmd->device->id,
ahc              2270 drivers/scsi/aic7xxx/aic7xxx_osm.c 		if ((ahc->flags & AHC_PAGESCBS) == 0) {
ahc              2271 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_outb(ahc, SCBPTR, pending_scb->hscb->tag);
ahc              2272 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_outb(ahc, SCB_CONTROL,
ahc              2273 drivers/scsi/aic7xxx/aic7xxx_osm.c 				 ahc_inb(ahc, SCB_CONTROL)|MK_MESSAGE);
ahc              2281 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_search_qinfifo(ahc, cmd->device->id,
ahc              2286 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_qinfifo_requeue_tail(ahc, pending_scb);
ahc              2287 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_outb(ahc, SCBPTR, saved_scbptr);
ahc              2288 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_print_path(ahc, pending_scb);
ahc              2307 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_unpause(ahc);
ahc              2311 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc->platform_data->eh_done = &done;
ahc              2312 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_unlock(ahc, &flags);
ahc              2316 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_lock(ahc, &flags);
ahc              2317 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc->platform_data->eh_done = NULL;
ahc              2318 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc_unlock(ahc, &flags);
ahc              2325 drivers/scsi/aic7xxx/aic7xxx_osm.c 		ahc_unlock(ahc, &flags);
ahc              2332 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2338 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2339 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_width(ahc, &devinfo, width, AHC_TRANS_GOAL, FALSE);
ahc              2340 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2346 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2349 drivers/scsi/aic7xxx/aic7xxx_osm.c 		= ahc_fetch_transinfo(ahc,
ahc              2380 drivers/scsi/aic7xxx/aic7xxx_osm.c 	syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc              2381 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2382 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
ahc              2384 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2390 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2393 drivers/scsi/aic7xxx/aic7xxx_osm.c 		= ahc_fetch_transinfo(ahc,
ahc              2405 drivers/scsi/aic7xxx/aic7xxx_osm.c 		syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc              2409 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2410 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
ahc              2412 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2418 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2421 drivers/scsi/aic7xxx/aic7xxx_osm.c 		= ahc_fetch_transinfo(ahc,
ahc              2441 drivers/scsi/aic7xxx/aic7xxx_osm.c 	syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);
ahc              2442 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2443 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
ahc              2445 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2456 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2459 drivers/scsi/aic7xxx/aic7xxx_osm.c 		= ahc_fetch_transinfo(ahc,
ahc              2474 drivers/scsi/aic7xxx/aic7xxx_osm.c 	syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc              2475 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2476 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
ahc              2478 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2484 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
ahc              2487 drivers/scsi/aic7xxx/aic7xxx_osm.c 		= ahc_fetch_transinfo(ahc,
ahc              2502 drivers/scsi/aic7xxx/aic7xxx_osm.c 	syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc              2503 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2504 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
ahc              2506 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc              2512 drivers/scsi/aic7xxx/aic7xxx_osm.c 	struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
ahc              2516 drivers/scsi/aic7xxx/aic7xxx_osm.c 	if (!(ahc->features & AHC_ULTRA2)) {
ahc              2519 drivers/scsi/aic7xxx/aic7xxx_osm.c 			ahc->features & AHC_HVD ?
ahc              2525 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_lock(ahc, &flags);
ahc              2526 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_pause(ahc);
ahc              2527 drivers/scsi/aic7xxx/aic7xxx_osm.c 	mode = ahc_inb(ahc, SBLKCTL);
ahc              2528 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unpause(ahc);
ahc              2529 drivers/scsi/aic7xxx/aic7xxx_osm.c 	ahc_unlock(ahc, &flags);
ahc                83 drivers/scsi/aic7xxx/aic7xxx_osm.h #define AIC_LIB_PREFIX ahc
ahc               194 drivers/scsi/aic7xxx/aic7xxx_osm.h int	ahc_dmamap_load(struct ahc_softc *ahc, bus_dma_tag_t /*dmat*/,
ahc               217 drivers/scsi/aic7xxx/aic7xxx_osm.h #define ahc_dmamap_sync(ahc, dma_tag, dmamap, offset, len, op)
ahc               370 drivers/scsi/aic7xxx/aic7xxx_osm.h uint8_t ahc_inb(struct ahc_softc * ahc, long port);
ahc               371 drivers/scsi/aic7xxx/aic7xxx_osm.h void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val);
ahc               372 drivers/scsi/aic7xxx/aic7xxx_osm.h void ahc_outsb(struct ahc_softc * ahc, long port,
ahc               374 drivers/scsi/aic7xxx/aic7xxx_osm.h void ahc_insb(struct ahc_softc * ahc, long port,
ahc               385 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_lockinit(struct ahc_softc *ahc)
ahc               387 drivers/scsi/aic7xxx/aic7xxx_osm.h 	spin_lock_init(&ahc->platform_data->spin_lock);
ahc               391 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_lock(struct ahc_softc *ahc, unsigned long *flags)
ahc               393 drivers/scsi/aic7xxx/aic7xxx_osm.h 	spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags);
ahc               397 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
ahc               399 drivers/scsi/aic7xxx/aic7xxx_osm.h 	spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags);
ahc               451 drivers/scsi/aic7xxx/aic7xxx_osm.h int			 aic7770_map_registers(struct ahc_softc *ahc,
ahc               453 drivers/scsi/aic7xxx/aic7xxx_osm.h int			 aic7770_map_int(struct ahc_softc *ahc, u_int irq);
ahc               466 drivers/scsi/aic7xxx/aic7xxx_osm.h int			 ahc_pci_map_registers(struct ahc_softc *ahc);
ahc               467 drivers/scsi/aic7xxx/aic7xxx_osm.h int			 ahc_pci_map_int(struct ahc_softc *ahc);
ahc               506 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_flush_device_writes(struct ahc_softc *ahc)
ahc               509 drivers/scsi/aic7xxx/aic7xxx_osm.h 	ahc_inb(ahc, INTSTAT);
ahc               538 drivers/scsi/aic7xxx/aic7xxx_osm.h static inline void ahc_platform_scb_free(struct ahc_softc *ahc,
ahc               649 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb)
ahc               655 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_notify_xfer_settings_change(struct ahc_softc *ahc,
ahc               662 drivers/scsi/aic7xxx/aic7xxx_osm.h ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
ahc               666 drivers/scsi/aic7xxx/aic7xxx_osm.h int	ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg);
ahc               667 drivers/scsi/aic7xxx/aic7xxx_osm.h void	ahc_platform_free(struct ahc_softc *ahc);
ahc               668 drivers/scsi/aic7xxx/aic7xxx_osm.h void	ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
ahc               679 drivers/scsi/aic7xxx/aic7xxx_osm.h void	ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
ahc               681 drivers/scsi/aic7xxx/aic7xxx_osm.h int	ahc_platform_abort_scbs(struct ahc_softc *ahc, int target,
ahc               686 drivers/scsi/aic7xxx/aic7xxx_osm.h void	ahc_platform_flushwork(struct ahc_softc *ahc);
ahc               128 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	struct ahc_softc *ahc = pci_get_drvdata(pdev);
ahc               131 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	if ((rc = ahc_suspend(ahc)))
ahc               146 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	struct ahc_softc *ahc = pci_get_drvdata(pdev);
ahc               160 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_pci_resume(ahc);
ahc               162 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	return (ahc_resume(ahc));
ahc               169 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	struct ahc_softc *ahc = pci_get_drvdata(pdev);
ahc               172 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	if (ahc->platform_data && ahc->platform_data->host)
ahc               173 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			scsi_remove_host(ahc->platform_data->host);
ahc               175 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_lock(ahc, &s);
ahc               176 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_intr_enable(ahc, FALSE);
ahc               177 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_unlock(ahc, &s);
ahc               178 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_free(ahc);
ahc               182 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c ahc_linux_pci_inherit_flags(struct ahc_softc *ahc)
ahc               184 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	struct pci_dev *pdev = ahc->dev_softc, *master_pdev;
ahc               191 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->flags &= ~AHC_BIOS_ENABLED; 
ahc               192 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->flags |= master->flags & AHC_BIOS_ENABLED;
ahc               194 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->flags &= ~AHC_PRIMARY_CHANNEL; 
ahc               195 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->flags |= master->flags & AHC_PRIMARY_CHANNEL;
ahc               207 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	struct		 ahc_softc *ahc;
ahc               231 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc = ahc_alloc(NULL, name);
ahc               232 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	if (ahc == NULL)
ahc               235 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc_free(ahc);
ahc               241 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	    && ahc->features & AHC_LARGE_SCBS
ahc               244 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc->flags |= AHC_39BIT_ADDRESSING;
ahc               247 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc_free(ahc);
ahc               252 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc->dev_softc = pci;
ahc               253 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc->dev = &pci->dev;
ahc               254 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	error = ahc_pci_config(ahc, entry);
ahc               256 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc_free(ahc);
ahc               264 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	if ((ahc->features & AHC_MULTI_FUNC) && PCI_FUNC(pdev->devfn) != 0)
ahc               265 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc_linux_pci_inherit_flags(ahc);
ahc               267 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	pci_set_drvdata(pdev, ahc);
ahc               268 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_linux_register_host(ahc, &aic7xxx_driver_template);
ahc               347 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base)
ahc               352 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	*base = pci_resource_start(ahc->dev_softc, 0);
ahc               361 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
ahc               369 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	start = pci_resource_start(ahc->dev_softc, 1);
ahc               387 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c ahc_pci_map_registers(struct ahc_softc *ahc)
ahc               397 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	command = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, 4);
ahc               401 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	error = ahc_linux_pci_reserve_mem_region(ahc, &base, &maddr);
ahc               403 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc->platform_data->mem_busaddr = base;
ahc               404 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc->tag = BUS_SPACE_MEMIO;
ahc               405 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc->bsh.maddr = maddr;
ahc               406 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
ahc               413 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		if (ahc_pci_test_register_access(ahc) != 0) {
ahc               417 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_bus(ahc->dev_softc),
ahc               418 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_slot(ahc->dev_softc),
ahc               419 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_function(ahc->dev_softc));
ahc               421 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			release_mem_region(ahc->platform_data->mem_busaddr,
ahc               423 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->bsh.maddr = NULL;
ahc               430 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		       ahc_get_pci_bus(ahc->dev_softc),
ahc               431 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		       ahc_get_pci_slot(ahc->dev_softc),
ahc               432 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		       ahc_get_pci_function(ahc->dev_softc),
ahc               441 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		error = ahc_linux_pci_reserve_io_region(ahc, &base);
ahc               443 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->tag = BUS_SPACE_PIO;
ahc               444 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			ahc->bsh.ioport = (u_long)base;
ahc               449 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_bus(ahc->dev_softc),
ahc               450 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_slot(ahc->dev_softc),
ahc               451 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			       ahc_get_pci_function(ahc->dev_softc),
ahc               455 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, 4);
ahc               460 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c ahc_pci_map_int(struct ahc_softc *ahc)
ahc               464 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 	error = request_irq(ahc->dev_softc->irq, ahc_linux_isr,
ahc               465 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 			    IRQF_SHARED, "aic7xxx", ahc);
ahc               467 drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 		ahc->platform_data->irq = ahc->dev_softc->irq;
ahc               599 drivers/scsi/aic7xxx/aic7xxx_pci.c static int ahc_ext_scbram_present(struct ahc_softc *ahc);
ahc               600 drivers/scsi/aic7xxx/aic7xxx_pci.c static void ahc_scbram_config(struct ahc_softc *ahc, int enable,
ahc               602 drivers/scsi/aic7xxx/aic7xxx_pci.c static void ahc_probe_ext_scbram(struct ahc_softc *ahc);
ahc               603 drivers/scsi/aic7xxx/aic7xxx_pci.c static void check_extport(struct ahc_softc *ahc, u_int *sxfrctl1);
ahc               604 drivers/scsi/aic7xxx/aic7xxx_pci.c static void ahc_parse_pci_eeprom(struct ahc_softc *ahc,
ahc               606 drivers/scsi/aic7xxx/aic7xxx_pci.c static void configure_termination(struct ahc_softc *ahc,
ahc               611 drivers/scsi/aic7xxx/aic7xxx_pci.c static void ahc_new_term_detect(struct ahc_softc *ahc,
ahc               617 drivers/scsi/aic7xxx/aic7xxx_pci.c static void aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
ahc               621 drivers/scsi/aic7xxx/aic7xxx_pci.c static void aic785X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
ahc               624 drivers/scsi/aic7xxx/aic7xxx_pci.c static void    write_brdctl(struct ahc_softc *ahc, uint8_t value);
ahc               625 drivers/scsi/aic7xxx/aic7xxx_pci.c static uint8_t read_brdctl(struct ahc_softc *ahc);
ahc               626 drivers/scsi/aic7xxx/aic7xxx_pci.c static void ahc_pci_intr(struct ahc_softc *ahc);
ahc               627 drivers/scsi/aic7xxx/aic7xxx_pci.c static int  ahc_pci_chip_init(struct ahc_softc *ahc);
ahc               705 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
ahc               717 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = entry->setup(ahc);
ahc               720 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip |= AHC_PCI;
ahc               721 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->description = entry->name;
ahc               723 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci_set_power_state(ahc->dev_softc, AHC_POWER_STATE_D0);
ahc               725 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_pci_map_registers(ahc);
ahc               735 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_intr_enable(ahc, FALSE);
ahc               737 drivers/scsi/aic7xxx/aic7xxx_pci.c 	devconfig = ahc_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
ahc               745 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) {
ahc               749 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       ahc_name(ahc));
ahc               756 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
ahc               759 drivers/scsi/aic7xxx/aic7xxx_pci.c 	command = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahc               762 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, /*bytes*/2);
ahc               765 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_PAGESCBS;
ahc               767 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_softc_init(ahc);
ahc               779 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->flags & AHC_DISABLE_PCI_PERR) != 0)
ahc               780 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->seqctl |= FAILDIS;
ahc               782 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_intr = ahc_pci_intr;
ahc               783 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_chip_init = ahc_pci_chip_init;
ahc               786 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) {
ahc               787 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_pause(ahc);
ahc               788 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_ULTRA2) != 0)
ahc               789 drivers/scsi/aic7xxx/aic7xxx_pci.c 			our_id = ahc_inb(ahc, SCSIID_ULTRA2) & OID;
ahc               791 drivers/scsi/aic7xxx/aic7xxx_pci.c 			our_id = ahc_inb(ahc, SCSIID) & OID;
ahc               792 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sxfrctl1 = ahc_inb(ahc, SXFRCTL1) & STPWEN;
ahc               793 drivers/scsi/aic7xxx/aic7xxx_pci.c 		scsiseq = ahc_inb(ahc, SCSISEQ);
ahc               800 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_reset(ahc, /*reinit*/FALSE);
ahc               804 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_DT) != 0) {
ahc               808 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sfunct = ahc_inb(ahc, SFUNCT) & ~ALT_MODE;
ahc               809 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct | ALT_MODE);
ahc               810 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, OPTIONMODE,
ahc               812 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct);
ahc               815 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, CRCCONTROL1, CRCVALCHKEN|CRCENDCHKEN|CRCREQCHKEN
ahc               819 drivers/scsi/aic7xxx/aic7xxx_pci.c 	dscommand0 = ahc_inb(ahc, DSCOMMAND0);
ahc               821 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0) {
ahc               834 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->bugs & AHC_CACHETHEN_DIS_BUG) != 0)
ahc               837 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->bugs & AHC_CACHETHEN_BUG) != 0)
ahc               840 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, DSCOMMAND0, dscommand0);
ahc               842 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->pci_cachesize =
ahc               843 drivers/scsi/aic7xxx/aic7xxx_pci.c 	    ahc_pci_read_config(ahc->dev_softc, CSIZE_LATTIME,
ahc               845 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->pci_cachesize *= 4;
ahc               847 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->bugs & AHC_PCI_2_1_RETRY_BUG) != 0
ahc               848 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 && ahc->pci_cachesize == 4) {
ahc               850 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_pci_write_config(ahc->dev_softc, CSIZE_LATTIME,
ahc               852 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->pci_cachesize = 0;
ahc               859 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA) != 0) {
ahc               862 drivers/scsi/aic7xxx/aic7xxx_pci.c 		devconfig = ahc_pci_read_config(ahc->dev_softc,
ahc               865 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc->features &= ~AHC_ULTRA;
ahc               869 drivers/scsi/aic7xxx/aic7xxx_pci.c 	check_extport(ahc, &sxfrctl1);
ahc               874 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sblkctl = ahc_inb(ahc, SBLKCTL);
ahc               875 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SBLKCTL, (sblkctl & ~(DIAGLEDEN|DIAGLEDON)));
ahc               877 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0) {
ahc               878 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, DFF_THRSH, RD_DFTHRSH_MAX|WR_DFTHRSH_MAX);
ahc               880 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, DSPCISTATUS, DFTHRSH_100);
ahc               883 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc->flags & AHC_USEDEFAULTS) {
ahc               890 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->flags & AHC_NO_BIOS_INIT) == 0
ahc               893 drivers/scsi/aic7xxx/aic7xxx_pci.c 				ahc_name(ahc));
ahc               894 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc->flags &= ~AHC_USEDEFAULTS;
ahc               895 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc->flags |= AHC_BIOS_ENABLED;
ahc               904 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SCSICONF, our_id|ENSPCHK|RESET_SCSI);
ahc               906 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->our_id = our_id;
ahc               914 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_probe_ext_scbram(ahc);
ahc               921 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_TERM_ENB_A;
ahc               927 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_softc.pci_softc.devconfig =
ahc               928 drivers/scsi/aic7xxx/aic7xxx_pci.c 	    ahc_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
ahc               929 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_softc.pci_softc.command =
ahc               930 drivers/scsi/aic7xxx/aic7xxx_pci.c 	    ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/1);
ahc               931 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_softc.pci_softc.csize_lattime =
ahc               932 drivers/scsi/aic7xxx/aic7xxx_pci.c 	    ahc_pci_read_config(ahc->dev_softc, CSIZE_LATTIME, /*bytes*/1);
ahc               933 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_softc.pci_softc.dscommand0 = ahc_inb(ahc, DSCOMMAND0);
ahc               934 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bus_softc.pci_softc.dspcistatus = ahc_inb(ahc, DSPCISTATUS);
ahc               935 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_DT) != 0) {
ahc               938 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sfunct = ahc_inb(ahc, SFUNCT) & ~ALT_MODE;
ahc               939 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct | ALT_MODE);
ahc               940 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bus_softc.pci_softc.optionmode = ahc_inb(ahc, OPTIONMODE);
ahc               941 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bus_softc.pci_softc.targcrccnt = ahc_inw(ahc, TARGCRCCNT);
ahc               942 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct);
ahc               943 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bus_softc.pci_softc.crccontrol1 =
ahc               944 drivers/scsi/aic7xxx/aic7xxx_pci.c 		    ahc_inb(ahc, CRCCONTROL1);
ahc               946 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_MULTI_FUNC) != 0)
ahc               947 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bus_softc.pci_softc.scbbaddr = ahc_inb(ahc, SCBBADDR);
ahc               949 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc               950 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bus_softc.pci_softc.dff_thrsh = ahc_inb(ahc, DFF_THRSH);
ahc               953 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_init(ahc);
ahc               956 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->init_level++;
ahc               961 drivers/scsi/aic7xxx/aic7xxx_pci.c 	return ahc_pci_map_int(ahc);
ahc               969 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_ext_scbram_present(struct ahc_softc *ahc)
ahc               976 drivers/scsi/aic7xxx/aic7xxx_pci.c 	chip = ahc->chip & AHC_CHIPID_MASK;
ahc               977 drivers/scsi/aic7xxx/aic7xxx_pci.c 	devconfig = ahc_pci_read_config(ahc->dev_softc,
ahc               981 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc               982 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ramps = (ahc_inb(ahc, DSCOMMAND0) & RAMPS) != 0;
ahc              1005 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_scbram_config(struct ahc_softc *ahc, int enable, int pcheck,
ahc              1010 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc->features & AHC_MULTI_FUNC) {
ahc              1015 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SCBBADDR, ahc_get_pci_function(ahc->dev_softc));
ahc              1018 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags &= ~AHC_LSCBS_ENABLED;
ahc              1020 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_LSCBS_ENABLED;
ahc              1021 drivers/scsi/aic7xxx/aic7xxx_pci.c 	devconfig = ahc_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
ahc              1022 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              1025 drivers/scsi/aic7xxx/aic7xxx_pci.c 		dscommand0 = ahc_inb(ahc, DSCOMMAND0);
ahc              1034 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, DSCOMMAND0, dscommand0);
ahc              1054 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
ahc              1063 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_probe_ext_scbram(struct ahc_softc *ahc)
ahc              1078 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc_ext_scbram_present(ahc) == 0)
ahc              1084 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_scbram_config(ahc, /*enable*/TRUE, pcheck, fast, large);
ahc              1085 drivers/scsi/aic7xxx/aic7xxx_pci.c 	num_scbs = ahc_probe_scbs(ahc);
ahc              1097 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SEQCTL, 0);
ahc              1098 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1099 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRBRKADRINT);
ahc              1102 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_scbram_config(ahc, enable, /*pcheck*/TRUE, fast, large);
ahc              1103 drivers/scsi/aic7xxx/aic7xxx_pci.c 	num_scbs = ahc_probe_scbs(ahc);
ahc              1104 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc_inb(ahc, INTSTAT) & BRKADRINT) == 0
ahc              1105 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 || (ahc_inb(ahc, ERROR) & MPARERR) == 0)
ahc              1109 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1110 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRBRKADRINT);
ahc              1113 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_scbram_config(ahc, enable, pcheck, /*fast*/TRUE, large);
ahc              1114 drivers/scsi/aic7xxx/aic7xxx_pci.c 	test_num_scbs = ahc_probe_scbs(ahc);
ahc              1116 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 && ((ahc_inb(ahc, INTSTAT) & BRKADRINT) == 0
ahc              1117 drivers/scsi/aic7xxx/aic7xxx_pci.c 	  || (ahc_inb(ahc, ERROR) & MPARERR) == 0))
ahc              1124 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_LARGE_SCBS) != 0) {
ahc              1125 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_scbram_config(ahc, enable, pcheck, fast, /*large*/TRUE);
ahc              1126 drivers/scsi/aic7xxx/aic7xxx_pci.c 		test_num_scbs = ahc_probe_scbs(ahc);
ahc              1137 drivers/scsi/aic7xxx/aic7xxx_pci.c 				ahc->flags |= AHC_SCB_BTT;
ahc              1146 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS);
ahc              1148 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1149 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRBRKADRINT);
ahc              1152 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       ahc_name(ahc), fast ? "fast" : "slow", 
ahc              1156 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_scbram_config(ahc, enable, pcheck, fast, large);
ahc              1164 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_pci_test_register_access(struct ahc_softc *ahc)
ahc              1177 drivers/scsi/aic7xxx/aic7xxx_pci.c 	cmd = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahc              1178 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
ahc              1189 drivers/scsi/aic7xxx/aic7xxx_pci.c 	hcntrl = ahc_inb(ahc, HCNTRL);
ahc              1200 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_NO_BIOS_INIT;
ahc              1212 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
ahc              1213 drivers/scsi/aic7xxx/aic7xxx_pci.c 	while (ahc_is_paused(ahc) == 0)
ahc              1217 drivers/scsi/aic7xxx/aic7xxx_pci.c 	status1 = ahc_pci_read_config(ahc->dev_softc,
ahc              1219 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
ahc              1221 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1223 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SEQCTL, PERRORDIS);
ahc              1224 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SCBPTR, 0);
ahc              1225 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outl(ahc, SCB_BASE, 0x5aa555aa);
ahc              1226 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc_inl(ahc, SCB_BASE) != 0x5aa555aa)
ahc              1229 drivers/scsi/aic7xxx/aic7xxx_pci.c 	status1 = ahc_pci_read_config(ahc->dev_softc,
ahc              1238 drivers/scsi/aic7xxx/aic7xxx_pci.c 	status1 = ahc_pci_read_config(ahc->dev_softc,
ahc              1240 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
ahc              1242 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1243 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS);
ahc              1244 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
ahc              1253 drivers/scsi/aic7xxx/aic7xxx_pci.c check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
ahc              1260 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_ahc = ahc;
ahc              1264 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sc = ahc->seep_config;
ahc              1272 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc->flags & AHC_LARGE_SEEPROM)
ahc              1284 drivers/scsi/aic7xxx/aic7xxx_pci.c 	have_seeprom = ahc_acquire_seeprom(ahc, &sd);
ahc              1288 drivers/scsi/aic7xxx/aic7xxx_pci.c 			printk("%s: Reading SEEPROM...", ahc_name(ahc));
ahc              1293 drivers/scsi/aic7xxx/aic7xxx_pci.c 			start_addr = 32 * (ahc->channel - 'A');
ahc              1317 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc->flags |= AHC_LARGE_SEEPROM;
ahc              1328 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SCBPTR, 2);
ahc              1329 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if (ahc_inb(ahc, SCB_BASE) == 'A'
ahc              1330 drivers/scsi/aic7xxx/aic7xxx_pci.c 		 && ahc_inb(ahc, SCB_BASE + 1) == 'D'
ahc              1331 drivers/scsi/aic7xxx/aic7xxx_pci.c 		 && ahc_inb(ahc, SCB_BASE + 2) == 'P'
ahc              1332 drivers/scsi/aic7xxx/aic7xxx_pci.c 		 && ahc_inb(ahc, SCB_BASE + 3) == 'T') {
ahc              1341 drivers/scsi/aic7xxx/aic7xxx_pci.c 				*sc_data = ahc_inb(ahc, SRAM_BASE + j)
ahc              1342 drivers/scsi/aic7xxx/aic7xxx_pci.c 					 | ahc_inb(ahc, SRAM_BASE + j + 1) << 8;
ahc              1346 drivers/scsi/aic7xxx/aic7xxx_pci.c 				ahc->flags |= AHC_SCB_CONFIG_USED;
ahc              1352 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1353 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, CLRINT, CLRBRKADRINT);
ahc              1358 drivers/scsi/aic7xxx/aic7xxx_pci.c 			printk("%s: No SEEPROM available.\n", ahc_name(ahc));
ahc              1359 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_USEDEFAULTS;
ahc              1360 drivers/scsi/aic7xxx/aic7xxx_pci.c 		kfree(ahc->seep_config);
ahc              1361 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->seep_config = NULL;
ahc              1364 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_parse_pci_eeprom(ahc, sc);
ahc              1380 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_SPIOCAP) != 0) {
ahc              1381 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc_inb(ahc, SPIOCAP) & SSPIOCPS) == 0)
ahc              1386 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_HAS_TERM_LOGIC;
ahc              1387 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_acquire_seeprom(ahc, &sd);
ahc              1388 drivers/scsi/aic7xxx/aic7xxx_pci.c 		configure_termination(ahc, &sd, sc->adapter_control, sxfrctl1);
ahc              1396 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       ahc_name(ahc),
ahc              1402 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_parse_pci_eeprom(struct ahc_softc *ahc, struct seeprom_config *sc)
ahc              1423 drivers/scsi/aic7xxx/aic7xxx_pci.c 				ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              1436 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->flags & AHC_NEWEEPROM_FMT) != 0) {
ahc              1448 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              1455 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc_outb(ahc, TARG_OFFSET + i, offset);
ahc              1473 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, TARG_SCSIRATE + i, scsirate);
ahc              1475 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->our_id = sc->brtime_id & CFSCSIID;
ahc              1477 drivers/scsi/aic7xxx/aic7xxx_pci.c 	scsi_conf = (ahc->our_id & 0x7);
ahc              1483 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= (sc->adapter_control & CFBOOTCHAN) >> CFBOOTCHANSHIFT;
ahc              1486 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_EXTENDED_TRANS_A;
ahc              1489 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->flags |= AHC_BIOS_ENABLED;
ahc              1490 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc->features & AHC_ULTRA
ahc              1491 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 && (ahc->flags & AHC_NEWEEPROM_FMT) == 0) {
ahc              1503 drivers/scsi/aic7xxx/aic7xxx_pci.c 		devconfig = ahc_pci_read_config(ahc->dev_softc,
ahc              1508 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_pci_write_config(ahc->dev_softc, DEVCONFIG,
ahc              1512 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SCSICONF, scsi_conf);
ahc              1513 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff));
ahc              1514 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, DISC_DSB + 1, ~((discenable >> 8) & 0xff));
ahc              1515 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, ULTRA_ENB, ultraenb & 0xff);
ahc              1516 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, ULTRA_ENB + 1, (ultraenb >> 8) & 0xff);
ahc              1520 drivers/scsi/aic7xxx/aic7xxx_pci.c configure_termination(struct ahc_softc *ahc,
ahc              1542 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 || (ahc->features & AHC_NEW_TERMCTL) != 0) {
ahc              1557 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_NEW_TERMCTL) != 0) {
ahc              1558 drivers/scsi/aic7xxx/aic7xxx_pci.c 			ahc_new_term_detect(ahc, &enableSEC_low,
ahc              1566 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       ahc_name(ahc));
ahc              1574 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       ahc_name(ahc));
ahc              1582 drivers/scsi/aic7xxx/aic7xxx_pci.c 		} else if ((ahc->features & AHC_SPIOCAP) != 0) {
ahc              1583 drivers/scsi/aic7xxx/aic7xxx_pci.c 			aic785X_cable_detect(ahc, &internal50_present,
ahc              1589 drivers/scsi/aic7xxx/aic7xxx_pci.c 			aic787X_cable_detect(ahc, &internal50_present,
ahc              1595 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_WIDE) == 0)
ahc              1599 drivers/scsi/aic7xxx/aic7xxx_pci.c 		 && (ahc->features & AHC_ULTRA2) == 0) {
ahc              1601 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       ahc_name(ahc),
ahc              1604 drivers/scsi/aic7xxx/aic7xxx_pci.c 			if ((ahc->features & AHC_WIDE) != 0)
ahc              1608 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       ahc_name(ahc),
ahc              1613 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       ahc_name(ahc), eeprom_present ? "is" : "not");
ahc              1615 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) {
ahc              1634 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_ULTRA2) == 0
ahc              1641 drivers/scsi/aic7xxx/aic7xxx_pci.c 			       "time!\n", ahc_name(ahc));
ahc              1653 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_WIDE) != 0
ahc              1659 drivers/scsi/aic7xxx/aic7xxx_pci.c 				if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
ahc              1661 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       "Enabled\n", ahc_name(ahc));
ahc              1664 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       "Enabled\n", ahc_name(ahc),
ahc              1673 drivers/scsi/aic7xxx/aic7xxx_pci.c 			if ((ahc->features & AHC_ULTRA2) != 0)
ahc              1678 drivers/scsi/aic7xxx/aic7xxx_pci.c 				if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
ahc              1680 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       "Enabled\n", ahc_name(ahc));
ahc              1683 drivers/scsi/aic7xxx/aic7xxx_pci.c 					       "Enabled\n", ahc_name(ahc),
ahc              1693 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       "Enabled\n", ahc_name(ahc));
ahc              1700 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SXFRCTL1, *sxfrctl1);
ahc              1707 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       ahc_name(ahc));
ahc              1710 drivers/scsi/aic7xxx/aic7xxx_pci.c 		write_brdctl(ahc, brddat);
ahc              1718 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       ahc_name(ahc),
ahc              1719 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       (ahc->features & AHC_ULTRA2) ? "Primary "
ahc              1724 drivers/scsi/aic7xxx/aic7xxx_pci.c 		 && (ahc->features & AHC_WIDE) != 0) {
ahc              1728 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       ahc_name(ahc),
ahc              1729 drivers/scsi/aic7xxx/aic7xxx_pci.c 				       (ahc->features & AHC_ULTRA2)
ahc              1737 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SXFRCTL1, *sxfrctl1);
ahc              1739 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if ((ahc->features & AHC_WIDE) != 0)
ahc              1740 drivers/scsi/aic7xxx/aic7xxx_pci.c 			write_brdctl(ahc, brddat);
ahc              1746 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_new_term_detect(struct ahc_softc *ahc, int *enableSEC_low,
ahc              1759 drivers/scsi/aic7xxx/aic7xxx_pci.c 	brdctl = read_brdctl(ahc);
ahc              1768 drivers/scsi/aic7xxx/aic7xxx_pci.c aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
ahc              1781 drivers/scsi/aic7xxx/aic7xxx_pci.c 	write_brdctl(ahc, 0);
ahc              1788 drivers/scsi/aic7xxx/aic7xxx_pci.c 	brdctl = read_brdctl(ahc);
ahc              1796 drivers/scsi/aic7xxx/aic7xxx_pci.c 	write_brdctl(ahc, BRDDAT5);
ahc              1803 drivers/scsi/aic7xxx/aic7xxx_pci.c 	brdctl = read_brdctl(ahc);
ahc              1809 drivers/scsi/aic7xxx/aic7xxx_pci.c aic785X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
ahc              1815 drivers/scsi/aic7xxx/aic7xxx_pci.c 	spiocap = ahc_inb(ahc, SPIOCAP);
ahc              1818 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, SPIOCAP, spiocap);
ahc              1819 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, BRDRW|BRDCS);
ahc              1820 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1822 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, 0);
ahc              1823 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1825 drivers/scsi/aic7xxx/aic7xxx_pci.c 	brdctl = ahc_inb(ahc, BRDCTL);
ahc              1828 drivers/scsi/aic7xxx/aic7xxx_pci.c 	*eeprom_present = (ahc_inb(ahc, SPIOCAP) & EEPROM) ? 1 : 0;
ahc              1832 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
ahc              1836 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_SPIOCAP) != 0
ahc              1837 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 && (ahc_inb(ahc, SPIOCAP) & SEEPROM) == 0)
ahc              1867 drivers/scsi/aic7xxx/aic7xxx_pci.c write_brdctl(struct ahc_softc *ahc, uint8_t value)
ahc              1871 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->chip & AHC_CHIPID_MASK) == AHC_AIC7895) {
ahc              1873 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 	if (ahc->channel == 'B')
ahc              1875 drivers/scsi/aic7xxx/aic7xxx_pci.c 	} else if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              1880 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, brdctl);
ahc              1881 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1883 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, brdctl);
ahc              1884 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1885 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              1889 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, brdctl);
ahc              1890 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1891 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              1895 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, brdctl);
ahc              1899 drivers/scsi/aic7xxx/aic7xxx_pci.c read_brdctl(struct ahc_softc *ahc)
ahc              1904 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->chip & AHC_CHIPID_MASK) == AHC_AIC7895) {
ahc              1906 drivers/scsi/aic7xxx/aic7xxx_pci.c 	 	if (ahc->channel == 'B')
ahc              1908 drivers/scsi/aic7xxx/aic7xxx_pci.c 	} else if ((ahc->features & AHC_ULTRA2) != 0) {
ahc              1913 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, brdctl);
ahc              1914 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_flush_device_writes(ahc);
ahc              1915 drivers/scsi/aic7xxx/aic7xxx_pci.c 	value = ahc_inb(ahc, BRDCTL);
ahc              1916 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, BRDCTL, 0);
ahc              1921 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_pci_intr(struct ahc_softc *ahc)
ahc              1926 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_inb(ahc, ERROR);
ahc              1930 drivers/scsi/aic7xxx/aic7xxx_pci.c 	status1 = ahc_pci_read_config(ahc->dev_softc,
ahc              1934 drivers/scsi/aic7xxx/aic7xxx_pci.c 	      ahc_name(ahc),
ahc              1935 drivers/scsi/aic7xxx/aic7xxx_pci.c 	      ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
ahc              1938 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->pci_target_perr_count++;
ahc              1940 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       "or write data phase\n", ahc_name(ahc));
ahc              1943 drivers/scsi/aic7xxx/aic7xxx_pci.c 		printk("%s: Signal System Error Detected\n", ahc_name(ahc));
ahc              1946 drivers/scsi/aic7xxx/aic7xxx_pci.c 		printk("%s: Received a Master Abort\n", ahc_name(ahc));
ahc              1949 drivers/scsi/aic7xxx/aic7xxx_pci.c 		printk("%s: Received a Target Abort\n", ahc_name(ahc));
ahc              1952 drivers/scsi/aic7xxx/aic7xxx_pci.c 		printk("%s: Signaled a Target Abort\n", ahc_name(ahc));
ahc              1956 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       ahc_name(ahc));
ahc              1960 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
ahc              1965 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       "no status bits set\n", ahc_name(ahc)); 
ahc              1967 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, CLRINT, CLRPARERR);
ahc              1970 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) {
ahc              1978 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       ahc_name(ahc), ahc_name(ahc), ahc_name(ahc),
ahc              1979 drivers/scsi/aic7xxx/aic7xxx_pci.c 		       ahc_name(ahc), ahc_name(ahc), ahc_name(ahc));
ahc              1980 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->seqctl |= FAILDIS;
ahc              1981 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SEQCTL, ahc->seqctl);
ahc              1983 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_unpause(ahc);
ahc              1987 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_pci_chip_init(struct ahc_softc *ahc)
ahc              1989 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, DSCOMMAND0, ahc->bus_softc.pci_softc.dscommand0);
ahc              1990 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_outb(ahc, DSPCISTATUS, ahc->bus_softc.pci_softc.dspcistatus);
ahc              1991 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_DT) != 0) {
ahc              1994 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sfunct = ahc_inb(ahc, SFUNCT) & ~ALT_MODE;
ahc              1995 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct | ALT_MODE);
ahc              1996 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, OPTIONMODE, ahc->bus_softc.pci_softc.optionmode);
ahc              1997 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outw(ahc, TARGCRCCNT, ahc->bus_softc.pci_softc.targcrccnt);
ahc              1998 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SFUNCT, sfunct);
ahc              1999 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, CRCCONTROL1,
ahc              2000 drivers/scsi/aic7xxx/aic7xxx_pci.c 			 ahc->bus_softc.pci_softc.crccontrol1);
ahc              2002 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_MULTI_FUNC) != 0)
ahc              2003 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, SCBBADDR, ahc->bus_softc.pci_softc.scbbaddr);
ahc              2005 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->features & AHC_ULTRA2) != 0)
ahc              2006 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_outb(ahc, DFF_THRSH, ahc->bus_softc.pci_softc.dff_thrsh);
ahc              2008 drivers/scsi/aic7xxx/aic7xxx_pci.c 	return (ahc_chip_init(ahc));
ahc              2013 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_pci_resume(struct ahc_softc *ahc)
ahc              2021 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, DEVCONFIG,
ahc              2022 drivers/scsi/aic7xxx/aic7xxx_pci.c 			     ahc->bus_softc.pci_softc.devconfig, /*bytes*/4);
ahc              2023 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
ahc              2024 drivers/scsi/aic7xxx/aic7xxx_pci.c 			     ahc->bus_softc.pci_softc.command, /*bytes*/1);
ahc              2025 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc_pci_write_config(ahc->dev_softc, CSIZE_LATTIME,
ahc              2026 drivers/scsi/aic7xxx/aic7xxx_pci.c 			     ahc->bus_softc.pci_softc.csize_lattime, /*bytes*/1);
ahc              2027 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((ahc->flags & AHC_HAS_TERM_LOGIC) != 0) {
ahc              2031 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_ahc = ahc;
ahc              2036 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_acquire_seeprom(ahc, &sd);
ahc              2037 drivers/scsi/aic7xxx/aic7xxx_pci.c 		configure_termination(ahc, &sd,
ahc              2038 drivers/scsi/aic7xxx/aic7xxx_pci.c 				      ahc->seep_config->adapter_control,
ahc              2046 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic785X_setup(struct ahc_softc *ahc)
ahc              2051 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2052 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2053 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7850;
ahc              2054 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7850_FE;
ahc              2055 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG|AHC_CACHETHEN_BUG|AHC_PCI_MWI_BUG;
ahc              2058 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_PCI_2_1_RETRY_BUG;
ahc              2059 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 512;
ahc              2064 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7860_setup(struct ahc_softc *ahc)
ahc              2069 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2070 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2071 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7860;
ahc              2072 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7860_FE;
ahc              2073 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG|AHC_CACHETHEN_BUG|AHC_PCI_MWI_BUG;
ahc              2076 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_PCI_2_1_RETRY_BUG;
ahc              2077 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 512;
ahc              2082 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_apa1480_setup(struct ahc_softc *ahc)
ahc              2086 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7860_setup(ahc);
ahc              2089 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_REMOVABLE;
ahc              2094 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7870_setup(struct ahc_softc *ahc)
ahc              2097 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2098 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7870;
ahc              2099 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7870_FE;
ahc              2100 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG|AHC_CACHETHEN_BUG|AHC_PCI_MWI_BUG;
ahc              2101 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 512;
ahc              2106 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7870h_setup(struct ahc_softc *ahc)
ahc              2108 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aic7870_setup(ahc);
ahc              2110 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2116 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha394X_setup(struct ahc_softc *ahc)
ahc              2120 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7870_setup(ahc);
ahc              2122 drivers/scsi/aic7xxx/aic7xxx_pci.c 		error = ahc_aha394XX_setup(ahc);
ahc              2127 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha394Xh_setup(struct ahc_softc *ahc)
ahc              2129 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aha394X_setup(ahc);
ahc              2131 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2137 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha398X_setup(struct ahc_softc *ahc)
ahc              2141 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7870_setup(ahc);
ahc              2143 drivers/scsi/aic7xxx/aic7xxx_pci.c 		error = ahc_aha398XX_setup(ahc);
ahc              2148 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha494X_setup(struct ahc_softc *ahc)
ahc              2152 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7870_setup(ahc);
ahc              2154 drivers/scsi/aic7xxx/aic7xxx_pci.c 		error = ahc_aha494XX_setup(ahc);
ahc              2159 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha494Xh_setup(struct ahc_softc *ahc)
ahc              2161 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aha494X_setup(ahc);
ahc              2163 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2169 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7880_setup(struct ahc_softc *ahc)
ahc              2174 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2175 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2176 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7880;
ahc              2177 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7880_FE;
ahc              2178 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG;
ahc              2181 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_PCI_2_1_RETRY_BUG;
ahc              2183 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_CACHETHEN_BUG|AHC_PCI_MWI_BUG;
ahc              2185 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 512;
ahc              2190 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7880h_setup(struct ahc_softc *ahc)
ahc              2192 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aic7880_setup(ahc);
ahc              2194 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2201 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha2940Pro_setup(struct ahc_softc *ahc)
ahc              2204 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_INT50_SPEEDFLEX;
ahc              2205 drivers/scsi/aic7xxx/aic7xxx_pci.c 	return (ahc_aic7880_setup(ahc));
ahc              2209 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha394XU_setup(struct ahc_softc *ahc)
ahc              2213 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7880_setup(ahc);
ahc              2215 drivers/scsi/aic7xxx/aic7xxx_pci.c 		error = ahc_aha394XX_setup(ahc);
ahc              2220 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha394XUh_setup(struct ahc_softc *ahc)
ahc              2222 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aha394XU_setup(ahc);
ahc              2224 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2230 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha398XU_setup(struct ahc_softc *ahc)
ahc              2234 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7880_setup(ahc);
ahc              2236 drivers/scsi/aic7xxx/aic7xxx_pci.c 		error = ahc_aha398XX_setup(ahc);
ahc              2241 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7890_setup(struct ahc_softc *ahc)
ahc              2246 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2247 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2248 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7890;
ahc              2249 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7890_FE;
ahc              2250 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              2253 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_AUTOFLUSH_BUG|AHC_CACHETHEN_BUG;
ahc              2254 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 768;
ahc              2259 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7892_setup(struct ahc_softc *ahc)
ahc              2262 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = 'A';
ahc              2263 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7892;
ahc              2264 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7892_FE;
ahc              2265 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              2266 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_SCBCHAN_UPLOAD_BUG;
ahc              2267 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 1024;
ahc              2272 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7895_setup(struct ahc_softc *ahc)
ahc              2277 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2278 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = ahc_get_pci_function(pci) == 1 ? 'B' : 'A';
ahc              2284 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->chip = AHC_AIC7895C;
ahc              2285 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->features = AHC_AIC7895C_FE;
ahc              2289 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->chip = AHC_AIC7895;
ahc              2290 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->features = AHC_AIC7895_FE;
ahc              2301 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->bugs |= AHC_PCI_MWI_BUG;
ahc              2307 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_TMODE_WIDEODD_BUG|AHC_PCI_2_1_RETRY_BUG
ahc              2322 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              2323 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 512;
ahc              2328 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7895h_setup(struct ahc_softc *ahc)
ahc              2330 drivers/scsi/aic7xxx/aic7xxx_pci.c 	int error = ahc_aic7895_setup(ahc);
ahc              2332 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_HVD;
ahc              2338 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7896_setup(struct ahc_softc *ahc)
ahc              2342 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2343 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = ahc_get_pci_function(pci) == 1 ? 'B' : 'A';
ahc              2344 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7896;
ahc              2345 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7896_FE;
ahc              2346 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              2347 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_CACHETHEN_DIS_BUG;
ahc              2348 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 768;
ahc              2353 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aic7899_setup(struct ahc_softc *ahc)
ahc              2357 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2358 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->channel = ahc_get_pci_function(pci) == 1 ? 'B' : 'A';
ahc              2359 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->chip = AHC_AIC7899;
ahc              2360 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features = AHC_AIC7899_FE;
ahc              2361 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_NEWEEPROM_FMT;
ahc              2362 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->bugs |= AHC_SCBCHAN_UPLOAD_BUG;
ahc              2363 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->instruction_ram_size = 1024;
ahc              2368 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha29160C_setup(struct ahc_softc *ahc)
ahc              2372 drivers/scsi/aic7xxx/aic7xxx_pci.c 	error = ahc_aic7899_setup(ahc);
ahc              2375 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->features |= AHC_REMOVABLE;
ahc              2380 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_raid_setup(struct ahc_softc *ahc)
ahc              2387 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha394XX_setup(struct ahc_softc *ahc)
ahc              2391 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2394 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2397 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'B';
ahc              2403 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2409 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha398XX_setup(struct ahc_softc *ahc)
ahc              2413 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2416 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2419 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'B';
ahc              2422 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'C';
ahc              2428 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2431 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_LARGE_SEEPROM;
ahc              2436 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_aha494XX_setup(struct ahc_softc *ahc)
ahc              2440 drivers/scsi/aic7xxx/aic7xxx_pci.c 	pci = ahc->dev_softc;
ahc              2443 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2446 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'B';
ahc              2449 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'C';
ahc              2452 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'D';
ahc              2458 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc->channel = 'A';
ahc              2460 drivers/scsi/aic7xxx/aic7xxx_pci.c 	ahc->flags |= AHC_LARGE_SEEPROM;
ahc                46 drivers/scsi/aic7xxx/aic7xxx_proc.c static void	ahc_dump_target_state(struct ahc_softc *ahc,
ahc               134 drivers/scsi/aic7xxx/aic7xxx_proc.c ahc_dump_target_state(struct ahc_softc *ahc, struct seq_file *m,
ahc               143 drivers/scsi/aic7xxx/aic7xxx_proc.c 	tinfo = ahc_fetch_transinfo(ahc, channel, our_id,
ahc               145 drivers/scsi/aic7xxx/aic7xxx_proc.c 	if ((ahc->features & AHC_TWIN) != 0)
ahc               150 drivers/scsi/aic7xxx/aic7xxx_proc.c 	starget = ahc->platform_data->starget[target_offset];
ahc               190 drivers/scsi/aic7xxx/aic7xxx_proc.c 	struct	ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
ahc               199 drivers/scsi/aic7xxx/aic7xxx_proc.c 	ahc_lock(ahc, &s);
ahc               200 drivers/scsi/aic7xxx/aic7xxx_proc.c 	paused = ahc_is_paused(ahc);
ahc               202 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_pause(ahc);
ahc               215 drivers/scsi/aic7xxx/aic7xxx_proc.c 	sd.sd_ahc = ahc;
ahc               217 drivers/scsi/aic7xxx/aic7xxx_proc.c 	if ((ahc->chip & AHC_PCI) != 0) {
ahc               221 drivers/scsi/aic7xxx/aic7xxx_proc.c 		if (ahc->flags & AHC_LARGE_SEEPROM)
ahc               231 drivers/scsi/aic7xxx/aic7xxx_proc.c 		have_seeprom = ahc_acquire_seeprom(ahc, &sd);
ahc               234 drivers/scsi/aic7xxx/aic7xxx_proc.c 	if ((ahc->chip & AHC_VL) != 0) {
ahc               257 drivers/scsi/aic7xxx/aic7xxx_proc.c 		if (ahc->seep_config == NULL) {
ahc               258 drivers/scsi/aic7xxx/aic7xxx_proc.c 			ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
ahc               259 drivers/scsi/aic7xxx/aic7xxx_proc.c 			if (ahc->seep_config == NULL) {
ahc               266 drivers/scsi/aic7xxx/aic7xxx_proc.c 		start_addr = 32 * (ahc->channel - 'A');
ahc               269 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_read_seeprom(&sd, (uint16_t *)ahc->seep_config,
ahc               272 drivers/scsi/aic7xxx/aic7xxx_proc.c 		if ((ahc->chip & AHC_VL) == 0)
ahc               280 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_unpause(ahc);
ahc               281 drivers/scsi/aic7xxx/aic7xxx_proc.c 	ahc_unlock(ahc, &s);
ahc               291 drivers/scsi/aic7xxx/aic7xxx_proc.c 	struct	ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
ahc               298 drivers/scsi/aic7xxx/aic7xxx_proc.c 	seq_printf(m, "%s\n", ahc->description);
ahc               299 drivers/scsi/aic7xxx/aic7xxx_proc.c 	ahc_controller_info(ahc, ahc_info);
ahc               302 drivers/scsi/aic7xxx/aic7xxx_proc.c 		  ahc->scb_data->numscbs, AHC_NSEG);
ahc               305 drivers/scsi/aic7xxx/aic7xxx_proc.c 	if (ahc->seep_config == NULL)
ahc               309 drivers/scsi/aic7xxx/aic7xxx_proc.c 		for (i = 0; i < sizeof(*ahc->seep_config)/2; i++) {
ahc               314 drivers/scsi/aic7xxx/aic7xxx_proc.c 				  ((uint16_t*)ahc->seep_config)[i]);
ahc               321 drivers/scsi/aic7xxx/aic7xxx_proc.c 	if ((ahc->features & (AHC_WIDE|AHC_TWIN)) == 0)
ahc               330 drivers/scsi/aic7xxx/aic7xxx_proc.c 		our_id = ahc->our_id;
ahc               332 drivers/scsi/aic7xxx/aic7xxx_proc.c 		if (i > 7 && (ahc->features & AHC_TWIN) != 0) {
ahc               334 drivers/scsi/aic7xxx/aic7xxx_proc.c 			our_id = ahc->our_id_b;
ahc               338 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_dump_target_state(ahc, m, our_id,