Lines Matching refs:ahc

254 ahc_print_path(struct ahc_softc *ahc, struct scb *scb)  in ahc_print_path()  argument
257 ahc->platform_data->host->host_no, in ahc_print_path()
258 scb != NULL ? SCB_GET_CHANNEL(ahc, scb) : 'X', in ahc_print_path()
259 scb != NULL ? SCB_GET_TARGET(ahc, scb) : -1, in ahc_print_path()
365 static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc,
367 static void ahc_linux_freeze_simq(struct ahc_softc *ahc);
368 static void ahc_linux_release_simq(struct ahc_softc *ahc);
370 static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
371 static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc,
400 ahc_inb(struct ahc_softc * ahc, long port) in ahc_inb() argument
404 if (ahc->tag == BUS_SPACE_MEMIO) { in ahc_inb()
405 x = readb(ahc->bsh.maddr + port); in ahc_inb()
407 x = inb(ahc->bsh.ioport + port); in ahc_inb()
414 ahc_outb(struct ahc_softc * ahc, long port, uint8_t val) in ahc_outb() argument
416 if (ahc->tag == BUS_SPACE_MEMIO) { in ahc_outb()
417 writeb(val, ahc->bsh.maddr + port); in ahc_outb()
419 outb(val, ahc->bsh.ioport + port); in ahc_outb()
425 ahc_outsb(struct ahc_softc * ahc, long port, uint8_t *array, int count) in ahc_outsb() argument
435 ahc_outb(ahc, port, *array++); in ahc_outsb()
439 ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count) in ahc_insb() argument
449 *array++ = ahc_inb(ahc, port); in ahc_insb()
455 static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
460 ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb) in ahc_linux_unmap_scb() argument
465 ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE); in ahc_linux_unmap_scb()
471 ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, in ahc_linux_map_seg() argument
485 && (ahc->flags & AHC_39BIT_ADDRESSING) != 0) in ahc_linux_map_seg()
501 struct ahc_softc *ahc; in ahc_linux_info() local
504 ahc = *(struct ahc_softc **)host->hostdata; in ahc_linux_info()
508 strcat(bp, ahc->description); in ahc_linux_info()
511 ahc_controller_info(ahc, ahc_info); in ahc_linux_info()
523 struct ahc_softc *ahc; in ahc_linux_queue_lck() local
528 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; in ahc_linux_queue_lck()
530 ahc_lock(ahc, &flags); in ahc_linux_queue_lck()
531 if (ahc->platform_data->qfrozen == 0) { in ahc_linux_queue_lck()
533 rtn = ahc_linux_run_command(ahc, dev, cmd); in ahc_linux_queue_lck()
535 ahc_unlock(ahc, &flags); in ahc_linux_queue_lck()
545 struct ahc_softc *ahc = in DEF_SCSI_QCMD() local
553 return &ahc->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
559 struct ahc_softc *ahc = in ahc_linux_target_alloc() local
561 struct seeprom_config *sc = ahc->seep_config; in ahc_linux_target_alloc()
567 unsigned int our_id = ahc->our_id; in ahc_linux_target_alloc()
575 our_id = ahc->our_id_b; in ahc_linux_target_alloc()
577 ahc_lock(ahc, &flags); in ahc_linux_target_alloc()
588 if (ahc->flags & AHC_NEWEEPROM_FMT) { in ahc_linux_target_alloc()
600 if ((ahc->features & AHC_ULTRA2) != 0) { in ahc_linux_target_alloc()
611 ahc_find_period(ahc, scsirate, maxsync); in ahc_linux_target_alloc()
616 ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0, in ahc_linux_target_alloc()
618 ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, in ahc_linux_target_alloc()
620 ahc_unlock(ahc, &flags); in ahc_linux_target_alloc()
636 struct ahc_softc *ahc = in ahc_linux_slave_alloc() local
642 printk("%s: Slave Alloc %d\n", ahc_name(ahc), sdev->id); in ahc_linux_slave_alloc()
692 struct ahc_softc *ahc; in ahc_linux_biosparam() local
695 ahc = *((struct ahc_softc **)sdev->host->hostdata); in ahc_linux_biosparam()
708 extended = (ahc->flags & AHC_EXTENDED_TRANS_A) != 0; in ahc_linux_biosparam()
710 extended = (ahc->flags & AHC_EXTENDED_TRANS_B) != 0; in ahc_linux_biosparam()
757 struct ahc_softc *ahc; in ahc_linux_bus_reset() local
761 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; in ahc_linux_bus_reset()
763 ahc_lock(ahc, &flags); in ahc_linux_bus_reset()
764 found = ahc_reset_channel(ahc, scmd_channel(cmd) + 'A', in ahc_linux_bus_reset()
766 ahc_unlock(ahc, &flags); in ahc_linux_bus_reset()
770 "%d SCBs aborted.\n", ahc_name(ahc), found); in ahc_linux_bus_reset()
802 #define BUILD_SCSIID(ahc, cmd) \ argument
804 | (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
809 ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent, in ahc_dma_tag_create() argument
837 ahc_dma_tag_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat) in ahc_dma_tag_destroy() argument
843 ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr, in ahc_dmamem_alloc() argument
847 *vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC); in ahc_dmamem_alloc()
854 ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat, in ahc_dmamem_free() argument
857 dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map); in ahc_dmamem_free()
861 ahc_dmamap_load(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map, in ahc_dmamap_load() argument
878 ahc_dmamap_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map) in ahc_dmamap_destroy() argument
883 ahc_dmamap_unload(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map) in ahc_dmamap_unload() argument
1069 ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template) in ahc_linux_register_host() argument
1077 template->name = ahc->description; in ahc_linux_register_host()
1082 *((struct ahc_softc **)host->hostdata) = ahc; in ahc_linux_register_host()
1083 ahc->platform_data->host = host; in ahc_linux_register_host()
1087 host->this_id = ahc->our_id; in ahc_linux_register_host()
1088 host->irq = ahc->platform_data->irq; in ahc_linux_register_host()
1089 host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8; in ahc_linux_register_host()
1091 host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0; in ahc_linux_register_host()
1093 ahc_lock(ahc, &s); in ahc_linux_register_host()
1094 ahc_set_unit(ahc, ahc_linux_unit++); in ahc_linux_register_host()
1095 ahc_unlock(ahc, &s); in ahc_linux_register_host()
1100 ahc_set_name(ahc, new_name); in ahc_linux_register_host()
1102 host->unique_id = ahc->unit; in ahc_linux_register_host()
1103 ahc_linux_initialize_scsi_bus(ahc); in ahc_linux_register_host()
1104 ahc_intr_enable(ahc, TRUE); in ahc_linux_register_host()
1108 retval = scsi_add_host(host, ahc->dev); in ahc_linux_register_host()
1125 ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc) in ahc_linux_initialize_scsi_bus() argument
1134 ahc_lock(ahc, &s); in ahc_linux_initialize_scsi_bus()
1137 ahc->flags &= ~(AHC_RESET_BUS_A|AHC_RESET_BUS_B); in ahc_linux_initialize_scsi_bus()
1139 if ((ahc->flags & AHC_RESET_BUS_A) != 0) in ahc_linux_initialize_scsi_bus()
1140 ahc_reset_channel(ahc, 'A', /*initiate_reset*/TRUE); in ahc_linux_initialize_scsi_bus()
1142 numtarg = (ahc->features & AHC_WIDE) ? 16 : 8; in ahc_linux_initialize_scsi_bus()
1144 if ((ahc->features & AHC_TWIN) != 0) { in ahc_linux_initialize_scsi_bus()
1146 if ((ahc->flags & AHC_RESET_BUS_B) != 0) { in ahc_linux_initialize_scsi_bus()
1147 ahc_reset_channel(ahc, 'B', /*initiate_reset*/TRUE); in ahc_linux_initialize_scsi_bus()
1168 our_id = ahc->our_id; in ahc_linux_initialize_scsi_bus()
1170 if (i > 7 && (ahc->features & AHC_TWIN) != 0) { in ahc_linux_initialize_scsi_bus()
1172 our_id = ahc->our_id_b; in ahc_linux_initialize_scsi_bus()
1175 tinfo = ahc_fetch_transinfo(ahc, channel, our_id, in ahc_linux_initialize_scsi_bus()
1179 ahc_update_neg_request(ahc, &devinfo, tstate, in ahc_linux_initialize_scsi_bus()
1182 ahc_unlock(ahc, &s); in ahc_linux_initialize_scsi_bus()
1184 if ((ahc->flags & (AHC_RESET_BUS_A|AHC_RESET_BUS_B)) != 0) { in ahc_linux_initialize_scsi_bus()
1185 ahc_linux_freeze_simq(ahc); in ahc_linux_initialize_scsi_bus()
1187 ahc_linux_release_simq(ahc); in ahc_linux_initialize_scsi_bus()
1192 ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg) in ahc_platform_alloc() argument
1195 ahc->platform_data = in ahc_platform_alloc()
1197 if (ahc->platform_data == NULL) in ahc_platform_alloc()
1199 ahc->platform_data->irq = AHC_LINUX_NOIRQ; in ahc_platform_alloc()
1200 ahc_lockinit(ahc); in ahc_platform_alloc()
1201 ahc->seltime = (aic7xxx_seltime & 0x3) << 4; in ahc_platform_alloc()
1202 ahc->seltime_b = (aic7xxx_seltime & 0x3) << 4; in ahc_platform_alloc()
1204 ahc->flags |= AHC_DISABLE_PCI_PERR; in ahc_platform_alloc()
1210 ahc_platform_free(struct ahc_softc *ahc) in ahc_platform_free() argument
1215 if (ahc->platform_data != NULL) { in ahc_platform_free()
1218 starget = ahc->platform_data->starget[i]; in ahc_platform_free()
1220 ahc->platform_data->starget[i] = NULL; in ahc_platform_free()
1224 if (ahc->platform_data->irq != AHC_LINUX_NOIRQ) in ahc_platform_free()
1225 free_irq(ahc->platform_data->irq, ahc); in ahc_platform_free()
1226 if (ahc->tag == BUS_SPACE_PIO in ahc_platform_free()
1227 && ahc->bsh.ioport != 0) in ahc_platform_free()
1228 release_region(ahc->bsh.ioport, 256); in ahc_platform_free()
1229 if (ahc->tag == BUS_SPACE_MEMIO in ahc_platform_free()
1230 && ahc->bsh.maddr != NULL) { in ahc_platform_free()
1231 iounmap(ahc->bsh.maddr); in ahc_platform_free()
1232 release_mem_region(ahc->platform_data->mem_busaddr, in ahc_platform_free()
1236 if (ahc->platform_data->host) in ahc_platform_free()
1237 scsi_host_put(ahc->platform_data->host); in ahc_platform_free()
1239 kfree(ahc->platform_data); in ahc_platform_free()
1244 ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb) in ahc_platform_freeze_devq() argument
1246 ahc_platform_abort_scbs(ahc, SCB_GET_TARGET(ahc, scb), in ahc_platform_freeze_devq()
1247 SCB_GET_CHANNEL(ahc, scb), in ahc_platform_freeze_devq()
1253 ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev, in ahc_platform_set_tags() argument
1288 usertags = ahc_linux_user_tagdepth(ahc, devinfo); in ahc_platform_set_tags()
1333 ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel, in ahc_platform_abort_scbs() argument
1340 ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) in ahc_linux_user_tagdepth() argument
1346 if ((ahc->user_discenable & devinfo->target_mask) != 0) { in ahc_linux_user_tagdepth()
1347 if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) { in ahc_linux_user_tagdepth()
1361 tag_info = &aic7xxx_tag_info[ahc->unit]; in ahc_linux_user_tagdepth()
1378 struct ahc_softc *ahc = *((struct ahc_softc **)sdev->host->hostdata); in ahc_linux_device_queue_depth() local
1382 ? ahc->our_id : ahc->our_id_b, in ahc_linux_device_queue_depth()
1386 tags = ahc_linux_user_tagdepth(ahc, &devinfo); in ahc_linux_device_queue_depth()
1389 ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_TAGGED); in ahc_linux_device_queue_depth()
1390 ahc_send_async(ahc, devinfo.channel, devinfo.target, in ahc_linux_device_queue_depth()
1392 ahc_print_devinfo(ahc, &devinfo); in ahc_linux_device_queue_depth()
1395 ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_NONE); in ahc_linux_device_queue_depth()
1396 ahc_send_async(ahc, devinfo.channel, devinfo.target, in ahc_linux_device_queue_depth()
1402 ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev, in ahc_linux_run_command() argument
1417 if (ahc->platform_data->qfrozen != 0) in ahc_linux_run_command()
1427 && (ahc->features & AHC_SCB_BTT) == 0) { in ahc_linux_run_command()
1431 untagged_q = &(ahc->untagged_queues[target_offset]); in ahc_linux_run_command()
1445 scb = ahc_get_scb(ahc); in ahc_linux_run_command()
1460 hscb->scsiid = BUILD_SCSIID(ahc, cmd); in ahc_linux_run_command()
1462 mask = SCB_GET_TARGET_MASK(ahc, scb); in ahc_linux_run_command()
1463 tinfo = ahc_fetch_transinfo(ahc, SCB_GET_CHANNEL(ahc, scb), in ahc_linux_run_command()
1465 SCB_GET_TARGET(ahc, scb), &tstate); in ahc_linux_run_command()
1471 if ((ahc->user_discenable & mask) != 0) in ahc_linux_run_command()
1520 consumed = ahc_linux_map_seg(ahc, scb, in ahc_linux_run_command()
1547 LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links); in ahc_linux_run_command()
1559 ahc_queue_scb(ahc, scb); in ahc_linux_run_command()
1569 struct ahc_softc *ahc; in ahc_linux_isr() local
1573 ahc = (struct ahc_softc *) dev_id; in ahc_linux_isr()
1574 ahc_lock(ahc, &flags); in ahc_linux_isr()
1575 ours = ahc_intr(ahc); in ahc_linux_isr()
1576 ahc_unlock(ahc, &flags); in ahc_linux_isr()
1581 ahc_platform_flushwork(struct ahc_softc *ahc) in ahc_platform_flushwork() argument
1587 ahc_send_async(struct ahc_softc *ahc, char channel, in ahc_send_async() argument
1601 tinfo = ahc_fetch_transinfo(ahc, channel, in ahc_send_async()
1602 channel == 'A' ? ahc->our_id in ahc_send_async()
1603 : ahc->our_id_b, in ahc_send_async()
1624 starget = ahc->platform_data->starget[target_offset]; in ahc_send_async()
1652 scsi_report_device_reset(ahc->platform_data->host, in ahc_send_async()
1657 if (ahc->platform_data->host != NULL) { in ahc_send_async()
1658 scsi_report_bus_reset(ahc->platform_data->host, in ahc_send_async()
1671 ahc_done(struct ahc_softc *ahc, struct scb *scb) in ahc_done() argument
1681 target_offset = SCB_GET_TARGET_OFFSET(ahc, scb); in ahc_done()
1682 untagged_q = &(ahc->untagged_queues[target_offset]); in ahc_done()
1692 ahc_dump_card_state(ahc); in ahc_done()
1703 ahc_linux_unmap_scb(ahc, scb); in ahc_done()
1722 ahc_print_path(ahc, scb); in ahc_done()
1740 ahc_print_path(ahc, scb); in ahc_done()
1745 ahc_print_path(ahc, scb); in ahc_done()
1756 ahc_linux_handle_scsi_status(ahc, cmd->device, scb); in ahc_done()
1784 if (ahc->platform_data->eh_done) in ahc_done()
1785 complete(ahc->platform_data->eh_done); in ahc_done()
1788 ahc_free_scb(ahc, scb); in ahc_done()
1789 ahc_linux_queue_cmd_complete(ahc, cmd); in ahc_done()
1793 ahc_linux_handle_scsi_status(struct ahc_softc *ahc, in ahc_linux_handle_scsi_status() argument
1800 ahc->our_id, in ahc_linux_handle_scsi_status()
1835 ahc_get_sense_buf(ahc, scb), sense_size); in ahc_linux_handle_scsi_status()
1891 ahc_print_path(ahc, scb); in ahc_linux_handle_scsi_status()
1901 ahc_platform_set_tags(ahc, sdev, &devinfo, in ahc_linux_handle_scsi_status()
1912 ahc_platform_set_tags(ahc, sdev, &devinfo, in ahc_linux_handle_scsi_status()
1921 ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, struct scsi_cmnd *cmd) in ahc_linux_queue_cmd_complete() argument
1991 ahc_linux_freeze_simq(struct ahc_softc *ahc) in ahc_linux_freeze_simq() argument
1995 ahc_lock(ahc, &s); in ahc_linux_freeze_simq()
1996 ahc->platform_data->qfrozen++; in ahc_linux_freeze_simq()
1997 if (ahc->platform_data->qfrozen == 1) { in ahc_linux_freeze_simq()
1998 scsi_block_requests(ahc->platform_data->host); in ahc_linux_freeze_simq()
2001 ahc_platform_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS, in ahc_linux_freeze_simq()
2005 ahc_unlock(ahc, &s); in ahc_linux_freeze_simq()
2009 ahc_linux_release_simq(struct ahc_softc *ahc) in ahc_linux_release_simq() argument
2015 ahc_lock(ahc, &s); in ahc_linux_release_simq()
2016 if (ahc->platform_data->qfrozen > 0) in ahc_linux_release_simq()
2017 ahc->platform_data->qfrozen--; in ahc_linux_release_simq()
2018 if (ahc->platform_data->qfrozen == 0) in ahc_linux_release_simq()
2020 ahc_unlock(ahc, &s); in ahc_linux_release_simq()
2028 scsi_unblock_requests(ahc->platform_data->host); in ahc_linux_release_simq()
2034 struct ahc_softc *ahc; in ahc_linux_queue_recovery_cmd() local
2052 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; in ahc_linux_queue_recovery_cmd()
2062 ahc_lock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2079 ahc_name(ahc), cmd->device->channel, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2086 && ahc_search_untagged_queues(ahc, cmd, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2091 ahc_name(ahc), cmd->device->channel, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2100 LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) { in ahc_linux_queue_recovery_cmd()
2108 LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) { in ahc_linux_queue_recovery_cmd()
2109 if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), in ahc_linux_queue_recovery_cmd()
2135 was_paused = ahc_is_paused(ahc); in ahc_linux_queue_recovery_cmd()
2136 ahc_pause_and_flushwork(ahc); in ahc_linux_queue_recovery_cmd()
2145 ahc_name(ahc), was_paused ? "" : "not "); in ahc_linux_queue_recovery_cmd()
2146 ahc_dump_card_state(ahc); in ahc_linux_queue_recovery_cmd()
2150 if (ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2157 ahc_name(ahc), cmd->device->channel, in ahc_linux_queue_recovery_cmd()
2162 } else if (ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2171 if (disconnected && (ahc_inb(ahc, SEQ_FLAGS) & NOT_IDENTIFIED) == 0) { in ahc_linux_queue_recovery_cmd()
2174 bus_scb = ahc_lookup_scb(ahc, ahc_inb(ahc, SCB_TAG)); in ahc_linux_queue_recovery_cmd()
2178 && ahc_inb(ahc, SAVED_SCSIID) == pending_scb->hscb->scsiid in ahc_linux_queue_recovery_cmd()
2179 && ahc_inb(ahc, SAVED_LUN) == SCB_GET_LUN(pending_scb)) in ahc_linux_queue_recovery_cmd()
2191 last_phase = ahc_inb(ahc, LASTPHASE); in ahc_linux_queue_recovery_cmd()
2192 saved_scbptr = ahc_inb(ahc, SCBPTR); in ahc_linux_queue_recovery_cmd()
2193 active_scb_index = ahc_inb(ahc, SCB_TAG); in ahc_linux_queue_recovery_cmd()
2194 saved_scsiid = ahc_inb(ahc, SAVED_SCSIID); in ahc_linux_queue_recovery_cmd()
2198 && SCSIID_TARGET(ahc, saved_scsiid) == scmd_id(cmd)))) { in ahc_linux_queue_recovery_cmd()
2204 pending_scb = ahc_lookup_scb(ahc, active_scb_index); in ahc_linux_queue_recovery_cmd()
2206 ahc_outb(ahc, MSG_OUT, HOST_MSG); in ahc_linux_queue_recovery_cmd()
2207 ahc_outb(ahc, SCSISIGO, last_phase|ATNO); in ahc_linux_queue_recovery_cmd()
2238 ahc_search_disc_list(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2252 if ((ahc->flags & AHC_PAGESCBS) == 0) { in ahc_linux_queue_recovery_cmd()
2253 ahc_outb(ahc, SCBPTR, pending_scb->hscb->tag); in ahc_linux_queue_recovery_cmd()
2254 ahc_outb(ahc, SCB_CONTROL, in ahc_linux_queue_recovery_cmd()
2255 ahc_inb(ahc, SCB_CONTROL)|MK_MESSAGE); in ahc_linux_queue_recovery_cmd()
2263 ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2268 ahc_qinfifo_requeue_tail(ahc, pending_scb); in ahc_linux_queue_recovery_cmd()
2269 ahc_outb(ahc, SCBPTR, saved_scbptr); in ahc_linux_queue_recovery_cmd()
2270 ahc_print_path(ahc, pending_scb); in ahc_linux_queue_recovery_cmd()
2289 ahc_unpause(ahc); in ahc_linux_queue_recovery_cmd()
2293 ahc->platform_data->eh_done = &done; in ahc_linux_queue_recovery_cmd()
2294 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2298 ahc_lock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2299 ahc->platform_data->eh_done = NULL; in ahc_linux_queue_recovery_cmd()
2300 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2307 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2314 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_width() local
2320 ahc_lock(ahc, &flags); in ahc_linux_set_width()
2321 ahc_set_width(ahc, &devinfo, width, AHC_TRANS_GOAL, FALSE); in ahc_linux_set_width()
2322 ahc_unlock(ahc, &flags); in ahc_linux_set_width()
2328 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_period() local
2331 = ahc_fetch_transinfo(ahc, in ahc_linux_set_period()
2362 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, in ahc_linux_set_period()
2364 ahc_lock(ahc, &flags); in ahc_linux_set_period()
2365 ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, in ahc_linux_set_period()
2367 ahc_unlock(ahc, &flags); in ahc_linux_set_period()
2373 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_offset() local
2376 = ahc_fetch_transinfo(ahc, in ahc_linux_set_offset()
2388 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, in ahc_linux_set_offset()
2393 ahc_lock(ahc, &flags); in ahc_linux_set_offset()
2394 ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, in ahc_linux_set_offset()
2396 ahc_unlock(ahc, &flags); in ahc_linux_set_offset()
2402 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_dt() local
2405 = ahc_fetch_transinfo(ahc, in ahc_linux_set_dt()
2425 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, in ahc_linux_set_dt()
2427 ahc_lock(ahc, &flags); in ahc_linux_set_dt()
2428 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset, in ahc_linux_set_dt()
2430 ahc_unlock(ahc, &flags); in ahc_linux_set_dt()
2441 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2444 = ahc_fetch_transinfo(ahc,
2459 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
2461 ahc_lock(ahc, &flags);
2462 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
2464 ahc_unlock(ahc, &flags);
2470 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2473 = ahc_fetch_transinfo(ahc,
2488 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
2490 ahc_lock(ahc, &flags);
2491 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
2493 ahc_unlock(ahc, &flags);
2499 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; in ahc_linux_get_signalling() local
2503 if (!(ahc->features & AHC_ULTRA2)) { in ahc_linux_get_signalling()
2506 ahc->features & AHC_HVD ? in ahc_linux_get_signalling()
2512 ahc_lock(ahc, &flags); in ahc_linux_get_signalling()
2513 ahc_pause(ahc); in ahc_linux_get_signalling()
2514 mode = ahc_inb(ahc, SBLKCTL); in ahc_linux_get_signalling()
2515 ahc_unpause(ahc); in ahc_linux_get_signalling()
2516 ahc_unlock(ahc, &flags); in ahc_linux_get_signalling()