Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2011 15:10:33 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r225904 - projects/zfsd/head/sys/cam/scsi
Message-ID:  <201110011510.p91FAXVf022903@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Oct  1 15:10:33 2011
New Revision: 225904
URL: http://svn.freebsd.org/changeset/base/225904

Log:
   - Do not report error if index found in next Additional Status descriptor
  is less then expected. Theoretically it may happen if Additional Status will
  be used for some new type in later spec.
   - Rephrase some error messages to make them a bit more informative.

Modified:
  projects/zfsd/head/sys/cam/scsi/scsi_enc_ses.c

Modified: projects/zfsd/head/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- projects/zfsd/head/sys/cam/scsi/scsi_enc_ses.c	Sat Oct  1 13:54:48 2011	(r225903)
+++ projects/zfsd/head/sys/cam/scsi/scsi_enc_ses.c	Sat Oct  1 15:10:33 2011	(r225904)
@@ -1757,7 +1757,7 @@ ses_process_elm_addlstatus(enc_softc_t *
 						   eip_hdr->element_index,
 						   SES_ELEM_INDEX_INDIVIDUAL);
 
-			if (iter.individual_element_index != expected_index
+			if (iter.individual_element_index > expected_index
 			 && status_type == TYPE_ADDLSTATUS_MANDATORY) {
 				ENC_LOG(enc, "%s: provided element "
 					"index %d skips mandatory status "
@@ -2500,8 +2500,8 @@ ses_get_elm_addlstatus_sas(enc_softc_t *
 		case ELMTYP_ARRAY_DEV:
 			break;
 		default:
-			ENC_LOG(enc, "Element %d Additional Status Invalid "
-			    "for SAS device type 0: SES Typ 0x%x\n", nobj,
+			ENC_LOG(enc, "Element %d has Additional Status type 0, "
+			    "invalid for SES element type 0x%x\n", nobj,
 			    ses_cache->ses_types[tidx].hdr->etype_elm_type);
 			err = ENODEV;
 			goto out;
@@ -2518,8 +2518,9 @@ ses_get_elm_addlstatus_sas(enc_softc_t *
 		case ELMTYP_ESCC:
 			break;
 		default:
-			ENC_LOG(enc, "Element %d Additional Status Invalid "
-			    "for SAS device type 1\n", nobj);
+			ENC_LOG(enc, "Element %d has Additional Status type 1, "
+			    "invalid for SES element type 0x%x\n", nobj,
+			    ses_cache->ses_types[tidx].hdr->etype_elm_type);
 			err = ENODEV;
 			goto out;
 		}
@@ -2527,8 +2528,9 @@ ses_get_elm_addlstatus_sas(enc_softc_t *
 						       bufsiz, eip, nobj);
 		break;
 	default:
-		ENC_LOG(enc, "Element %d Additional Status Invalid Type %d for"
-		    " SAS object\n", dtype, nobj);
+		ENC_LOG(enc, "Element %d of type 0x%x has Additional Status "
+		    "of unknown type 0x%x\n", nobj,
+		    ses_cache->ses_types[tidx].hdr->etype_elm_type, dtype);
 		err = ENODEV;
 		break;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110011510.p91FAXVf022903>