Lines Matching refs:platform_data

317 	       ahd->platform_data->host->host_no,  in ahd_print_path()
574 if ((ahd->platform_data->flags & AHD_RUN_CMPLT_Q_TIMER) == 0) { in ahd_schedule_completeq()
575 ahd->platform_data->flags |= AHD_RUN_CMPLT_Q_TIMER; in ahd_schedule_completeq()
576 ahd->platform_data->completeq_timer.expires = jiffies; in ahd_schedule_completeq()
577 add_timer(&ahd->platform_data->completeq_timer); in ahd_schedule_completeq()
588 tasklet_schedule(&ahd->platform_data->runq_tasklet); in ahd_schedule_runq()
601 tasklet_init(&ahd->platform_data->runq_tasklet, ahd_runq_tasklet, in ahd_setup_runq_tasklet()
610 tasklet_kill(&ahd->platform_data->runq_tasklet); in ahd_teardown_runq_tasklet()
625 targ = ahd->platform_data->targets[target_offset]; in ahd_linux_get_device()
650 while ((acmd = TAILQ_FIRST(&ahd->platform_data->completeq)) != NULL) { in ahd_linux_run_complete_queue()
665 TAILQ_REMOVE(&ahd->platform_data->completeq, in ahd_linux_run_complete_queue()
701 || (ahd->platform_data->qfrozen != 0 in ahd_linux_next_device_to_run()
704 return (TAILQ_FIRST(&ahd->platform_data->device_runq)); in ahd_linux_next_device_to_run()
713 TAILQ_REMOVE(&ahd->platform_data->device_runq, dev, links); in ahd_linux_run_device_queues()
735 scb->platform_data->buf_busaddr, in ahd_linux_unmap_scb()
752 scb->platform_data->xfer_len += len; in ahd_linux_map_seg()
1017 if (ahd->platform_data->qfrozen != 0 in ahd_linux_queue()
1043 TAILQ_INSERT_TAIL(&ahd->platform_data->device_runq, dev, links); in ahd_linux_queue()
1519 pending_scb->platform_data->flags |= AHD_SCB_UP_EH_SEM;
1520 spin_unlock_irq(&ahd->platform_data->spin_lock);
1527 down(&ahd->platform_data->eh_sem);
1534 spin_lock_irq(&ahd->platform_data->spin_lock);
1594 scb->platform_data->dev = dev;
1616 scb->platform_data->flags |= AHD_SCB_UP_EH_SEM;
1617 spin_unlock_irq(&ahd->platform_data->spin_lock);
1624 down(&ahd->platform_data->eh_sem);
1631 spin_lock_irq(&ahd->platform_data->spin_lock);
1736 TAILQ_REMOVE(&ahd->platform_data->device_runq, dev, links);
1808 ahd->platform_data->hw_dma_mask);
2108 scsi_assign_lock(host, &ahd->platform_data->spin_lock);
2110 host->lock = &ahd->platform_data->spin_lock;
2112 ahd->platform_data->host = host;
2117 host->irq = ahd->platform_data->irq;
2137 ahd->platform_data->dv_pid = kernel_thread(ahd_linux_dv_thread, ahd, 0);
2139 if (ahd->platform_data->dv_pid < 0) {
2141 ahd_name(ahd), ahd->platform_data->dv_pid);
2142 return (-ahd->platform_data->dv_pid);
2254 init_timer(&ahd->platform_data->reset_timer);
2255 ahd->platform_data->reset_timer.data = (u_long)ahd;
2256 ahd->platform_data->reset_timer.expires =
2258 ahd->platform_data->reset_timer.function =
2260 add_timer(&ahd->platform_data->reset_timer);
2267 ahd->platform_data =
2269 if (ahd->platform_data == NULL)
2271 memset(ahd->platform_data, 0, sizeof(struct ahd_platform_data));
2272 TAILQ_INIT(&ahd->platform_data->completeq);
2273 TAILQ_INIT(&ahd->platform_data->device_runq);
2274 ahd->platform_data->irq = AHD_LINUX_NOIRQ;
2275 ahd->platform_data->hw_dma_mask = 0xFFFFFFFF;
2278 init_timer(&ahd->platform_data->completeq_timer);
2279 ahd->platform_data->completeq_timer.data = (u_long)ahd;
2280 ahd->platform_data->completeq_timer.function =
2283 init_MUTEX_LOCKED(&ahd->platform_data->eh_sem);
2284 init_MUTEX_LOCKED(&ahd->platform_data->dv_sem);
2285 init_MUTEX_LOCKED(&ahd->platform_data->dv_cmd_sem);
2287 ahd->platform_data->eh_sem = MUTEX_LOCKED;
2288 ahd->platform_data->dv_sem = MUTEX_LOCKED;
2289 ahd->platform_data->dv_cmd_sem = MUTEX_LOCKED;
2303 if (ahd->platform_data != NULL) {
2304 del_timer_sync(&ahd->platform_data->completeq_timer);
2307 if (ahd->platform_data->host != NULL) {
2309 scsi_remove_host(ahd->platform_data->host);
2311 scsi_unregister(ahd->platform_data->host);
2316 targ = ahd->platform_data->targets[i];
2335 if (ahd->platform_data->irq != AHD_LINUX_NOIRQ)
2336 free_irq(ahd->platform_data->irq, ahd);
2351 release_mem_region(ahd->platform_data->mem_busaddr,
2366 free(ahd->platform_data, M_DEVBUF);
2555 del_timer(&ahd->platform_data->completeq_timer);
2556 ahd->platform_data->flags &= ~AHD_RUN_CMPLT_Q_TIMER;
2569 if ((ahd->platform_data->flags & AHD_DV_ACTIVE) == 0) {
2575 ahd->platform_data->flags |= AHD_DV_ACTIVE;
2579 up(&ahd->platform_data->dv_sem);
2619 down_interruptible(&ahd->platform_data->dv_sem);
2623 if ((ahd->platform_data->flags & AHD_DV_SHUTDOWN) != 0) {
2640 ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_EMPTY;
2642 down_interruptible(&ahd->platform_data->dv_sem);
2651 ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_RELEASE;
2653 down_interruptible(&ahd->platform_data->dv_sem);
2662 ahd->platform_data->flags &= ~AHD_DV_ACTIVE;
2671 up(&ahd->platform_data->eh_sem);
2681 if (ahd->platform_data->dv_pid != 0) {
2682 ahd->platform_data->flags |= AHD_DV_SHUTDOWN;
2684 up(&ahd->platform_data->dv_sem);
2697 down(&ahd->platform_data->eh_sem);
2711 ahd->platform_data->dv_pid = 0;
2761 targ = ahd->platform_data->targets[target_offset];
2779 scsi_dev->host = ahd->platform_data->host;
2783 ahd->platform_data->dv_scsi_dev = scsi_dev;
2874 down_interruptible(&ahd->platform_data->dv_cmd_sem);
2881 ahd->platform_data->flags |= AHD_DV_WAIT_SIMQ_RELEASE;
2883 down_interruptible(&ahd->platform_data->dv_sem);
2914 if (ahd->platform_data->dv_scsi_dev != NULL) {
2915 free(ahd->platform_data->dv_scsi_dev, M_DEVBUF);
2916 ahd->platform_data->dv_scsi_dev = NULL;
3429 cmd->device = ahd->platform_data->dv_scsi_dev;
3605 targ = ahd->platform_data->targets[devinfo->target_offset];
3801 init_timer(&ahd->platform_data->reset_timer);
3802 ahd->platform_data->reset_timer.data = (u_long)ahd;
3803 ahd->platform_data->reset_timer.expires = jiffies + HZ / 2;
3804 ahd->platform_data->reset_timer.function =
3806 add_timer(&ahd->platform_data->reset_timer);
3831 up(&ahd->platform_data->dv_cmd_sem);
4047 if (ahd->platform_data->qfrozen != 0
4050 TAILQ_INSERT_TAIL(&ahd->platform_data->device_runq,
4071 TAILQ_INSERT_TAIL(&ahd->platform_data->device_runq,
4079 scb->platform_data->dev = dev;
4143 scb->platform_data->xfer_len = 0;
4150 scb->platform_data->xfer_len += len;
4164 scb->platform_data->xfer_len = cmd->request_bufflen;
4165 scb->platform_data->buf_busaddr = addr;
4231 ahd->platform_data->targets[target] = targ;
4262 ahd->platform_data->targets[target_offset] = NULL;
4356 targ = ahd->platform_data->targets[target];
4388 scsi_report_device_reset(ahd->platform_data->host,
4397 for (scsi_dev = ahd->platform_data->host->host_queue;
4412 if (ahd->platform_data->host != NULL) {
4413 scsi_report_bus_reset(ahd->platform_data->host,
4439 dev = scb->platform_data->dev;
4525 TAILQ_INSERT_TAIL(&ahd->platform_data->device_runq, dev, links);
4534 if ((scb->platform_data->flags & AHD_SCB_UP_EH_SEM) != 0) {
4535 scb->platform_data->flags &= ~AHD_SCB_UP_EH_SEM;
4536 up(&ahd->platform_data->eh_sem);
4543 if ((ahd->platform_data->flags & AHD_DV_WAIT_SIMQ_EMPTY) != 0
4545 ahd->platform_data->flags &= ~AHD_DV_WAIT_SIMQ_EMPTY;
4546 up(&ahd->platform_data->dv_sem);
4858 completeq = &ahd->platform_data->completeq;
4973 ahd->platform_data->qfrozen++;
4974 if (ahd->platform_data->qfrozen == 1) {
4975 scsi_block_requests(ahd->platform_data->host);
4990 if (ahd->platform_data->qfrozen > 0)
4991 ahd->platform_data->qfrozen--;
4992 if (ahd->platform_data->qfrozen == 0) {
4996 && ((ahd->platform_data->flags & AHD_DV_WAIT_SIMQ_RELEASE) != 0)) {
4997 ahd->platform_data->flags &= ~AHD_DV_WAIT_SIMQ_RELEASE;
4998 up(&ahd->platform_data->dv_sem);
5009 scsi_unblock_requests(ahd->platform_data->host);
5022 if ((scb->platform_data->flags & AHD_SCB_UP_EH_SEM) != 0) {
5023 scb->platform_data->flags &= ~AHD_SCB_UP_EH_SEM;
5024 up(&ahd->platform_data->eh_sem);