aic94xx: fix panic on module removal in complex topology
PATCH 1/1 aic94xx: fix panic on module removal in complex topology
The aic94xx still isn't stable in complex topologies. This patch fixes a panic in a two expander two device wide port configuration. However, there's still a fairly nasty soft lockup on module insertion while it's scanning the ports.
James
drivers/scsi/sas/sas_expander.c +5 -3
@@ -683,15 +683,12 @@BUG (); } port = parent->port; - port->phy = phy->phy; - port->port = phy->port; child->rphy = rphy; edev =rphy_to_expander_device (rphy); child->dev_type = phy->attached_dev_type; child->parent = parent; port->port_dev = child; child->port = port; - child->port->port = phy->port; child->iproto = phy->attached_iproto; child->tproto = phy->attached_tproto;memcpy (child->sas_addr, phy->attached_sas_addr,SAS_ADDR_SIZE );
@@ -702,6 +699,11 @@ edev->level);sas_init_dev (child);sas_rphy_add (child->rphy); + +spin_lock (&parent->port->dev_list_lock); +list_add_tail (&child->dev_list_node, &parent->port->dev_list); +spin_unlock (&parent->port->dev_list_lock); + res =sas_discover_expander (child);if (res) {kfree (child);