changeset 12819:9a65e7dafc13

6967233 target should be cleared in pmcs_clone_phy 6959995 onwire bit for work structures never gets cleared
author Srikanth Suravajhala <srikanth.suravajhala@oracle.com>
date Mon, 12 Jul 2010 11:29:14 -0700
parents 1eda4f2ee0e0
children eb600d5471d5
files usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_intr.c usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_intr.c	Mon Jul 12 08:34:38 2010 -0700
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_intr.c	Mon Jul 12 11:29:14 2010 -0700
@@ -114,6 +114,7 @@
 	 */
 	if (pwrk->state != PMCS_WORK_STATE_TIMED_OUT) {
 		pwrk->state = PMCS_WORK_STATE_INTR;
+		pwrk->onwire = 0;
 	}
 
 	pmcs_complete_work_impl(pwp, pwrk, iomb, amt);
@@ -180,6 +181,7 @@
 	 */
 	if (pwrk->state != PMCS_WORK_STATE_TIMED_OUT) {
 		pwrk->state = PMCS_WORK_STATE_INTR;
+		pwrk->onwire = 0;
 	}
 
 	/*
@@ -1189,7 +1191,7 @@
 		 * problem commands.
 		 */
 		mutex_exit(&pwrk->lock);
-	} else if (status == PMCOUT_STATUS_XFER_CMD_FRAME_ISSUED) {
+	} else {
 		pmcs_prt(pwp, PMCS_PRT_DEBUG2, pptr, NULL,
 		    "%s: tag %x put onto the wire for %s",
 		    __func__, htag, path);
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c	Mon Jul 12 08:34:38 2010 -0700
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c	Mon Jul 12 11:29:14 2010 -0700
@@ -4802,6 +4802,7 @@
 	p->phy = NULL;
 	p->abt_htag = 0;
 	p->timer = 0;
+	p->onwire = 0;
 	mutex_exit(&p->lock);
 
 	if (mutex_tryenter(&pwp->wfree_lock) == 0) {
@@ -7585,6 +7586,7 @@
 	 */
 	local->sibling = NULL;
 	local->children = NULL;
+	local->target = NULL;
 	mutex_init(&local->phy_lock, NULL, MUTEX_DRIVER,
 	    DDI_INTR_PRI(orig_phy->pwp->intr_pri));