Lines Matching refs:asd_ha

88 	struct asd_ha_struct *asd_ha = ascb->ha;  in asd_phy_event_tasklet()  local
89 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in asd_phy_event_tasklet()
91 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_phy_event_tasklet()
100 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
106 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
114 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
121 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
129 static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in ord_phy() argument
131 u8 enabled_mask = asd_ha->hw_prof.enabled_phys; in ord_phy()
135 if (&asd_ha->phys[i] == phy) in ord_phy()
158 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_get_attached_sas_addr() local
162 addr += asd_ha->hw_prof.sata_name_base + ord_phy(asd_ha, phy); in asd_get_attached_sas_addr()
171 static void asd_form_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in asd_form_port() argument
179 spin_lock_irqsave(&asd_ha->asd_ports_lock, flags); in asd_form_port()
182 port = &asd_ha->asd_ports[i]; in asd_form_port()
216 asd_update_port_links(asd_ha, phy); in asd_form_port()
217 spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags); in asd_form_port()
220 static void asd_deform_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in asd_deform_port() argument
226 spin_lock_irqsave(&asd_ha->asd_ports_lock, flags); in asd_deform_port()
232 spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags); in asd_deform_port()
262 struct asd_ha_struct *asd_ha = ascb->ha; in asd_link_reset_err_tasklet() local
263 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in asd_link_reset_err_tasklet()
265 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_link_reset_err_tasklet()
288 asd_turn_led(asd_ha, phy_id, 0); in asd_link_reset_err_tasklet()
290 asd_deform_port(asd_ha, phy); in asd_link_reset_err_tasklet()
318 struct asd_ha_struct *asd_ha = ascb->ha; in asd_primitive_rcvd_tasklet() local
319 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_primitive_rcvd_tasklet()
356 asd_deform_port(asd_ha, phy); in asd_primitive_rcvd_tasklet()
418 struct asd_ha_struct *asd_ha = ascb->ha; in escb_tasklet_complete() local
419 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in escb_tasklet_complete()
424 struct asd_phy *phy = &asd_ha->phys[phy_id]; in escb_tasklet_complete()
460 list_for_each_entry_safe(a, b, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
486 list_for_each_entry_safe(a, b, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
510 list_for_each_entry(a, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
536 list_for_each_entry(a, &asd_ha->seq.pend_q, list) { in escb_tasklet_complete()
584 asd_turn_led(asd_ha, phy_id, 0); in escb_tasklet_complete()
587 asd_deform_port(asd_ha, phy); in escb_tasklet_complete()
613 int asd_init_post_escbs(struct asd_ha_struct *asd_ha) in asd_init_post_escbs() argument
615 struct asd_seq_data *seq = &asd_ha->seq; in asd_init_post_escbs()
622 return asd_post_escb_list(asd_ha, seq->escb_arr[0], seq->num_escbs); in asd_init_post_escbs()
645 struct asd_ha_struct *asd_ha = ascb->ha; in control_phy_tasklet_complete() local
664 asd_ha->hw_prof.enabled_phys &= ~(1 << phy_id); in control_phy_tasklet_complete()
665 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
666 asd_control_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
671 asd_control_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
673 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
675 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
680 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
681 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
685 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
690 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
691 asd_turn_led(asd_ha, phy_id, 1); in control_phy_tasklet_complete()
695 asd_ha->hw_prof.enabled_phys |= (1 << phy_id); in control_phy_tasklet_complete()
696 asd_turn_led(asd_ha, phy_id, 0); in control_phy_tasklet_complete()
901 struct asd_ha_struct *asd_ha = phy->ha->lldd_ha; in asd_control_phy() local
902 struct asd_phy_desc *pd = asd_ha->phys[phy->id].phy_desc; in asd_control_phy()
927 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); in asd_control_phy()
932 res = asd_post_ascb_list(asd_ha, ascb , 1); in asd_control_phy()