• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/scsi/libsas/

Lines Matching refs:phy

32  * sas_form_port -- add this phy to a port
33 * @phy: the phy of interest
35 * This function adds this phy to an existing port, thus creating a wide
36 * port, or it creates a port and adds the phy to the port.
38 static void sas_form_port(struct asd_sas_phy *phy)
41 struct sas_ha_struct *sas_ha = phy->ha;
42 struct asd_sas_port *port = phy->port;
48 if (memcmp(port->attached_sas_addr, phy->attached_sas_addr,
50 sas_deform_port(phy);
52 SAS_DPRINTK("%s: phy%d belongs to port%d already(%d)!\n",
53 __FUNCTION__, phy->id, phy->port->id,
54 phy->port->num_phys);
66 phy->attached_sas_addr, SAS_ADDR_SIZE) == 0 &&
69 SAS_DPRINTK("phy%d matched wide port%d\n", phy->id,
73 memcpy(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE);
86 /* add the phy to the port */
87 list_add_tail(&phy->port_phy_el, &port->phy_list);
88 phy->port = port;
90 port->phy_mask |= (1U << phy->id);
92 if (!port->phy)
93 port->phy = phy->phy;
95 SAS_DPRINTK("phy%d added to port%d, phy_mask:0x%x\n", phy->id,
99 port->class = phy->class;
100 memcpy(port->attached_sas_addr, phy->attached_sas_addr,
102 port->iproto = phy->iproto;
103 port->tproto = phy->tproto;
104 port->oob_mode = phy->oob_mode;
105 port->linkrate = phy->linkrate;
107 port->linkrate = max(port->linkrate, phy->linkrate);
112 port->port = sas_port_alloc(phy->phy->dev.parent, port->id);
116 sas_port_add_phy(port->port, phy->phy);
123 si->dft->lldd_port_formed(phy);
125 sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN);
129 * sas_deform_port -- remove this phy from the port it belongs to
130 * @phy: the phy of interest
132 * This is called when the physical link to the other phy has been
133 * lost (on this phy), in Event thread context. We cannot delay here.
135 void sas_deform_port(struct asd_sas_phy *phy)
137 struct sas_ha_struct *sas_ha = phy->ha;
138 struct asd_sas_port *port = phy->port;
144 return; /* done by a phy event */
154 sas_port_delete_phy(port->port, phy->phy);
158 si->dft->lldd_port_deformed(phy);
163 list_del_init(&phy->port_phy_el);
164 phy->port = NULL;
166 port->phy_mask &= ~(1U << phy->id);
190 struct asd_sas_phy *phy = ev->phy;
192 sas_begin_event(PORTE_BYTES_DMAED, &phy->ha->event_lock,
193 &phy->port_events_pending);
195 sas_form_port(phy);
202 struct asd_sas_phy *phy = ev->phy;
206 sas_begin_event(PORTE_BROADCAST_RCVD, &phy->ha->event_lock,
207 &phy->port_events_pending);
209 spin_lock_irqsave(&phy->sas_prim_lock, flags);
210 prim = phy->sas_prim;
211 spin_unlock_irqrestore(&phy->sas_prim_lock, flags);
214 sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN);
221 struct asd_sas_phy *phy = ev->phy;
223 sas_begin_event(PORTE_LINK_RESET_ERR, &phy->ha->event_lock,
224 &phy->port_events_pending);
226 sas_deform_port(phy);
233 struct asd_sas_phy *phy = ev->phy;
235 sas_begin_event(PORTE_TIMER_EVENT, &phy->ha->event_lock,
236 &phy->port_events_pending);
238 sas_deform_port(phy);
245 struct asd_sas_phy *phy = ev->phy;
247 sas_begin_event(PORTE_HARD_RESET, &phy->ha->event_lock,
248 &phy->port_events_pending);
250 sas_deform_port(phy);