[PATCH] aic94xx: fix panic on module removal in complex topology

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Index: BUILD-2.6/drivers/scsi/sas/sas_expander.c
===================================================================
--- BUILD-2.6.orig/drivers/scsi/sas/sas_expander.c	2006-07-03 04:42:18.000000000 -0500
+++ BUILD-2.6/drivers/scsi/sas/sas_expander.c	2006-07-03 04:42:37.000000000 -0500
@@ -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);


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux