Lines Matching defs:ascb

67 static void asd_phy_event_tasklet(struct asd_ascb *ascb,
70 struct asd_ha_struct *asd_ha = ascb->ha;
216 static void asd_bytes_dmaed_tasklet(struct asd_ascb *ascb,
221 int edb_el = edb_id + ascb->edb_index;
222 struct asd_dma_tok *edb = ascb->ha->seq.edb_arr[edb_el];
223 struct asd_phy *phy = &ascb->ha->phys[phy_id];
234 asd_form_port(ascb->ha, phy);
238 static void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
242 struct asd_ha_struct *asd_ha = ascb->ha;
275 struct asd_ascb *cp = asd_ascb_alloc_list(ascb->ha, &num,
284 if (asd_post_ascb_list(ascb->ha, cp, 1) != 0)
291 static void asd_primitive_rcvd_tasklet(struct asd_ascb *ascb,
296 struct sas_ha_struct *sas_ha = &ascb->ha->sas_ha;
298 struct asd_ha_struct *asd_ha = ascb->ha;
355 * @ascb: pointer to Empty SCB
362 void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id)
364 struct asd_seq_data *seq = &ascb->ha->seq;
365 struct empty_scb *escb = &ascb->scb->escb;
367 struct asd_dma_tok *edb = seq->edb_arr[ascb->edb_index + edb_id];
378 ascb->dma_scb.vaddr,
379 (u64)ascb->dma_scb.dma_handle,
380 le64_to_cpu(ascb->scb->header.next_scb),
381 le16_to_cpu(ascb->scb->header.index),
382 ascb->scb->header.opcode);
387 if (!list_empty(&ascb->list))
388 list_del_init(&ascb->list);
389 i = asd_post_escb_list(ascb->ha, ascb, 1);
395 static void escb_tasklet_complete(struct asd_ascb *ascb,
398 struct asd_ha_struct *asd_ha = ascb->ha;
414 ascb->dma_scb.vaddr,
415 (unsigned long long)ascb->dma_scb.dma_handle,
417 le64_to_cpu(ascb->scb->header.next_scb),
418 le16_to_cpu(ascb->scb->header.index),
419 ascb->scb->header.opcode);
545 asd_bytes_dmaed_tasklet(ascb, dl, edb, phy_id);
550 asd_primitive_rcvd_tasklet(ascb, dl, phy_id);
554 asd_phy_event_tasklet(ascb, dl);
559 asd_link_reset_err_tasklet(ascb, dl, phy_id);
580 ascb->dma_scb.vaddr,
581 (unsigned long long)ascb->dma_scb.dma_handle,
583 le64_to_cpu(ascb->scb->header.next_scb),
584 le16_to_cpu(ascb->scb->header.index),
585 ascb->scb->header.opcode);
590 asd_invalidate_edb(ascb, edb);
612 * control_phy_tasklet_complete -- tasklet complete for CONTROL PHY ascb
613 * @ascb: pointer to an ascb
616 * This function completes a CONTROL PHY scb and frees the ascb.
622 static void control_phy_tasklet_complete(struct asd_ascb *ascb,
625 struct asd_ha_struct *asd_ha = ascb->ha;
626 struct scb *scb = ascb->scb;
629 struct asd_phy *phy = &ascb->ha->phys[phy_id];
695 asd_ascb_free(ascb);
749 * @ascb: pointer to an ascb
754 * is performed. @ascb is allocated with the list function.
755 * The caller can override the ascb->tasklet_complete to point
760 void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc)
762 struct asd_phy *phy = &ascb->ha->phys[phy_id];
763 struct scb *scb = ascb->scb;
803 ascb->tasklet_complete = control_phy_tasklet_complete;
810 static void link_adm_tasklet_complete(struct asd_ascb *ascb,
814 struct initiate_link_adm *link_adm = &ascb->scb->link_adm;
824 asd_ascb_free(ascb);
827 void asd_build_initiate_link_adm_task(struct asd_ascb *ascb, int phy_id,
830 struct scb *scb = ascb->scb;
839 ascb->tasklet_complete = link_adm_tasklet_complete;
854 * the ascb->timer.{function, expires} prior to calling the post
859 struct asd_ascb *ascb = from_timer(ascb, t, timer);
860 struct asd_seq_data *seq = &ascb->ha->seq;
863 ASD_DPRINTK("scb:0x%x timed out\n", ascb->scb->header.opcode);
867 list_del_init(&ascb->list);
870 asd_ascb_free(ascb);
888 struct asd_ascb *ascb;
912 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL);
913 if (!ascb)
916 asd_build_control_phy(ascb, phy->id, phy_func_table[func]);
917 res = asd_post_ascb_list(asd_ha, ascb , 1);
919 asd_ascb_free(ascb);