Lines Matching refs:asd_ha

70 	struct asd_ha_struct *asd_ha = ascb->ha;  in asd_phy_event_tasklet()  local
71 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in asd_phy_event_tasklet()
73 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_phy_event_tasklet()
82 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
88 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
96 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
103 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
111 static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in ord_phy() argument
113 u8 enabled_mask = asd_ha->hw_prof.enabled_phys; in ord_phy()
117 if (&asd_ha->phys[i] == phy) in ord_phy()
140 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_get_attached_sas_addr() local
144 addr += asd_ha->hw_prof.sata_name_base + ord_phy(asd_ha, phy); in asd_get_attached_sas_addr()
153 static void asd_form_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in asd_form_port() argument
161 spin_lock_irqsave(&asd_ha->asd_ports_lock, flags); in asd_form_port()
164 port = &asd_ha->asd_ports[i]; in asd_form_port()
198 asd_update_port_links(asd_ha, phy); in asd_form_port()
199 spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags); in asd_form_port()
202 static void asd_deform_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in asd_deform_port() argument
208 spin_lock_irqsave(&asd_ha->asd_ports_lock, flags); in asd_deform_port()
214 spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags); in asd_deform_port()
244 struct asd_ha_struct *asd_ha = ascb->ha; in asd_link_reset_err_tasklet() local
245 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in asd_link_reset_err_tasklet()
247 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_link_reset_err_tasklet()
270 asd_turn_led(asd_ha, phy_id, 0); in asd_link_reset_err_tasklet()
272 asd_deform_port(asd_ha, phy); in asd_link_reset_err_tasklet()
300 struct asd_ha_struct *asd_ha = ascb->ha; in asd_primitive_rcvd_tasklet() local
301 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_primitive_rcvd_tasklet()
338 asd_deform_port(asd_ha, phy); in asd_primitive_rcvd_tasklet()
400 struct asd_ha_struct *asd_ha = ascb->ha; in escb_tasklet_complete() local
401 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in escb_tasklet_complete()
406 struct asd_phy *phy = &asd_ha->phys[phy_id]; in escb_tasklet_complete()
442 list_for_each_entry_safe(a, b, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
468 list_for_each_entry_safe(a, b, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
492 list_for_each_entry(a, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
518 list_for_each_entry(a, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
566 asd_turn_led(asd_ha, phy_id, 0); in escb_tasklet_complete()
569 asd_deform_port(asd_ha, phy); in escb_tasklet_complete()
595 int asd_init_post_escbs(struct asd_ha_struct *asd_ha) in asd_init_post_escbs() argument
597 struct asd_seq_data *seq = &asd_ha->seq; in asd_init_post_escbs()
604 return asd_post_escb_list(asd_ha, seq->escb_arr[0], seq->num_escbs); in asd_init_post_escbs()
627 struct asd_ha_struct *asd_ha = ascb->ha; in control_phy_tasklet_complete() local
646 asd_ha->hw_prof.enabled_phys &= ~(1 << phy_id); in control_phy_tasklet_complete()
647 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
648 asd_control_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
653 asd_control_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
655 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
657 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
662 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
663 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
667 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
672 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
673 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
677 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
678 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
888 struct asd_ha_struct *asd_ha = phy->ha->lldd_ha; in asd_control_phy() local
889 struct asd_phy_desc *pd = asd_ha->phys[phy->id].phy_desc; in asd_control_phy()
914 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); in asd_control_phy()
919 res = asd_post_ascb_list(asd_ha, ascb , 1); in asd_control_phy()