changeset 12693:53d043199571

6962100 SCSAv3: otoro: cluster heads could not detect power cycled jbods
author David Hollister <david.hollister@oracle.com>
date Fri, 25 Jun 2010 13:28:48 -0600
parents 4341b447c069
children 722d7f0f41d0
files usr/src/uts/common/io/scsi/impl/scsi_hba.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/impl/scsi_hba.c	Thu Jun 24 18:16:42 2010 -0600
+++ b/usr/src/uts/common/io/scsi/impl/scsi_hba.c	Fri Jun 25 13:28:48 2010 -0600
@@ -6555,6 +6555,7 @@
 done:		ASSERT(child);
 		sdchild = ddi_get_driver_private(child);
 		ASSERT(sdchild);
+
 		/*
 		 * We may have ended up here after promotion of a previously
 		 * demoted node, where demotion deleted sd_inq data in
@@ -6564,7 +6565,7 @@
 		 * detect new device_insert.
 		 */
 		if ((sdchild->sd_inq == NULL) ||
-		    ndi_devi_device_isremoved(child)) {
+		    ((pi == NULL) && ndi_devi_device_isremoved(child))) {
 
 			/* hotplug_node can only be revived via hotplug. */
 			if ((se == SE_HP) || !ndi_dev_is_hotplug_node(child)) {
@@ -6583,7 +6584,7 @@
 					 * new reinsert.
 					 */
 					chg = ndi_devi_device_insert(child);
-					SCSI_HBA_LOG((_LOGCFG, self, NULL,
+					SCSI_HBA_LOG((_LOGCFG, NULL, child,
 					    "devinfo %s@%s device_reinsert%s",
 					    name ? name : "", addr,
 					    chg ? "" : "ed already"));
@@ -6689,6 +6690,16 @@
 						(void) mdi_pi_online(psearch,
 						    0);
 
+					/*
+					 * Report client reinsert and note if
+					 * this was a new reinsert.
+					 */
+					chg = ndi_devi_device_insert(child);
+					SCSI_HBA_LOG((_LOGCFG, NULL, child,
+					    "client devinfo %s@%s "
+					    "device_reinsert%s",
+					    name ? name : "", addr,
+					    chg ? "" : "ed already"));
 				} else {
 					scsi_enumeration_failed(child, se,
 					    mdi_pi_spathname(psearch),