Lines Matching refs:ahc

253 ahc_print_path(struct ahc_softc *ahc, struct scb *scb)  in ahc_print_path()  argument
256 ahc->platform_data->host->host_no, in ahc_print_path()
257 scb != NULL ? SCB_GET_CHANNEL(ahc, scb) : 'X', in ahc_print_path()
258 scb != NULL ? SCB_GET_TARGET(ahc, scb) : -1, in ahc_print_path()
364 static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc,
366 static void ahc_linux_freeze_simq(struct ahc_softc *ahc);
367 static void ahc_linux_release_simq(struct ahc_softc *ahc);
369 static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
370 static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc,
399 ahc_inb(struct ahc_softc * ahc, long port) in ahc_inb() argument
403 if (ahc->tag == BUS_SPACE_MEMIO) { in ahc_inb()
404 x = readb(ahc->bsh.maddr + port); in ahc_inb()
406 x = inb(ahc->bsh.ioport + port); in ahc_inb()
413 ahc_outb(struct ahc_softc * ahc, long port, uint8_t val) in ahc_outb() argument
415 if (ahc->tag == BUS_SPACE_MEMIO) { in ahc_outb()
416 writeb(val, ahc->bsh.maddr + port); in ahc_outb()
418 outb(val, ahc->bsh.ioport + port); in ahc_outb()
424 ahc_outsb(struct ahc_softc * ahc, long port, uint8_t *array, int count) in ahc_outsb() argument
434 ahc_outb(ahc, port, *array++); in ahc_outsb()
438 ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count) in ahc_insb() argument
448 *array++ = ahc_inb(ahc, port); in ahc_insb()
454 static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
459 ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb) in ahc_linux_unmap_scb() argument
464 ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE); in ahc_linux_unmap_scb()
470 ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, in ahc_linux_map_seg() argument
484 && (ahc->flags & AHC_39BIT_ADDRESSING) != 0) in ahc_linux_map_seg()
500 struct ahc_softc *ahc; in ahc_linux_info() local
503 ahc = *(struct ahc_softc **)host->hostdata; in ahc_linux_info()
507 strcat(bp, ahc->description); in ahc_linux_info()
510 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()
534 rtn = ahc_linux_run_command(ahc, dev, cmd); in ahc_linux_queue_lck()
536 ahc_unlock(ahc, &flags); in ahc_linux_queue_lck()
546 struct ahc_softc *ahc = in DEF_SCSI_QCMD() local
554 return &ahc->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
560 struct ahc_softc *ahc = in ahc_linux_target_alloc() local
562 struct seeprom_config *sc = ahc->seep_config; in ahc_linux_target_alloc()
570 unsigned int our_id = ahc->our_id; in ahc_linux_target_alloc()
578 our_id = ahc->our_id_b; in ahc_linux_target_alloc()
580 ahc_lock(ahc, &flags); in ahc_linux_target_alloc()
591 if (ahc->flags & AHC_NEWEEPROM_FMT) { in ahc_linux_target_alloc()
603 if ((ahc->features & AHC_ULTRA2) != 0) { in ahc_linux_target_alloc()
614 ahc_find_period(ahc, scsirate, maxsync); in ahc_linux_target_alloc()
616 tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id, in ahc_linux_target_alloc()
622 ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0, in ahc_linux_target_alloc()
624 ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, in ahc_linux_target_alloc()
626 ahc_unlock(ahc, &flags); in ahc_linux_target_alloc()
642 struct ahc_softc *ahc = in ahc_linux_slave_alloc() local
648 printk("%s: Slave Alloc %d\n", ahc_name(ahc), sdev->id); in ahc_linux_slave_alloc()
674 struct ahc_softc *ahc; in ahc_linux_slave_configure() local
676 ahc = *((struct ahc_softc **)sdev->host->hostdata); in ahc_linux_slave_configure()
704 struct ahc_softc *ahc; in ahc_linux_biosparam() local
707 ahc = *((struct ahc_softc **)sdev->host->hostdata); in ahc_linux_biosparam()
725 extended = (ahc->flags & AHC_EXTENDED_TRANS_A) != 0; in ahc_linux_biosparam()
727 extended = (ahc->flags & AHC_EXTENDED_TRANS_B) != 0; in ahc_linux_biosparam()
774 struct ahc_softc *ahc; in ahc_linux_bus_reset() local
778 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; in ahc_linux_bus_reset()
780 ahc_lock(ahc, &flags); in ahc_linux_bus_reset()
781 found = ahc_reset_channel(ahc, scmd_channel(cmd) + 'A', in ahc_linux_bus_reset()
783 ahc_unlock(ahc, &flags); in ahc_linux_bus_reset()
787 "%d SCBs aborted.\n", ahc_name(ahc), found); in ahc_linux_bus_reset()
820 #define BUILD_SCSIID(ahc, cmd) \ argument
822 | (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
827 ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent, in ahc_dma_tag_create() argument
855 ahc_dma_tag_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat) in ahc_dma_tag_destroy() argument
861 ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr, in ahc_dmamem_alloc() argument
864 *vaddr = pci_alloc_consistent(ahc->dev_softc, in ahc_dmamem_alloc()
872 ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat, in ahc_dmamem_free() argument
875 pci_free_consistent(ahc->dev_softc, dmat->maxsize, in ahc_dmamem_free()
880 ahc_dmamap_load(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map, in ahc_dmamap_load() argument
897 ahc_dmamap_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map) in ahc_dmamap_destroy() argument
902 ahc_dmamap_unload(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map) in ahc_dmamap_unload() argument
1088 ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template) in ahc_linux_register_host() argument
1096 template->name = ahc->description; in ahc_linux_register_host()
1101 *((struct ahc_softc **)host->hostdata) = ahc; in ahc_linux_register_host()
1102 ahc->platform_data->host = host; in ahc_linux_register_host()
1106 host->this_id = ahc->our_id; in ahc_linux_register_host()
1107 host->irq = ahc->platform_data->irq; in ahc_linux_register_host()
1108 host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8; in ahc_linux_register_host()
1110 host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0; in ahc_linux_register_host()
1112 ahc_lock(ahc, &s); in ahc_linux_register_host()
1113 ahc_set_unit(ahc, ahc_linux_unit++); in ahc_linux_register_host()
1114 ahc_unlock(ahc, &s); in ahc_linux_register_host()
1119 ahc_set_name(ahc, new_name); in ahc_linux_register_host()
1121 host->unique_id = ahc->unit; in ahc_linux_register_host()
1122 ahc_linux_initialize_scsi_bus(ahc); in ahc_linux_register_host()
1123 ahc_intr_enable(ahc, TRUE); in ahc_linux_register_host()
1128 (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); in ahc_linux_register_host()
1145 ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc) in ahc_linux_initialize_scsi_bus() argument
1154 ahc_lock(ahc, &s); in ahc_linux_initialize_scsi_bus()
1157 ahc->flags &= ~(AHC_RESET_BUS_A|AHC_RESET_BUS_B); in ahc_linux_initialize_scsi_bus()
1159 if ((ahc->flags & AHC_RESET_BUS_A) != 0) in ahc_linux_initialize_scsi_bus()
1160 ahc_reset_channel(ahc, 'A', /*initiate_reset*/TRUE); in ahc_linux_initialize_scsi_bus()
1162 numtarg = (ahc->features & AHC_WIDE) ? 16 : 8; in ahc_linux_initialize_scsi_bus()
1164 if ((ahc->features & AHC_TWIN) != 0) { in ahc_linux_initialize_scsi_bus()
1166 if ((ahc->flags & AHC_RESET_BUS_B) != 0) { in ahc_linux_initialize_scsi_bus()
1167 ahc_reset_channel(ahc, 'B', /*initiate_reset*/TRUE); in ahc_linux_initialize_scsi_bus()
1188 our_id = ahc->our_id; in ahc_linux_initialize_scsi_bus()
1190 if (i > 7 && (ahc->features & AHC_TWIN) != 0) { in ahc_linux_initialize_scsi_bus()
1192 our_id = ahc->our_id_b; in ahc_linux_initialize_scsi_bus()
1195 tinfo = ahc_fetch_transinfo(ahc, channel, our_id, in ahc_linux_initialize_scsi_bus()
1199 ahc_update_neg_request(ahc, &devinfo, tstate, in ahc_linux_initialize_scsi_bus()
1202 ahc_unlock(ahc, &s); in ahc_linux_initialize_scsi_bus()
1204 if ((ahc->flags & (AHC_RESET_BUS_A|AHC_RESET_BUS_B)) != 0) { in ahc_linux_initialize_scsi_bus()
1205 ahc_linux_freeze_simq(ahc); in ahc_linux_initialize_scsi_bus()
1207 ahc_linux_release_simq(ahc); in ahc_linux_initialize_scsi_bus()
1212 ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg) in ahc_platform_alloc() argument
1215 ahc->platform_data = in ahc_platform_alloc()
1217 if (ahc->platform_data == NULL) in ahc_platform_alloc()
1219 ahc->platform_data->irq = AHC_LINUX_NOIRQ; in ahc_platform_alloc()
1220 ahc_lockinit(ahc); in ahc_platform_alloc()
1221 ahc->seltime = (aic7xxx_seltime & 0x3) << 4; in ahc_platform_alloc()
1222 ahc->seltime_b = (aic7xxx_seltime & 0x3) << 4; in ahc_platform_alloc()
1224 ahc->flags |= AHC_DISABLE_PCI_PERR; in ahc_platform_alloc()
1230 ahc_platform_free(struct ahc_softc *ahc) in ahc_platform_free() argument
1235 if (ahc->platform_data != NULL) { in ahc_platform_free()
1238 starget = ahc->platform_data->starget[i]; in ahc_platform_free()
1240 ahc->platform_data->starget[i] = NULL; in ahc_platform_free()
1244 if (ahc->platform_data->irq != AHC_LINUX_NOIRQ) in ahc_platform_free()
1245 free_irq(ahc->platform_data->irq, ahc); in ahc_platform_free()
1246 if (ahc->tag == BUS_SPACE_PIO in ahc_platform_free()
1247 && ahc->bsh.ioport != 0) in ahc_platform_free()
1248 release_region(ahc->bsh.ioport, 256); in ahc_platform_free()
1249 if (ahc->tag == BUS_SPACE_MEMIO in ahc_platform_free()
1250 && ahc->bsh.maddr != NULL) { in ahc_platform_free()
1251 iounmap(ahc->bsh.maddr); in ahc_platform_free()
1252 release_mem_region(ahc->platform_data->mem_busaddr, in ahc_platform_free()
1256 if (ahc->platform_data->host) in ahc_platform_free()
1257 scsi_host_put(ahc->platform_data->host); in ahc_platform_free()
1259 kfree(ahc->platform_data); in ahc_platform_free()
1264 ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb) in ahc_platform_freeze_devq() argument
1266 ahc_platform_abort_scbs(ahc, SCB_GET_TARGET(ahc, scb), in ahc_platform_freeze_devq()
1267 SCB_GET_CHANNEL(ahc, scb), in ahc_platform_freeze_devq()
1273 ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev, in ahc_platform_set_tags() argument
1308 usertags = ahc_linux_user_tagdepth(ahc, devinfo); in ahc_platform_set_tags()
1353 ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel, in ahc_platform_abort_scbs() argument
1360 ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) in ahc_linux_user_tagdepth() argument
1366 if ((ahc->user_discenable & devinfo->target_mask) != 0) { in ahc_linux_user_tagdepth()
1367 if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) { in ahc_linux_user_tagdepth()
1381 tag_info = &aic7xxx_tag_info[ahc->unit]; in ahc_linux_user_tagdepth()
1398 struct ahc_softc *ahc = *((struct ahc_softc **)sdev->host->hostdata); in ahc_linux_device_queue_depth() local
1402 ? ahc->our_id : ahc->our_id_b, in ahc_linux_device_queue_depth()
1406 tags = ahc_linux_user_tagdepth(ahc, &devinfo); in ahc_linux_device_queue_depth()
1409 ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_TAGGED); in ahc_linux_device_queue_depth()
1410 ahc_send_async(ahc, devinfo.channel, devinfo.target, in ahc_linux_device_queue_depth()
1412 ahc_print_devinfo(ahc, &devinfo); in ahc_linux_device_queue_depth()
1415 ahc_platform_set_tags(ahc, sdev, &devinfo, AHC_QUEUE_NONE); in ahc_linux_device_queue_depth()
1416 ahc_send_async(ahc, devinfo.channel, devinfo.target, in ahc_linux_device_queue_depth()
1422 ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev, in ahc_linux_run_command() argument
1437 if (ahc->platform_data->qfrozen != 0) in ahc_linux_run_command()
1447 && (ahc->features & AHC_SCB_BTT) == 0) { in ahc_linux_run_command()
1451 untagged_q = &(ahc->untagged_queues[target_offset]); in ahc_linux_run_command()
1465 scb = ahc_get_scb(ahc); in ahc_linux_run_command()
1480 hscb->scsiid = BUILD_SCSIID(ahc, cmd); in ahc_linux_run_command()
1482 mask = SCB_GET_TARGET_MASK(ahc, scb); in ahc_linux_run_command()
1483 tinfo = ahc_fetch_transinfo(ahc, SCB_GET_CHANNEL(ahc, scb), in ahc_linux_run_command()
1485 SCB_GET_TARGET(ahc, scb), &tstate); in ahc_linux_run_command()
1491 if ((ahc->user_discenable & mask) != 0) in ahc_linux_run_command()
1540 consumed = ahc_linux_map_seg(ahc, scb, in ahc_linux_run_command()
1567 LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links); in ahc_linux_run_command()
1579 ahc_queue_scb(ahc, scb); in ahc_linux_run_command()
1589 struct ahc_softc *ahc; in ahc_linux_isr() local
1593 ahc = (struct ahc_softc *) dev_id; in ahc_linux_isr()
1594 ahc_lock(ahc, &flags); in ahc_linux_isr()
1595 ours = ahc_intr(ahc); in ahc_linux_isr()
1596 ahc_unlock(ahc, &flags); in ahc_linux_isr()
1601 ahc_platform_flushwork(struct ahc_softc *ahc) in ahc_platform_flushwork() argument
1607 ahc_send_async(struct ahc_softc *ahc, char channel, in ahc_send_async() argument
1622 tinfo = ahc_fetch_transinfo(ahc, channel, in ahc_send_async()
1623 channel == 'A' ? ahc->our_id in ahc_send_async()
1624 : ahc->our_id_b, in ahc_send_async()
1645 starget = ahc->platform_data->starget[target_offset]; in ahc_send_async()
1674 scsi_report_device_reset(ahc->platform_data->host, in ahc_send_async()
1679 if (ahc->platform_data->host != NULL) { in ahc_send_async()
1680 scsi_report_bus_reset(ahc->platform_data->host, in ahc_send_async()
1693 ahc_done(struct ahc_softc *ahc, struct scb *scb) in ahc_done() argument
1703 target_offset = SCB_GET_TARGET_OFFSET(ahc, scb); in ahc_done()
1704 untagged_q = &(ahc->untagged_queues[target_offset]); in ahc_done()
1714 ahc_dump_card_state(ahc); in ahc_done()
1725 ahc_linux_unmap_scb(ahc, scb); in ahc_done()
1742 ahc_print_path(ahc, scb); in ahc_done()
1760 ahc_print_path(ahc, scb); in ahc_done()
1765 ahc_print_path(ahc, scb); in ahc_done()
1776 ahc_linux_handle_scsi_status(ahc, cmd->device, scb); in ahc_done()
1804 if (ahc->platform_data->eh_done) in ahc_done()
1805 complete(ahc->platform_data->eh_done); in ahc_done()
1808 ahc_free_scb(ahc, scb); in ahc_done()
1809 ahc_linux_queue_cmd_complete(ahc, cmd); in ahc_done()
1813 ahc_linux_handle_scsi_status(struct ahc_softc *ahc, in ahc_linux_handle_scsi_status() argument
1820 ahc->our_id, in ahc_linux_handle_scsi_status()
1855 ahc_get_sense_buf(ahc, scb), sense_size); in ahc_linux_handle_scsi_status()
1912 ahc_print_path(ahc, scb); in ahc_linux_handle_scsi_status()
1922 ahc_platform_set_tags(ahc, sdev, &devinfo, in ahc_linux_handle_scsi_status()
1933 ahc_platform_set_tags(ahc, sdev, &devinfo, in ahc_linux_handle_scsi_status()
1942 ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, struct scsi_cmnd *cmd) in ahc_linux_queue_cmd_complete() argument
2012 ahc_linux_freeze_simq(struct ahc_softc *ahc) in ahc_linux_freeze_simq() argument
2016 ahc_lock(ahc, &s); in ahc_linux_freeze_simq()
2017 ahc->platform_data->qfrozen++; in ahc_linux_freeze_simq()
2018 if (ahc->platform_data->qfrozen == 1) { in ahc_linux_freeze_simq()
2019 scsi_block_requests(ahc->platform_data->host); in ahc_linux_freeze_simq()
2022 ahc_platform_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS, in ahc_linux_freeze_simq()
2026 ahc_unlock(ahc, &s); in ahc_linux_freeze_simq()
2030 ahc_linux_release_simq(struct ahc_softc *ahc) in ahc_linux_release_simq() argument
2036 ahc_lock(ahc, &s); in ahc_linux_release_simq()
2037 if (ahc->platform_data->qfrozen > 0) in ahc_linux_release_simq()
2038 ahc->platform_data->qfrozen--; in ahc_linux_release_simq()
2039 if (ahc->platform_data->qfrozen == 0) in ahc_linux_release_simq()
2041 ahc_unlock(ahc, &s); in ahc_linux_release_simq()
2049 scsi_unblock_requests(ahc->platform_data->host); in ahc_linux_release_simq()
2055 struct ahc_softc *ahc; in ahc_linux_queue_recovery_cmd() local
2073 ahc = *(struct ahc_softc **)cmd->device->host->hostdata; in ahc_linux_queue_recovery_cmd()
2083 ahc_lock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2100 ahc_name(ahc), cmd->device->channel, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2107 && ahc_search_untagged_queues(ahc, cmd, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2112 ahc_name(ahc), cmd->device->channel, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2121 LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) { in ahc_linux_queue_recovery_cmd()
2129 LIST_FOREACH(pending_scb, &ahc->pending_scbs, pending_links) { in ahc_linux_queue_recovery_cmd()
2130 if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), in ahc_linux_queue_recovery_cmd()
2156 was_paused = ahc_is_paused(ahc); in ahc_linux_queue_recovery_cmd()
2157 ahc_pause_and_flushwork(ahc); in ahc_linux_queue_recovery_cmd()
2166 ahc_name(ahc), was_paused ? "" : "not "); in ahc_linux_queue_recovery_cmd()
2167 ahc_dump_card_state(ahc); in ahc_linux_queue_recovery_cmd()
2171 if (ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2178 ahc_name(ahc), cmd->device->channel, in ahc_linux_queue_recovery_cmd()
2183 } else if (ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2192 if (disconnected && (ahc_inb(ahc, SEQ_FLAGS) & NOT_IDENTIFIED) == 0) { in ahc_linux_queue_recovery_cmd()
2195 bus_scb = ahc_lookup_scb(ahc, ahc_inb(ahc, SCB_TAG)); in ahc_linux_queue_recovery_cmd()
2199 && ahc_inb(ahc, SAVED_SCSIID) == pending_scb->hscb->scsiid in ahc_linux_queue_recovery_cmd()
2200 && ahc_inb(ahc, SAVED_LUN) == SCB_GET_LUN(pending_scb)) in ahc_linux_queue_recovery_cmd()
2212 last_phase = ahc_inb(ahc, LASTPHASE); in ahc_linux_queue_recovery_cmd()
2213 saved_scbptr = ahc_inb(ahc, SCBPTR); in ahc_linux_queue_recovery_cmd()
2214 active_scb_index = ahc_inb(ahc, SCB_TAG); in ahc_linux_queue_recovery_cmd()
2215 saved_scsiid = ahc_inb(ahc, SAVED_SCSIID); in ahc_linux_queue_recovery_cmd()
2219 && SCSIID_TARGET(ahc, saved_scsiid) == scmd_id(cmd)))) { in ahc_linux_queue_recovery_cmd()
2225 pending_scb = ahc_lookup_scb(ahc, active_scb_index); in ahc_linux_queue_recovery_cmd()
2227 ahc_outb(ahc, MSG_OUT, HOST_MSG); in ahc_linux_queue_recovery_cmd()
2228 ahc_outb(ahc, SCSISIGO, last_phase|ATNO); in ahc_linux_queue_recovery_cmd()
2259 ahc_search_disc_list(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2273 if ((ahc->flags & AHC_PAGESCBS) == 0) { in ahc_linux_queue_recovery_cmd()
2274 ahc_outb(ahc, SCBPTR, pending_scb->hscb->tag); in ahc_linux_queue_recovery_cmd()
2275 ahc_outb(ahc, SCB_CONTROL, in ahc_linux_queue_recovery_cmd()
2276 ahc_inb(ahc, SCB_CONTROL)|MK_MESSAGE); in ahc_linux_queue_recovery_cmd()
2284 ahc_search_qinfifo(ahc, cmd->device->id, in ahc_linux_queue_recovery_cmd()
2289 ahc_qinfifo_requeue_tail(ahc, pending_scb); in ahc_linux_queue_recovery_cmd()
2290 ahc_outb(ahc, SCBPTR, saved_scbptr); in ahc_linux_queue_recovery_cmd()
2291 ahc_print_path(ahc, pending_scb); in ahc_linux_queue_recovery_cmd()
2310 ahc_unpause(ahc); in ahc_linux_queue_recovery_cmd()
2314 ahc->platform_data->eh_done = &done; in ahc_linux_queue_recovery_cmd()
2315 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2319 ahc_lock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2320 ahc->platform_data->eh_done = NULL; in ahc_linux_queue_recovery_cmd()
2321 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2328 ahc_unlock(ahc, &flags); in ahc_linux_queue_recovery_cmd()
2333 ahc_platform_dump_card_state(struct ahc_softc *ahc) in ahc_platform_dump_card_state() argument
2340 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_width() local
2346 ahc_lock(ahc, &flags); in ahc_linux_set_width()
2347 ahc_set_width(ahc, &devinfo, width, AHC_TRANS_GOAL, FALSE); in ahc_linux_set_width()
2348 ahc_unlock(ahc, &flags); in ahc_linux_set_width()
2354 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_period() local
2357 = ahc_fetch_transinfo(ahc, in ahc_linux_set_period()
2388 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); in ahc_linux_set_period()
2389 ahc_lock(ahc, &flags); in ahc_linux_set_period()
2390 ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, in ahc_linux_set_period()
2392 ahc_unlock(ahc, &flags); in ahc_linux_set_period()
2398 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_offset() local
2401 = ahc_fetch_transinfo(ahc, in ahc_linux_set_offset()
2413 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); in ahc_linux_set_offset()
2417 ahc_lock(ahc, &flags); in ahc_linux_set_offset()
2418 ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, in ahc_linux_set_offset()
2420 ahc_unlock(ahc, &flags); in ahc_linux_set_offset()
2426 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata); in ahc_linux_set_dt() local
2429 = ahc_fetch_transinfo(ahc, in ahc_linux_set_dt()
2449 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT); in ahc_linux_set_dt()
2450 ahc_lock(ahc, &flags); in ahc_linux_set_dt()
2451 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset, in ahc_linux_set_dt()
2453 ahc_unlock(ahc, &flags); in ahc_linux_set_dt()
2464 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2467 = ahc_fetch_transinfo(ahc,
2482 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
2483 ahc_lock(ahc, &flags);
2484 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
2486 ahc_unlock(ahc, &flags);
2492 struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
2495 = ahc_fetch_transinfo(ahc,
2510 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
2511 ahc_lock(ahc, &flags);
2512 ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
2514 ahc_unlock(ahc, &flags);
2520 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; in ahc_linux_get_signalling() local
2524 if (!(ahc->features & AHC_ULTRA2)) { in ahc_linux_get_signalling()
2527 ahc->features & AHC_HVD ? in ahc_linux_get_signalling()
2533 ahc_lock(ahc, &flags); in ahc_linux_get_signalling()
2534 ahc_pause(ahc); in ahc_linux_get_signalling()
2535 mode = ahc_inb(ahc, SBLKCTL); in ahc_linux_get_signalling()
2536 ahc_unpause(ahc); in ahc_linux_get_signalling()
2537 ahc_unlock(ahc, &flags); in ahc_linux_get_signalling()