Lines Matching refs:ascb
17 static int asd_enqueue_internal(struct asd_ascb *ascb, in asd_enqueue_internal() argument
24 ascb->tasklet_complete = tasklet_complete; in asd_enqueue_internal()
25 ascb->uldd_timer = 1; in asd_enqueue_internal()
27 ascb->timer.function = timed_out; in asd_enqueue_internal()
28 ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; in asd_enqueue_internal()
30 add_timer(&ascb->timer); in asd_enqueue_internal()
32 res = asd_post_ascb_list(ascb->ha, ascb, 1); in asd_enqueue_internal()
34 del_timer(&ascb->timer); in asd_enqueue_internal()
56 static void asd_clear_nexus_tasklet_complete(struct asd_ascb *ascb, in asd_clear_nexus_tasklet_complete() argument
59 struct tasklet_completion_status *tcs = ascb->uldd_task; in asd_clear_nexus_tasklet_complete()
61 if (!del_timer(&ascb->timer)) { in asd_clear_nexus_tasklet_complete()
67 complete(ascb->completion); in asd_clear_nexus_tasklet_complete()
68 asd_ascb_free(ascb); in asd_clear_nexus_tasklet_complete()
73 struct asd_ascb *ascb = from_timer(ascb, t, timer); in asd_clear_nexus_timedout() local
74 struct tasklet_completion_status *tcs = ascb->uldd_task; in asd_clear_nexus_timedout()
78 complete(ascb->completion); in asd_clear_nexus_timedout()
82 struct asd_ascb *ascb; \
90 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); \
91 if (!ascb) \
94 ascb->completion = &completion; \
95 ascb->uldd_task = &tcs; \
96 scb = ascb->scb; \
101 res = asd_enqueue_internal(ascb, asd_clear_nexus_tasklet_complete, \
112 asd_ascb_free(ascb); \
247 struct asd_ascb *ascb = from_timer(ascb, t, timer); in asd_tmf_timedout() local
248 struct tasklet_completion_status *tcs = ascb->uldd_task; in asd_tmf_timedout()
252 complete(ascb->completion); in asd_tmf_timedout()
255 static int asd_get_tmf_resp_tasklet(struct asd_ascb *ascb, in asd_get_tmf_resp_tasklet() argument
258 struct asd_ha_struct *asd_ha = ascb->ha; in asd_get_tmf_resp_tasklet()
286 ascb->tag = *(__be16 *)(edb->vaddr+4); in asd_get_tmf_resp_tasklet()
293 ascb->tag = fh->tag; in asd_get_tmf_resp_tasklet()
295 ascb->tag_valid = 1; in asd_get_tmf_resp_tasklet()
301 static void asd_tmf_tasklet_complete(struct asd_ascb *ascb, in asd_tmf_tasklet_complete() argument
306 if (!del_timer(&ascb->timer)) in asd_tmf_tasklet_complete()
309 tcs = ascb->uldd_task; in asd_tmf_tasklet_complete()
315 tcs->tmf_state = asd_get_tmf_resp_tasklet(ascb, dl); in asd_tmf_tasklet_complete()
316 tcs->tag_valid = ascb->tag_valid; in asd_tmf_tasklet_complete()
317 tcs->tag = ascb->tag; in asd_tmf_tasklet_complete()
320 complete(ascb->completion); in asd_tmf_tasklet_complete()
321 asd_ascb_free(ascb); in asd_tmf_tasklet_complete()
392 struct asd_ascb *ascb = NULL; in asd_abort_task() local
410 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); in asd_abort_task()
411 if (!ascb) in asd_abort_task()
414 ascb->uldd_task = &tcs; in asd_abort_task()
415 ascb->completion = &completion; in asd_abort_task()
416 scb = ascb->scb; in asd_abort_task()
455 res = asd_enqueue_internal(ascb, asd_tmf_tasklet_complete, in asd_abort_task()
536 asd_ascb_free(ascb); in asd_abort_task()
560 struct asd_ascb *ascb; in asd_initiate_ssp_tmf() local
569 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); in asd_initiate_ssp_tmf()
570 if (!ascb) in asd_initiate_ssp_tmf()
573 ascb->completion = &completion; in asd_initiate_ssp_tmf()
574 ascb->uldd_task = &tcs; in asd_initiate_ssp_tmf()
575 scb = ascb->scb; in asd_initiate_ssp_tmf()
603 res = asd_enqueue_internal(ascb, asd_tmf_tasklet_complete, in asd_initiate_ssp_tmf()
634 asd_ascb_free(ascb); in asd_initiate_ssp_tmf()
686 struct asd_ascb *ascb = task->lldd_task; in asd_query_task() local
689 if (ascb) { in asd_query_task()
690 index = ascb->tc_index; in asd_query_task()