Lines Matching refs:asd_ha
18 static void asd_can_dequeue(struct asd_ha_struct *asd_ha, int num) in asd_can_dequeue() argument
22 spin_lock_irqsave(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue()
23 asd_ha->seq.can_queue += num; in asd_can_dequeue()
24 spin_unlock_irqrestore(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue()
41 struct asd_ha_struct *asd_ha = ascb->ha; in asd_map_scatterlist() local
50 dma_addr_t dma = dma_map_single(&asd_ha->pcidev->dev, p, in asd_map_scatterlist()
53 if (dma_mapping_error(&asd_ha->pcidev->dev, dma)) in asd_map_scatterlist()
67 num_sg = dma_map_sg(&asd_ha->pcidev->dev, task->scatter, in asd_map_scatterlist()
75 ascb->sg_arr = asd_alloc_coherent(asd_ha, in asd_map_scatterlist()
114 dma_unmap_sg(&asd_ha->pcidev->dev, task->scatter, in asd_map_scatterlist()
121 struct asd_ha_struct *asd_ha = ascb->ha; in asd_unmap_scatterlist() local
135 asd_free_coherent(asd_ha, ascb->sg_arr); in asd_unmap_scatterlist()
137 dma_unmap_sg(&asd_ha->pcidev->dev, task->scatter, in asd_unmap_scatterlist()
146 struct asd_ha_struct *asd_ha = ascb->ha; in asd_get_response_tasklet() local
162 spin_lock_irqsave(&asd_ha->seq.tc_index_lock, flags); in asd_get_response_tasklet()
163 escb = asd_tc_index_find(&asd_ha->seq, in asd_get_response_tasklet()
165 spin_unlock_irqrestore(&asd_ha->seq.tc_index_lock, flags); in asd_get_response_tasklet()
173 edb = asd_ha->seq.edb_arr[edb_id + escb->edb_index]; in asd_get_response_tasklet()
181 sas_ssp_task_response(&asd_ha->pcidev->dev, task, iu); in asd_get_response_tasklet()
414 struct asd_ha_struct *asd_ha = ascb->ha; in asd_build_smp_ascb() local
418 dma_map_sg(&asd_ha->pcidev->dev, &task->smp_task.smp_req, 1, in asd_build_smp_ascb()
420 dma_map_sg(&asd_ha->pcidev->dev, &task->smp_task.smp_resp, 1, in asd_build_smp_ascb()
507 static int asd_can_queue(struct asd_ha_struct *asd_ha, int num) in asd_can_queue() argument
512 spin_lock_irqsave(&asd_ha->seq.pend_q_lock, flags); in asd_can_queue()
513 if ((asd_ha->seq.can_queue - num) < 0) in asd_can_queue()
516 asd_ha->seq.can_queue -= num; in asd_can_queue()
517 spin_unlock_irqrestore(&asd_ha->seq.pend_q_lock, flags); in asd_can_queue()
528 struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; in asd_execute_task() local
530 res = asd_can_queue(asd_ha, 1); in asd_execute_task()
535 ascb = asd_ascb_alloc_list(asd_ha, &res, gfp_flags); in asd_execute_task()
574 res = asd_post_ascb_list(asd_ha, ascb, 1); in asd_execute_task()
610 asd_can_dequeue(asd_ha, 1); in asd_execute_task()