changeset 13045:3ebd0e96f669

6972643 pmcs: attached-port-pm/target-port-pm not set correctly on hotplug. 6974601 scsi: probe/reset get chatty if lun-reset prop is not supported
author Srikanth Suravajhala <srikanth.suravajhala@oracle.com>
date Fri, 06 Aug 2010 11:55:21 -0700
parents d05925eeffc9
children b615ff9cec13
files usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c usr/src/uts/common/io/scsi/conf/scsi_confsubr.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c	Fri Aug 06 11:34:54 2010 -0700
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c	Fri Aug 06 11:55:21 2010 -0700
@@ -3977,6 +3977,8 @@
 				ctmp->atdt = local->atdt;
 				ctmp->link_rate = local->link_rate;
 				ctmp->pend_dtype = local->dtype;
+				ctmp->att_port_pm_tmp = local->att_port_pm_tmp;
+				ctmp->tgt_port_pm_tmp = local->tgt_port_pm_tmp;
 			}
 		}
 
--- a/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c	Fri Aug 06 11:34:54 2010 -0700
+++ b/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c	Fri Aug 06 11:55:21 2010 -0700
@@ -1024,6 +1024,7 @@
 scsi_probe(struct scsi_device *sd, int (*callback)())
 {
 	int			ret, retry = 0;
+	int			lr_cap, sr_ret;
 	scsi_hba_tran_t		*tran = sd->sd_address.a_hba_tran;
 
 	if (scsi_check_ss2_LUN_limit(sd) != 0) {
@@ -1034,6 +1035,7 @@
 		return (SCSIPROBE_NORESP);	/* skip probing this one */
 	}
 again:
+	ret = lr_cap = sr_ret = -1;
 	if (tran->tran_tgt_probe != NULL) {
 		ret = (*tran->tran_tgt_probe)(sd, callback);
 	} else {
@@ -1041,8 +1043,11 @@
 	}
 
 	if ((ret != SCSIPROBE_EXISTS) && (retry == 0)) {
-		if (scsi_reset(&sd->sd_address, RESET_LUN) != 1) {
-			cmn_err(CE_WARN, "scsi_probe: scsi_reset failed");
+		lr_cap = (*tran->tran_getcap)(&sd->sd_address, "lun-reset", 1);
+		sr_ret = scsi_reset(&sd->sd_address, RESET_LUN);
+		if ((sr_ret != 1) && (lr_cap == 1)) {
+			cmn_err(CE_WARN, "scsi_probe(%d): scsi_reset failed(%d)"
+			    " lun-reset cap(%d)", ret, sr_ret, lr_cap);
 		}
 		retry = 1;
 		goto again;