• Home
  • Raw
  • Download

Lines Matching refs:phy

31 static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy *phy)  in phy_is_wideport_member()  argument
33 struct sas_ha_struct *sas_ha = phy->ha; in phy_is_wideport_member()
35 if (memcmp(port->attached_sas_addr, phy->attached_sas_addr, in phy_is_wideport_member()
37 memcmp(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE) != 0)) in phy_is_wideport_member()
42 static void sas_resume_port(struct asd_sas_phy *phy) in sas_resume_port() argument
45 struct asd_sas_port *port = phy->port; in sas_resume_port()
46 struct sas_ha_struct *sas_ha = phy->ha; in sas_resume_port()
50 si->dft->lldd_port_formed(phy); in sas_resume_port()
75 struct ex_phy *phy = &dev->ex_dev.ex_phy[i]; in sas_resume_port() local
77 phy->phy_change_count = -1; in sas_resume_port()
92 static void sas_form_port(struct asd_sas_phy *phy) in sas_form_port() argument
95 struct sas_ha_struct *sas_ha = phy->ha; in sas_form_port()
96 struct asd_sas_port *port = phy->port; in sas_form_port()
102 if (!phy_is_wideport_member(port, phy)) in sas_form_port()
103 sas_deform_port(phy, 0); in sas_form_port()
104 else if (phy->suspended) { in sas_form_port()
105 phy->suspended = 0; in sas_form_port()
106 sas_resume_port(phy); in sas_form_port()
113 __func__, phy->id, phy->port->id, in sas_form_port()
114 phy->port->num_phys); in sas_form_port()
125 phy_is_wideport_member(port, phy) && port->num_phys > 0) { in sas_form_port()
127 SAS_DPRINTK("phy%d matched wide port%d\n", phy->id, in sas_form_port()
140 memcpy(port->sas_addr, phy->sas_addr, in sas_form_port()
156 list_add_tail(&phy->port_phy_el, &port->phy_list); in sas_form_port()
157 sas_phy_set_target(phy, port->port_dev); in sas_form_port()
158 phy->port = port; in sas_form_port()
160 port->phy_mask |= (1U << phy->id); in sas_form_port()
163 port->class = phy->class; in sas_form_port()
164 memcpy(port->attached_sas_addr, phy->attached_sas_addr, in sas_form_port()
166 port->iproto = phy->iproto; in sas_form_port()
167 port->tproto = phy->tproto; in sas_form_port()
168 port->oob_mode = phy->oob_mode; in sas_form_port()
169 port->linkrate = phy->linkrate; in sas_form_port()
171 port->linkrate = max(port->linkrate, phy->linkrate); in sas_form_port()
176 port->port = sas_port_alloc(phy->phy->dev.parent, port->id); in sas_form_port()
180 sas_port_add_phy(port->port, phy->phy); in sas_form_port()
183 dev_name(&phy->phy->dev), dev_name(&port->port->dev), in sas_form_port()
192 si->dft->lldd_port_formed(phy); in sas_form_port()
194 sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN); in sas_form_port()
204 void sas_deform_port(struct asd_sas_phy *phy, int gone) in sas_deform_port() argument
206 struct sas_ha_struct *sas_ha = phy->ha; in sas_deform_port()
207 struct asd_sas_port *port = phy->port; in sas_deform_port()
225 sas_port_delete_phy(port->port, phy->phy); in sas_deform_port()
230 si->dft->lldd_port_deformed(phy); in sas_deform_port()
235 list_del_init(&phy->port_phy_el); in sas_deform_port()
236 sas_phy_set_target(phy, NULL); in sas_deform_port()
237 phy->port = NULL; in sas_deform_port()
239 port->phy_mask &= ~(1U << phy->id); in sas_deform_port()
262 struct asd_sas_phy *phy = ev->phy; in sas_porte_bytes_dmaed() local
264 clear_bit(PORTE_BYTES_DMAED, &phy->port_events_pending); in sas_porte_bytes_dmaed()
266 sas_form_port(phy); in sas_porte_bytes_dmaed()
272 struct asd_sas_phy *phy = ev->phy; in sas_porte_broadcast_rcvd() local
276 clear_bit(PORTE_BROADCAST_RCVD, &phy->port_events_pending); in sas_porte_broadcast_rcvd()
278 spin_lock_irqsave(&phy->sas_prim_lock, flags); in sas_porte_broadcast_rcvd()
279 prim = phy->sas_prim; in sas_porte_broadcast_rcvd()
280 spin_unlock_irqrestore(&phy->sas_prim_lock, flags); in sas_porte_broadcast_rcvd()
283 sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN); in sas_porte_broadcast_rcvd()
289 struct asd_sas_phy *phy = ev->phy; in sas_porte_link_reset_err() local
291 clear_bit(PORTE_LINK_RESET_ERR, &phy->port_events_pending); in sas_porte_link_reset_err()
293 sas_deform_port(phy, 1); in sas_porte_link_reset_err()
299 struct asd_sas_phy *phy = ev->phy; in sas_porte_timer_event() local
301 clear_bit(PORTE_TIMER_EVENT, &phy->port_events_pending); in sas_porte_timer_event()
303 sas_deform_port(phy, 1); in sas_porte_timer_event()
309 struct asd_sas_phy *phy = ev->phy; in sas_porte_hard_reset() local
311 clear_bit(PORTE_HARD_RESET, &phy->port_events_pending); in sas_porte_hard_reset()
313 sas_deform_port(phy, 1); in sas_porte_hard_reset()