Lines Matching refs:ahd

224 ahd_print_path(struct ahd_softc *ahd, struct scb *scb)  in ahd_print_path()  argument
227 ahd->platform_data->host->host_no, in ahd_print_path()
228 scb != NULL ? SCB_GET_CHANNEL(ahd, scb) : 'X', in ahd_print_path()
229 scb != NULL ? SCB_GET_TARGET(ahd, scb) : -1, in ahd_print_path()
355 static void ahd_linux_queue_cmd_complete(struct ahd_softc *ahd,
358 static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
359 static u_int ahd_linux_user_tagdepth(struct ahd_softc *ahd,
367 static void ahd_freeze_simq(struct ahd_softc *ahd);
368 static void ahd_release_simq(struct ahd_softc *ahd);
391 uint8_t ahd_inb(struct ahd_softc * ahd, long port);
392 void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val);
393 void ahd_outw_atomic(struct ahd_softc * ahd,
395 void ahd_outsb(struct ahd_softc * ahd, long port,
397 void ahd_insb(struct ahd_softc * ahd, long port,
401 ahd_inb(struct ahd_softc * ahd, long port) in ahd_inb() argument
405 if (ahd->tags[0] == BUS_SPACE_MEMIO) { in ahd_inb()
406 x = readb(ahd->bshs[0].maddr + port); in ahd_inb()
408 x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF)); in ahd_inb()
416 ahd_inw_atomic(struct ahd_softc * ahd, long port)
420 if (ahd->tags[0] == BUS_SPACE_MEMIO) {
421 x = readw(ahd->bshs[0].maddr + port);
423 x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
431 ahd_outb(struct ahd_softc * ahd, long port, uint8_t val) in ahd_outb() argument
433 if (ahd->tags[0] == BUS_SPACE_MEMIO) { in ahd_outb()
434 writeb(val, ahd->bshs[0].maddr + port); in ahd_outb()
436 outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); in ahd_outb()
442 ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val) in ahd_outw_atomic() argument
444 if (ahd->tags[0] == BUS_SPACE_MEMIO) { in ahd_outw_atomic()
445 writew(val, ahd->bshs[0].maddr + port); in ahd_outw_atomic()
447 outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); in ahd_outw_atomic()
453 ahd_outsb(struct ahd_softc * ahd, long port, uint8_t *array, int count) in ahd_outsb() argument
463 ahd_outb(ahd, port, *array++); in ahd_outsb()
467 ahd_insb(struct ahd_softc * ahd, long port, uint8_t *array, int count) in ahd_insb() argument
477 *array++ = ahd_inb(ahd, port); in ahd_insb()
534 ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb) in ahd_linux_unmap_scb() argument
539 ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE); in ahd_linux_unmap_scb()
544 #define BUILD_SCSIID(ahd, cmd) \ argument
545 (((scmd_id(cmd) << TID_SHIFT) & TID) | (ahd)->our_id)
556 struct ahd_softc *ahd; in ahd_linux_info() local
559 ahd = *(struct ahd_softc **)host->hostdata; in ahd_linux_info()
563 strcat(bp, ahd->description); in ahd_linux_info()
566 ahd_controller_info(ahd, ahd_info); in ahd_linux_info()
578 struct ahd_softc *ahd; in ahd_linux_queue_lck() local
582 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; in ahd_linux_queue_lck()
586 rtn = ahd_linux_run_command(ahd, dev, cmd); in ahd_linux_queue_lck()
596 struct ahd_softc *ahd = in DEF_SCSI_QCMD() local
604 return &ahd->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
610 struct ahd_softc *ahd = in ahd_linux_target_alloc() local
612 struct seeprom_config *sc = ahd->seep_config; in ahd_linux_target_alloc()
620 ahd_lock(ahd, &flags); in ahd_linux_target_alloc()
629 tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id, in ahd_linux_target_alloc()
636 if ((ahd->features & AHD_RTI) == 0) in ahd_linux_target_alloc()
649 tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id, in ahd_linux_target_alloc()
651 ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id, in ahd_linux_target_alloc()
654 ahd_set_syncrate(ahd, &devinfo, 0, 0, 0, in ahd_linux_target_alloc()
656 ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, in ahd_linux_target_alloc()
658 ahd_unlock(ahd, &flags); in ahd_linux_target_alloc()
674 struct ahd_softc *ahd = in ahd_linux_slave_alloc() local
679 printk("%s: Slave Alloc %d\n", ahd_name(ahd), sdev->id); in ahd_linux_slave_alloc()
703 struct ahd_softc *ahd; in ahd_linux_slave_configure() local
705 ahd = *((struct ahd_softc **)sdev->host->hostdata); in ahd_linux_slave_configure()
732 struct ahd_softc *ahd; in ahd_linux_biosparam() local
734 ahd = *((struct ahd_softc **)sdev->host->hostdata); in ahd_linux_biosparam()
751 extended = (ahd->flags & AHD_EXTENDED_TRANS_A) != 0; in ahd_linux_biosparam()
783 struct ahd_softc *ahd; in ahd_linux_dev_reset() local
798 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; in ahd_linux_dev_reset()
825 reset_scb = ahd_get_scb(ahd, AHD_NEVER_COL_IDX); in ahd_linux_dev_reset()
831 tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id, in ahd_linux_dev_reset()
840 reset_scb->hscb->scsiid = BUILD_SCSIID(ahd,cmd); in ahd_linux_dev_reset()
854 ahd_lock(ahd, &flags); in ahd_linux_dev_reset()
856 LIST_INSERT_HEAD(&ahd->pending_scbs, reset_scb, pending_links); in ahd_linux_dev_reset()
857 ahd_queue_scb(ahd, reset_scb); in ahd_linux_dev_reset()
859 ahd->platform_data->eh_done = &done; in ahd_linux_dev_reset()
860 ahd_unlock(ahd, &flags); in ahd_linux_dev_reset()
862 printk("%s: Device reset code sleeping\n", ahd_name(ahd)); in ahd_linux_dev_reset()
864 ahd_lock(ahd, &flags); in ahd_linux_dev_reset()
865 ahd->platform_data->eh_done = NULL; in ahd_linux_dev_reset()
866 ahd_unlock(ahd, &flags); in ahd_linux_dev_reset()
868 ahd_name(ahd), dev->active); in ahd_linux_dev_reset()
871 printk("%s: Device reset returning 0x%x\n", ahd_name(ahd), retval); in ahd_linux_dev_reset()
882 struct ahd_softc *ahd; in ahd_linux_bus_reset() local
886 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; in ahd_linux_bus_reset()
890 ahd_name(ahd), cmd); in ahd_linux_bus_reset()
892 ahd_lock(ahd, &flags); in ahd_linux_bus_reset()
894 found = ahd_reset_channel(ahd, scmd_channel(cmd) + 'A', in ahd_linux_bus_reset()
896 ahd_unlock(ahd, &flags); in ahd_linux_bus_reset()
900 "%d SCBs aborted.\n", ahd_name(ahd), found); in ahd_linux_bus_reset()
933 ahd_dma_tag_create(struct ahd_softc *ahd, bus_dma_tag_t parent, in ahd_dma_tag_create() argument
961 ahd_dma_tag_destroy(struct ahd_softc *ahd, bus_dma_tag_t dmat) in ahd_dma_tag_destroy() argument
967 ahd_dmamem_alloc(struct ahd_softc *ahd, bus_dma_tag_t dmat, void** vaddr, in ahd_dmamem_alloc() argument
970 *vaddr = pci_alloc_consistent(ahd->dev_softc, in ahd_dmamem_alloc()
978 ahd_dmamem_free(struct ahd_softc *ahd, bus_dma_tag_t dmat, in ahd_dmamem_free() argument
981 pci_free_consistent(ahd->dev_softc, dmat->maxsize, in ahd_dmamem_free()
986 ahd_dmamap_load(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map, in ahd_dmamap_load() argument
1003 ahd_dmamap_destroy(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map) in ahd_dmamap_destroy() argument
1008 ahd_dmamap_unload(struct ahd_softc *ahd, bus_dma_tag_t dmat, bus_dmamap_t map) in ahd_dmamap_unload() argument
1225 ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *template) in ahd_linux_register_host() argument
1233 template->name = ahd->description; in ahd_linux_register_host()
1238 *((struct ahd_softc **)host->hostdata) = ahd; in ahd_linux_register_host()
1239 ahd->platform_data->host = host; in ahd_linux_register_host()
1243 host->this_id = ahd->our_id; in ahd_linux_register_host()
1244 host->irq = ahd->platform_data->irq; in ahd_linux_register_host()
1245 host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8; in ahd_linux_register_host()
1249 ahd_lock(ahd, &s); in ahd_linux_register_host()
1250 ahd_set_unit(ahd, ahd_linux_unit++); in ahd_linux_register_host()
1251 ahd_unlock(ahd, &s); in ahd_linux_register_host()
1256 ahd_set_name(ahd, new_name); in ahd_linux_register_host()
1258 host->unique_id = ahd->unit; in ahd_linux_register_host()
1259 ahd_linux_initialize_scsi_bus(ahd); in ahd_linux_register_host()
1260 ahd_intr_enable(ahd, TRUE); in ahd_linux_register_host()
1264 retval = scsi_add_host(host, &ahd->dev_softc->dev); in ahd_linux_register_host()
1281 ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd) in ahd_linux_initialize_scsi_bus() argument
1291 ahd->flags &= ~AHD_RESET_BUS_A; in ahd_linux_initialize_scsi_bus()
1293 if ((ahd->flags & AHD_RESET_BUS_A) != 0) in ahd_linux_initialize_scsi_bus()
1294 ahd_reset_channel(ahd, 'A', /*initiate_reset*/TRUE); in ahd_linux_initialize_scsi_bus()
1296 numtarg = (ahd->features & AHD_WIDE) ? 16 : 8; in ahd_linux_initialize_scsi_bus()
1298 ahd_lock(ahd, &s); in ahd_linux_initialize_scsi_bus()
1309 tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id, in ahd_linux_initialize_scsi_bus()
1311 ahd_compile_devinfo(&devinfo, ahd->our_id, target_id, in ahd_linux_initialize_scsi_bus()
1313 ahd_update_neg_request(ahd, &devinfo, tstate, in ahd_linux_initialize_scsi_bus()
1316 ahd_unlock(ahd, &s); in ahd_linux_initialize_scsi_bus()
1318 if ((ahd->flags & AHD_RESET_BUS_A) != 0) { in ahd_linux_initialize_scsi_bus()
1319 ahd_freeze_simq(ahd); in ahd_linux_initialize_scsi_bus()
1321 ahd_release_simq(ahd); in ahd_linux_initialize_scsi_bus()
1326 ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg) in ahd_platform_alloc() argument
1328 ahd->platform_data = in ahd_platform_alloc()
1330 if (ahd->platform_data == NULL) in ahd_platform_alloc()
1332 ahd->platform_data->irq = AHD_LINUX_NOIRQ; in ahd_platform_alloc()
1333 ahd_lockinit(ahd); in ahd_platform_alloc()
1334 ahd->seltime = (aic79xx_seltime & 0x3) << 4; in ahd_platform_alloc()
1339 ahd_platform_free(struct ahd_softc *ahd) in ahd_platform_free() argument
1344 if (ahd->platform_data != NULL) { in ahd_platform_free()
1347 starget = ahd->platform_data->starget[i]; in ahd_platform_free()
1349 ahd->platform_data->starget[i] = NULL; in ahd_platform_free()
1353 if (ahd->platform_data->irq != AHD_LINUX_NOIRQ) in ahd_platform_free()
1354 free_irq(ahd->platform_data->irq, ahd); in ahd_platform_free()
1355 if (ahd->tags[0] == BUS_SPACE_PIO in ahd_platform_free()
1356 && ahd->bshs[0].ioport != 0) in ahd_platform_free()
1357 release_region(ahd->bshs[0].ioport, 256); in ahd_platform_free()
1358 if (ahd->tags[1] == BUS_SPACE_PIO in ahd_platform_free()
1359 && ahd->bshs[1].ioport != 0) in ahd_platform_free()
1360 release_region(ahd->bshs[1].ioport, 256); in ahd_platform_free()
1361 if (ahd->tags[0] == BUS_SPACE_MEMIO in ahd_platform_free()
1362 && ahd->bshs[0].maddr != NULL) { in ahd_platform_free()
1363 iounmap(ahd->bshs[0].maddr); in ahd_platform_free()
1364 release_mem_region(ahd->platform_data->mem_busaddr, in ahd_platform_free()
1367 if (ahd->platform_data->host) in ahd_platform_free()
1368 scsi_host_put(ahd->platform_data->host); in ahd_platform_free()
1370 kfree(ahd->platform_data); in ahd_platform_free()
1375 ahd_platform_init(struct ahd_softc *ahd) in ahd_platform_init() argument
1380 if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { in ahd_platform_init()
1383 iocell_opts = &aic79xx_iocell_info[ahd->unit]; in ahd_platform_init()
1385 AHD_SET_PRECOMP(ahd, iocell_opts->precomp); in ahd_platform_init()
1387 AHD_SET_SLEWRATE(ahd, iocell_opts->slewrate); in ahd_platform_init()
1389 AHD_SET_AMPLITUDE(ahd, iocell_opts->amplitude); in ahd_platform_init()
1395 ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb) in ahd_platform_freeze_devq() argument
1397 ahd_platform_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), in ahd_platform_freeze_devq()
1398 SCB_GET_CHANNEL(ahd, scb), in ahd_platform_freeze_devq()
1404 ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev, in ahd_platform_set_tags() argument
1442 usertags = ahd_linux_user_tagdepth(ahd, devinfo); in ahd_platform_set_tags()
1488 ahd_platform_abort_scbs(struct ahd_softc *ahd, int target, char channel, in ahd_platform_abort_scbs() argument
1495 ahd_linux_user_tagdepth(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) in ahd_linux_user_tagdepth() argument
1501 if ((ahd->user_discenable & devinfo->target_mask) != 0) { in ahd_linux_user_tagdepth()
1502 if (ahd->unit >= ARRAY_SIZE(aic79xx_tag_info)) { in ahd_linux_user_tagdepth()
1516 tag_info = &aic79xx_tag_info[ahd->unit]; in ahd_linux_user_tagdepth()
1533 struct ahd_softc *ahd = *((struct ahd_softc **)sdev->host->hostdata); in ahd_linux_device_queue_depth() local
1536 ahd->our_id, in ahd_linux_device_queue_depth()
1540 tags = ahd_linux_user_tagdepth(ahd, &devinfo); in ahd_linux_device_queue_depth()
1543 ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_TAGGED); in ahd_linux_device_queue_depth()
1544 ahd_send_async(ahd, devinfo.channel, devinfo.target, in ahd_linux_device_queue_depth()
1546 ahd_print_devinfo(ahd, &devinfo); in ahd_linux_device_queue_depth()
1549 ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_NONE); in ahd_linux_device_queue_depth()
1550 ahd_send_async(ahd, devinfo.channel, devinfo.target, in ahd_linux_device_queue_depth()
1556 ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev, in ahd_linux_run_command() argument
1572 ahd_lock(ahd, &flags); in ahd_linux_run_command()
1577 tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id, in ahd_linux_run_command()
1586 if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) { in ahd_linux_run_command()
1587 ahd->flags |= AHD_RESOURCE_SHORTAGE; in ahd_linux_run_command()
1588 ahd_unlock(ahd, &flags); in ahd_linux_run_command()
1602 hscb->scsiid = BUILD_SCSIID(ahd, cmd); in ahd_linux_run_command()
1605 mask = SCB_GET_TARGET_MASK(ahd, scb); in ahd_linux_run_command()
1607 if ((ahd->user_discenable & mask) != 0) in ahd_linux_run_command()
1650 sg = ahd_sg_setup(ahd, scb, sg, addr, len, in ahd_linux_run_command()
1655 LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links); in ahd_linux_run_command()
1663 ahd_queue_scb(ahd, scb); in ahd_linux_run_command()
1665 ahd_unlock(ahd, &flags); in ahd_linux_run_command()
1676 struct ahd_softc *ahd; in ahd_linux_isr() local
1680 ahd = (struct ahd_softc *) dev_id; in ahd_linux_isr()
1681 ahd_lock(ahd, &flags); in ahd_linux_isr()
1682 ours = ahd_intr(ahd); in ahd_linux_isr()
1683 ahd_unlock(ahd, &flags); in ahd_linux_isr()
1688 ahd_send_async(struct ahd_softc *ahd, char channel, in ahd_send_async() argument
1701 tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id, in ahd_send_async()
1719 starget = ahd->platform_data->starget[target]; in ahd_send_async()
1757 scsi_report_device_reset(ahd->platform_data->host, in ahd_send_async()
1762 if (ahd->platform_data->host != NULL) { in ahd_send_async()
1763 scsi_report_bus_reset(ahd->platform_data->host, in ahd_send_async()
1776 ahd_done(struct ahd_softc *ahd, struct scb *scb) in ahd_done() argument
1783 ahd_dump_card_state(ahd); in ahd_done()
1795 ahd_linux_unmap_scb(ahd, scb); in ahd_done()
1812 ahd_print_path(ahd, scb); in ahd_done()
1830 ahd_print_path(ahd, scb); in ahd_done()
1835 ahd_print_path(ahd, scb); in ahd_done()
1846 ahd_linux_handle_scsi_status(ahd, cmd->device, scb); in ahd_done()
1874 if (ahd->platform_data->eh_done) in ahd_done()
1875 complete(ahd->platform_data->eh_done); in ahd_done()
1878 ahd_free_scb(ahd, scb); in ahd_done()
1879 ahd_linux_queue_cmd_complete(ahd, cmd); in ahd_done()
1883 ahd_linux_handle_scsi_status(struct ahd_softc *ahd, in ahd_linux_handle_scsi_status() argument
1890 ahd->our_id, in ahd_linux_handle_scsi_status()
1943 ahd_get_sense_buf(ahd, scb) in ahd_linux_handle_scsi_status()
1982 ahd_print_path(ahd, scb); in ahd_linux_handle_scsi_status()
2001 ahd_print_path(ahd, scb); in ahd_linux_handle_scsi_status()
2011 ahd_platform_set_tags(ahd, sdev, &devinfo, in ahd_linux_handle_scsi_status()
2021 ahd_platform_set_tags(ahd, sdev, &devinfo, in ahd_linux_handle_scsi_status()
2029 ahd_linux_queue_cmd_complete(struct ahd_softc *ahd, struct scsi_cmnd *cmd) in ahd_linux_queue_cmd_complete() argument
2127 ahd_name(ahd), status, cmd->device->channel, in ahd_linux_queue_cmd_complete()
2137 ahd_freeze_simq(struct ahd_softc *ahd) in ahd_freeze_simq() argument
2139 scsi_block_requests(ahd->platform_data->host); in ahd_freeze_simq()
2143 ahd_release_simq(struct ahd_softc *ahd) in ahd_release_simq() argument
2145 scsi_unblock_requests(ahd->platform_data->host); in ahd_release_simq()
2151 struct ahd_softc *ahd; in ahd_linux_queue_abort_cmd() local
2170 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; in ahd_linux_queue_abort_cmd()
2180 ahd_lock(ahd, &flags); in ahd_linux_queue_abort_cmd()
2204 LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { in ahd_linux_queue_abort_cmd()
2228 was_paused = ahd_is_paused(ahd); in ahd_linux_queue_abort_cmd()
2229 ahd_pause_and_flushwork(ahd); in ahd_linux_queue_abort_cmd()
2238 ahd_name(ahd), was_paused ? "" : "not "); in ahd_linux_queue_abort_cmd()
2239 ahd_dump_card_state(ahd); in ahd_linux_queue_abort_cmd()
2242 if (ahd_search_qinfifo(ahd, cmd->device->id, in ahd_linux_queue_abort_cmd()
2249 ahd_name(ahd), cmd->device->channel, in ahd_linux_queue_abort_cmd()
2255 saved_modes = ahd_save_modes(ahd); in ahd_linux_queue_abort_cmd()
2256 ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); in ahd_linux_queue_abort_cmd()
2257 last_phase = ahd_inb(ahd, LASTPHASE); in ahd_linux_queue_abort_cmd()
2258 saved_scbptr = ahd_get_scbptr(ahd); in ahd_linux_queue_abort_cmd()
2260 if (disconnected && (ahd_inb(ahd, SEQ_FLAGS) & NOT_IDENTIFIED) == 0) { in ahd_linux_queue_abort_cmd()
2263 bus_scb = ahd_lookup_scb(ahd, active_scbptr); in ahd_linux_queue_abort_cmd()
2273 saved_scsiid = ahd_inb(ahd, SAVED_SCSIID); in ahd_linux_queue_abort_cmd()
2281 pending_scb = ahd_lookup_scb(ahd, active_scbptr); in ahd_linux_queue_abort_cmd()
2283 ahd_outb(ahd, MSG_OUT, HOST_MSG); in ahd_linux_queue_abort_cmd()
2284 ahd_outb(ahd, SCSISIGO, last_phase|ATNO); in ahd_linux_queue_abort_cmd()
2294 ahd_set_scbptr(ahd, SCB_GET_TAG(pending_scb)); in ahd_linux_queue_abort_cmd()
2307 ahd_outb(ahd, SCB_TASK_MANAGEMENT, in ahd_linux_queue_abort_cmd()
2327 ahd_outb(ahd, SCB_CONTROL, in ahd_linux_queue_abort_cmd()
2328 ahd_inb(ahd, SCB_CONTROL)|MK_MESSAGE); in ahd_linux_queue_abort_cmd()
2336 ahd_search_qinfifo(ahd, cmd->device->id, in ahd_linux_queue_abort_cmd()
2340 ahd_qinfifo_requeue_tail(ahd, pending_scb); in ahd_linux_queue_abort_cmd()
2341 ahd_set_scbptr(ahd, saved_scbptr); in ahd_linux_queue_abort_cmd()
2342 ahd_print_path(ahd, pending_scb); in ahd_linux_queue_abort_cmd()
2361 ahd_unpause(ahd); in ahd_linux_queue_abort_cmd()
2365 ahd->platform_data->eh_done = &done; in ahd_linux_queue_abort_cmd()
2366 ahd_unlock(ahd, &flags); in ahd_linux_queue_abort_cmd()
2368 printk("%s: Recovery code sleeping\n", ahd_name(ahd)); in ahd_linux_queue_abort_cmd()
2370 ahd_lock(ahd, &flags); in ahd_linux_queue_abort_cmd()
2371 ahd->platform_data->eh_done = NULL; in ahd_linux_queue_abort_cmd()
2372 ahd_unlock(ahd, &flags); in ahd_linux_queue_abort_cmd()
2374 ahd_name(ahd), dev->active); in ahd_linux_queue_abort_cmd()
2379 ahd_unlock(ahd, &flags); in ahd_linux_queue_abort_cmd()
2383 ahd_name(ahd), retval); in ahd_linux_queue_abort_cmd()
2391 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_width() local
2397 ahd_lock(ahd, &flags); in ahd_linux_set_width()
2398 ahd_set_width(ahd, &devinfo, width, AHD_TRANS_GOAL, FALSE); in ahd_linux_set_width()
2399 ahd_unlock(ahd, &flags); in ahd_linux_set_width()
2405 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_period() local
2408 = ahd_fetch_transinfo(ahd, in ahd_linux_set_period()
2419 printk("%s: set period to %d\n", ahd_name(ahd), period); in ahd_linux_set_period()
2446 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_period()
2449 ahd_lock(ahd, &flags); in ahd_linux_set_period()
2450 ahd_set_syncrate(ahd, &devinfo, period, offset, in ahd_linux_set_period()
2452 ahd_unlock(ahd, &flags); in ahd_linux_set_period()
2458 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_offset() local
2461 = ahd_fetch_transinfo(ahd, in ahd_linux_set_offset()
2472 printk("%s: set offset to %d\n", ahd_name(ahd), offset); in ahd_linux_set_offset()
2480 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_offset()
2484 ahd_lock(ahd, &flags); in ahd_linux_set_offset()
2485 ahd_set_syncrate(ahd, &devinfo, period, offset, ppr_options, in ahd_linux_set_offset()
2487 ahd_unlock(ahd, &flags); in ahd_linux_set_offset()
2493 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_dt() local
2496 = ahd_fetch_transinfo(ahd, in ahd_linux_set_dt()
2508 printk("%s: %s DT\n", ahd_name(ahd), in ahd_linux_set_dt()
2523 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_dt()
2526 ahd_lock(ahd, &flags); in ahd_linux_set_dt()
2527 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_dt()
2529 ahd_unlock(ahd, &flags); in ahd_linux_set_dt()
2535 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_qas() local
2538 = ahd_fetch_transinfo(ahd, in ahd_linux_set_qas()
2550 printk("%s: %s QAS\n", ahd_name(ahd), in ahd_linux_set_qas()
2562 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_qas()
2565 ahd_lock(ahd, &flags); in ahd_linux_set_qas()
2566 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_qas()
2568 ahd_unlock(ahd, &flags); in ahd_linux_set_qas()
2574 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_iu() local
2577 = ahd_fetch_transinfo(ahd, in ahd_linux_set_iu()
2589 printk("%s: %s IU\n", ahd_name(ahd), in ahd_linux_set_iu()
2602 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_iu()
2605 ahd_lock(ahd, &flags); in ahd_linux_set_iu()
2606 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_iu()
2608 ahd_unlock(ahd, &flags); in ahd_linux_set_iu()
2614 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_rd_strm() local
2617 = ahd_fetch_transinfo(ahd, in ahd_linux_set_rd_strm()
2629 printk("%s: %s Read Streaming\n", ahd_name(ahd), in ahd_linux_set_rd_strm()
2638 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_rd_strm()
2641 ahd_lock(ahd, &flags); in ahd_linux_set_rd_strm()
2642 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_rd_strm()
2644 ahd_unlock(ahd, &flags); in ahd_linux_set_rd_strm()
2650 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_wr_flow() local
2653 = ahd_fetch_transinfo(ahd, in ahd_linux_set_wr_flow()
2665 printk("%s: %s Write Flow Control\n", ahd_name(ahd), in ahd_linux_set_wr_flow()
2674 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_wr_flow()
2677 ahd_lock(ahd, &flags); in ahd_linux_set_wr_flow()
2678 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_wr_flow()
2680 ahd_unlock(ahd, &flags); in ahd_linux_set_wr_flow()
2686 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_rti() local
2689 = ahd_fetch_transinfo(ahd, in ahd_linux_set_rti()
2699 if ((ahd->features & AHD_RTI) == 0) { in ahd_linux_set_rti()
2702 printk("%s: RTI not available\n", ahd_name(ahd)); in ahd_linux_set_rti()
2709 printk("%s: %s RTI\n", ahd_name(ahd), in ahd_linux_set_rti()
2718 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_rti()
2721 ahd_lock(ahd, &flags); in ahd_linux_set_rti()
2722 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_rti()
2724 ahd_unlock(ahd, &flags); in ahd_linux_set_rti()
2730 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_pcomp_en() local
2733 = ahd_fetch_transinfo(ahd, in ahd_linux_set_pcomp_en()
2745 printk("%s: %s Precompensation\n", ahd_name(ahd), in ahd_linux_set_pcomp_en()
2752 if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { in ahd_linux_set_pcomp_en()
2755 iocell_opts = &aic79xx_iocell_info[ahd->unit]; in ahd_linux_set_pcomp_en()
2761 AHD_SET_PRECOMP(ahd, precomp); in ahd_linux_set_pcomp_en()
2763 AHD_SET_PRECOMP(ahd, 0); in ahd_linux_set_pcomp_en()
2768 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_pcomp_en()
2771 ahd_lock(ahd, &flags); in ahd_linux_set_pcomp_en()
2772 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_pcomp_en()
2774 ahd_unlock(ahd, &flags); in ahd_linux_set_pcomp_en()
2780 struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); in ahd_linux_set_hold_mcs() local
2783 = ahd_fetch_transinfo(ahd, in ahd_linux_set_hold_mcs()
2798 ahd_find_syncrate(ahd, &period, &ppr_options, in ahd_linux_set_hold_mcs()
2801 ahd_lock(ahd, &flags); in ahd_linux_set_hold_mcs()
2802 ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, in ahd_linux_set_hold_mcs()
2804 ahd_unlock(ahd, &flags); in ahd_linux_set_hold_mcs()
2809 struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; in ahd_linux_get_signalling() local
2813 ahd_lock(ahd, &flags); in ahd_linux_get_signalling()
2814 ahd_pause(ahd); in ahd_linux_get_signalling()
2815 mode = ahd_inb(ahd, SBLKCTL); in ahd_linux_get_signalling()
2816 ahd_unpause(ahd); in ahd_linux_get_signalling()
2817 ahd_unlock(ahd, &flags); in ahd_linux_get_signalling()