Lines Matching refs:ha

115 	struct sas_ha_struct *ha = ev->ha;  in sas_hae_reset()  local
117 clear_bit(HAE_RESET, &ha->pending); in sas_hae_reset()
367 void sas_prep_resume_ha(struct sas_ha_struct *ha) in sas_prep_resume_ha() argument
371 set_bit(SAS_HA_REGISTERED, &ha->state); in sas_prep_resume_ha()
374 for (i = 0; i < ha->num_phys; i++) { in sas_prep_resume_ha()
375 struct asd_sas_phy *phy = ha->sas_phy[i]; in sas_prep_resume_ha()
385 static int phys_suspended(struct sas_ha_struct *ha) in phys_suspended() argument
389 for (i = 0; i < ha->num_phys; i++) { in phys_suspended()
390 struct asd_sas_phy *phy = ha->sas_phy[i]; in phys_suspended()
399 void sas_resume_ha(struct sas_ha_struct *ha) in sas_resume_ha() argument
410 i = phys_suspended(ha); in sas_resume_ha()
412 dev_info(ha->dev, "waiting up to 25 seconds for %d phy%s to resume\n", in sas_resume_ha()
414 wait_event_timeout(ha->eh_wait_q, phys_suspended(ha) == 0, tmo); in sas_resume_ha()
415 for (i = 0; i < ha->num_phys; i++) { in sas_resume_ha()
416 struct asd_sas_phy *phy = ha->sas_phy[i]; in sas_resume_ha()
427 scsi_unblock_requests(ha->core.shost); in sas_resume_ha()
428 sas_drain_work(ha); in sas_resume_ha()
432 void sas_suspend_ha(struct sas_ha_struct *ha) in sas_suspend_ha() argument
436 sas_disable_events(ha); in sas_suspend_ha()
437 scsi_block_requests(ha->core.shost); in sas_suspend_ha()
438 for (i = 0; i < ha->num_phys; i++) { in sas_suspend_ha()
439 struct asd_sas_port *port = ha->sas_port[i]; in sas_suspend_ha()
445 mutex_lock(&ha->drain_mutex); in sas_suspend_ha()
446 __sas_drain_work(ha); in sas_suspend_ha()
447 mutex_unlock(&ha->drain_mutex); in sas_suspend_ha()
490 struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); in queue_phy_reset() local
502 spin_lock_irq(&ha->lock); in queue_phy_reset()
503 sas_queue_work(ha, &d->reset_work); in queue_phy_reset()
504 spin_unlock_irq(&ha->lock); in queue_phy_reset()
506 rc = sas_drain_work(ha); in queue_phy_reset()
517 struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); in queue_phy_enable() local
529 spin_lock_irq(&ha->lock); in queue_phy_enable()
530 sas_queue_work(ha, &d->enable_work); in queue_phy_enable()
531 spin_unlock_irq(&ha->lock); in queue_phy_enable()
533 rc = sas_drain_work(ha); in queue_phy_enable()