if (si->dft->lldd_port_formed)
si->dft->lldd_port_formed(phy);
if (port->suspended)
port->suspended = 0; else { /* we only need to handle "link returned" actions once */ return;
}
/* if the port came back: *1/presumeeverydevicecameback *2/forcethenextrevalidationtocheckallexpanderphys
*/
list_for_each_entry_safe(dev, n, &port->dev_list, dev_list_node) { int i, rc;
if (dev_is_expander(dev->dev_type)) {
dev->ex_dev.ex_change_count = -1; for (i = 0; i < dev->ex_dev.num_phys; i++) { struct ex_phy *phy = &dev->ex_dev.ex_phy[i];
if (port) { if (!phy_is_wideport_member(port, phy))
sas_deform_port(phy, false); elseif (phy->suspended) {
phy->suspended = 0;
sas_resume_port(phy);
/* phy came back, try to cancel the timeout */
wake_up(&sas_ha->eh_wait_q); return;
} else {
pr_info("%s: phy%d belongs to port%d already(%d)!\n",
__func__, phy->id, phy->port->id,
phy->port->num_phys); return;
}
}
/* see if the phy should be part of a wide port */
spin_lock_irqsave(&sas_ha->phy_port_lock, flags); for (i = 0; i < sas_ha->num_phys; i++) {
port = sas_ha->sas_port[i];
spin_lock(&port->phy_list_lock); if (*(u64 *) port->sas_addr &&
phy_is_wideport_member(port, phy) && port->num_phys > 0) { /* wide port */
port_dev = port->port_dev;
sas_form_port_add_phy(port, phy, true);
spin_unlock(&port->phy_list_lock); break;
}
spin_unlock(&port->phy_list_lock);
} /* The phy does not match any existing port, create a new one */ if (i == sas_ha->num_phys) { for (i = 0; i < sas_ha->num_phys; i++) {
port = sas_ha->sas_port[i];
spin_lock(&port->phy_list_lock); if (*(u64 *)port->sas_addr == 0
&& port->num_phys == 0) {
port_dev = port->port_dev;
sas_form_port_add_phy(port, phy, false);
spin_unlock(&port->phy_list_lock); break;
}
spin_unlock(&port->phy_list_lock);
}
if (i >= sas_ha->num_phys) {
pr_err("%s: couldn't find a free port, bug?\n",
__func__);
spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags); return;
}
}
spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags);
/* Only insert revalidate event if the port still has members */ if (port->port && dev && dev_is_expander(dev->dev_type)) { struct expander_device *ex_dev = &dev->ex_dev;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.