Lines Matching defs:ascb

67 static void asd_phy_event_tasklet(struct asd_ascb *ascb,
70 struct asd_ha_struct *asd_ha = ascb->ha;
218 static void asd_bytes_dmaed_tasklet(struct asd_ascb *ascb,
223 int edb_el = edb_id + ascb->edb_index;
224 struct asd_dma_tok *edb = ascb->ha->seq.edb_arr[edb_el];
225 struct asd_phy *phy = &ascb->ha->phys[phy_id];
236 asd_form_port(ascb->ha, phy);
240 static void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
244 struct asd_ha_struct *asd_ha = ascb->ha;
277 struct asd_ascb *cp = asd_ascb_alloc_list(ascb->ha, &num,
286 if (asd_post_ascb_list(ascb->ha, cp, 1) != 0)
293 static void asd_primitive_rcvd_tasklet(struct asd_ascb *ascb,
298 struct sas_ha_struct *sas_ha = &ascb->ha->sas_ha;
300 struct asd_ha_struct *asd_ha = ascb->ha;
359 * @ascb: pointer to Empty SCB
366 void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id)
368 struct asd_seq_data *seq = &ascb->ha->seq;
369 struct empty_scb *escb = &ascb->scb->escb;
371 struct asd_dma_tok *edb = seq->edb_arr[ascb->edb_index + edb_id];
382 ascb->dma_scb.vaddr,
383 (u64)ascb->dma_scb.dma_handle,
384 le64_to_cpu(ascb->scb->header.next_scb),
385 le16_to_cpu(ascb->scb->header.index),
386 ascb->scb->header.opcode);
391 if (!list_empty(&ascb->list))
392 list_del_init(&ascb->list);
393 i = asd_post_escb_list(ascb->ha, ascb, 1);
399 static void escb_tasklet_complete(struct asd_ascb *ascb,
402 struct asd_ha_struct *asd_ha = ascb->ha;
418 ascb->dma_scb.vaddr,
419 (unsigned long long)ascb->dma_scb.dma_handle,
421 le64_to_cpu(ascb->scb->header.next_scb),
422 le16_to_cpu(ascb->scb->header.index),
423 ascb->scb->header.opcode);
549 asd_bytes_dmaed_tasklet(ascb, dl, edb, phy_id);
554 asd_primitive_rcvd_tasklet(ascb, dl, phy_id);
558 asd_phy_event_tasklet(ascb, dl);
563 asd_link_reset_err_tasklet(ascb, dl, phy_id);
584 ascb->dma_scb.vaddr,
585 (unsigned long long)ascb->dma_scb.dma_handle,
587 le64_to_cpu(ascb->scb->header.next_scb),
588 le16_to_cpu(ascb->scb->header.index),
589 ascb->scb->header.opcode);
594 asd_invalidate_edb(ascb, edb);
616 * control_phy_tasklet_complete -- tasklet complete for CONTROL PHY ascb
617 * @ascb: pointer to an ascb
620 * This function completes a CONTROL PHY scb and frees the ascb.
626 static void control_phy_tasklet_complete(struct asd_ascb *ascb,
629 struct asd_ha_struct *asd_ha = ascb->ha;
630 struct scb *scb = ascb->scb;
633 struct asd_phy *phy = &ascb->ha->phys[phy_id];
699 asd_ascb_free(ascb);
755 * @ascb: pointer to an ascb
760 * is performed. @ascb is allocated with the list function.
761 * The caller can override the ascb->tasklet_complete to point
766 void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc)
768 struct asd_phy *phy = &ascb->ha->phys[phy_id];
769 struct scb *scb = ascb->scb;
809 ascb->tasklet_complete = control_phy_tasklet_complete;
816 static void link_adm_tasklet_complete(struct asd_ascb *ascb,
820 struct initiate_link_adm *link_adm = &ascb->scb->link_adm;
830 asd_ascb_free(ascb);
833 void asd_build_initiate_link_adm_task(struct asd_ascb *ascb, int phy_id,
836 struct scb *scb = ascb->scb;
845 ascb->tasklet_complete = link_adm_tasklet_complete;
860 * the ascb->timer.{function, expires} prior to calling the post
865 struct asd_ascb *ascb = from_timer(ascb, t, timer);
866 struct asd_seq_data *seq = &ascb->ha->seq;
869 ASD_DPRINTK("scb:0x%x timed out\n", ascb->scb->header.opcode);
873 list_del_init(&ascb->list);
876 asd_ascb_free(ascb);
894 struct asd_ascb *ascb;
918 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL);
919 if (!ascb)
922 asd_build_control_phy(ascb, phy->id, phy_func_table[func]);
923 res = asd_post_ascb_list(asd_ha, ascb , 1);
925 asd_ascb_free(ascb);