Lines Matching refs:phy
36 struct asd_sas_phy *phy = ev->phy; in sas_phye_loss_of_signal() local
38 phy->in_shutdown = 0; in sas_phye_loss_of_signal()
39 phy->error = 0; in sas_phye_loss_of_signal()
40 sas_deform_port(phy, 1); in sas_phye_loss_of_signal()
46 struct asd_sas_phy *phy = ev->phy; in sas_phye_oob_done() local
48 phy->in_shutdown = 0; in sas_phye_oob_done()
49 phy->error = 0; in sas_phye_oob_done()
55 struct asd_sas_phy *phy = ev->phy; in sas_phye_oob_error() local
56 struct sas_ha_struct *sas_ha = phy->ha; in sas_phye_oob_error()
57 struct asd_sas_port *port = phy->port; in sas_phye_oob_error()
61 sas_deform_port(phy, 1); in sas_phye_oob_error()
63 if (!port && phy->enabled && i->dft->lldd_control_phy) { in sas_phye_oob_error()
64 phy->error++; in sas_phye_oob_error()
65 switch (phy->error) { in sas_phye_oob_error()
68 i->dft->lldd_control_phy(phy, PHY_FUNC_HARD_RESET, in sas_phye_oob_error()
73 phy->error = 0; in sas_phye_oob_error()
74 phy->enabled = 0; in sas_phye_oob_error()
75 i->dft->lldd_control_phy(phy, PHY_FUNC_DISABLE, NULL); in sas_phye_oob_error()
84 struct asd_sas_phy *phy = ev->phy; in sas_phye_spinup_hold() local
85 struct sas_ha_struct *sas_ha = phy->ha; in sas_phye_spinup_hold()
89 phy->error = 0; in sas_phye_spinup_hold()
90 i->dft->lldd_control_phy(phy, PHY_FUNC_RELEASE_SPINUP_HOLD, NULL); in sas_phye_spinup_hold()
96 struct asd_sas_phy *phy = ev->phy; in sas_phye_resume_timeout() local
99 if (!phy->suspended) { in sas_phye_resume_timeout()
100 dev_info(&phy->phy->dev, "resume timeout cancelled\n"); in sas_phye_resume_timeout()
104 phy->error = 0; in sas_phye_resume_timeout()
105 phy->suspended = 0; in sas_phye_resume_timeout()
106 sas_deform_port(phy, 1); in sas_phye_resume_timeout()
113 struct asd_sas_phy *phy = ev->phy; in sas_phye_shutdown() local
114 struct sas_ha_struct *sas_ha = phy->ha; in sas_phye_shutdown()
118 if (phy->enabled) { in sas_phye_shutdown()
121 phy->error = 0; in sas_phye_shutdown()
122 phy->enabled = 0; in sas_phye_shutdown()
123 ret = i->dft->lldd_control_phy(phy, PHY_FUNC_DISABLE, NULL); in sas_phye_shutdown()
126 phy->id, ret); in sas_phye_shutdown()
129 phy->id); in sas_phye_shutdown()
140 struct asd_sas_phy *phy = sas_ha->sas_phy[i]; in sas_register_phys() local
142 phy->error = 0; in sas_register_phys()
143 atomic_set(&phy->event_nr, 0); in sas_register_phys()
144 INIT_LIST_HEAD(&phy->port_phy_el); in sas_register_phys()
146 phy->port = NULL; in sas_register_phys()
147 phy->ha = sas_ha; in sas_register_phys()
148 spin_lock_init(&phy->frame_rcvd_lock); in sas_register_phys()
149 spin_lock_init(&phy->sas_prim_lock); in sas_register_phys()
150 phy->frame_rcvd_size = 0; in sas_register_phys()
152 phy->phy = sas_phy_alloc(&sas_ha->core.shost->shost_gendev, i); in sas_register_phys()
153 if (!phy->phy) in sas_register_phys()
156 phy->phy->identify.initiator_port_protocols = in sas_register_phys()
157 phy->iproto; in sas_register_phys()
158 phy->phy->identify.target_port_protocols = phy->tproto; in sas_register_phys()
159 phy->phy->identify.sas_address = SAS_ADDR(sas_ha->sas_addr); in sas_register_phys()
160 phy->phy->identify.phy_identifier = i; in sas_register_phys()
161 phy->phy->minimum_linkrate_hw = SAS_LINK_RATE_UNKNOWN; in sas_register_phys()
162 phy->phy->maximum_linkrate_hw = SAS_LINK_RATE_UNKNOWN; in sas_register_phys()
163 phy->phy->minimum_linkrate = SAS_LINK_RATE_UNKNOWN; in sas_register_phys()
164 phy->phy->maximum_linkrate = SAS_LINK_RATE_UNKNOWN; in sas_register_phys()
165 phy->phy->negotiated_linkrate = SAS_LINK_RATE_UNKNOWN; in sas_register_phys()
167 sas_phy_add(phy->phy); in sas_register_phys()