Lines Matching full:phy

3  * Serial Attached SCSI (SAS) Phy class
15 /* ---------- Phy events ---------- */
20 struct asd_sas_phy *phy = ev->phy;
22 phy->error = 0;
23 sas_deform_port(phy, true);
29 struct asd_sas_phy *phy = ev->phy;
31 phy->error = 0;
37 struct asd_sas_phy *phy = ev->phy;
38 struct sas_ha_struct *sas_ha = phy->ha;
39 struct asd_sas_port *port = phy->port;
43 sas_deform_port(phy, true);
45 if (!port && phy->enabled && i->dft->lldd_control_phy) {
46 phy->error++;
47 switch (phy->error) {
50 i->dft->lldd_control_phy(phy, PHY_FUNC_HARD_RESET,
55 phy->error = 0;
56 phy->enabled = 0;
57 i->dft->lldd_control_phy(phy, PHY_FUNC_DISABLE, NULL);
66 struct asd_sas_phy *phy = ev->phy;
67 struct sas_ha_struct *sas_ha = phy->ha;
71 phy->error = 0;
72 i->dft->lldd_control_phy(phy, PHY_FUNC_RELEASE_SPINUP_HOLD, NULL);
78 struct asd_sas_phy *phy = ev->phy;
80 /* phew, lldd got the phy back in the nick of time */
81 if (!phy->suspended) {
82 dev_info(&phy->phy->dev, "resume timeout cancelled\n");
86 phy->error = 0;
87 phy->suspended = 0;
88 sas_deform_port(phy, true);
95 struct asd_sas_phy *phy = ev->phy;
96 struct sas_ha_struct *sas_ha = phy->ha;
100 if (phy->enabled) {
103 phy->error = 0;
104 phy->enabled = 0;
105 ret = i->dft->lldd_control_phy(phy, PHY_FUNC_DISABLE, NULL);
107 pr_notice("lldd disable phy%d returned %d\n", phy->id,
110 pr_notice("phy%d is not enabled, cannot shutdown\n", phy->id);
111 phy->in_shutdown = 0;
114 /* ---------- Phy class registration ---------- */
122 struct asd_sas_phy *phy = sas_ha->sas_phy[i];
124 phy->error = 0;
125 atomic_set(&phy->event_nr, 0);
126 INIT_LIST_HEAD(&phy->port_phy_el);
128 phy->port = NULL;
129 phy->ha = sas_ha;
130 spin_lock_init(&phy->frame_rcvd_lock);
131 spin_lock_init(&phy->sas_prim_lock);
132 phy->frame_rcvd_size = 0;
134 phy->phy = sas_phy_alloc(&sas_ha->shost->shost_gendev, i);
135 if (!phy->phy)
138 phy->phy->identify.initiator_port_protocols =
139 phy->iproto;
140 phy->phy->identify.target_port_protocols = phy->tproto;
141 phy->phy->identify.sas_address = SAS_ADDR(sas_ha->sas_addr);
142 phy->phy->identify.phy_identifier = i;
143 phy->phy->minimum_linkrate_hw = SAS_LINK_RATE_UNKNOWN;
144 phy->phy->maximum_linkrate_hw = SAS_LINK_RATE_UNKNOWN;
145 phy->phy->minimum_linkrate = SAS_LINK_RATE_UNKNOWN;
146 phy->phy->maximum_linkrate = SAS_LINK_RATE_UNKNOWN;
147 phy->phy->negotiated_linkrate = SAS_LINK_RATE_UNKNOWN;
149 sas_phy_add(phy->phy);