Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2012 23:12:53 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242720 - head/sys/cam/scsi
Message-ID:  <201211072312.qA7NCrvp026150@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Nov  7 23:12:53 2012
New Revision: 242720
URL: http://svnweb.freebsd.org/changeset/base/242720

Log:
  Use information about suported diagnostic pages to avoid reading optional
  Element Descriptor page if it is not supported.  This removes one error
  message from verbose logs during boot on systems with some enclosures.
  
  Sponsored by:	iXsystems, Inc.

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

Modified: head/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- head/sys/cam/scsi/scsi_enc_ses.c	Wed Nov  7 22:53:46 2012	(r242719)
+++ head/sys/cam/scsi/scsi_enc_ses.c	Wed Nov  7 23:12:53 2012	(r242720)
@@ -363,6 +363,7 @@ typedef struct ses_softc {
 	uint32_t		ses_flags;
 #define	SES_FLAG_TIMEDCOMP	0x01
 #define	SES_FLAG_ADDLSTATUS	0x02
+#define	SES_FLAG_DESC		0x04
 
 	ses_control_reqlist_t	ses_requests;
 	ses_control_reqlist_t	ses_pending_requests;
@@ -1271,7 +1272,10 @@ ses_process_pages(enc_softc_t *enc, stru
 
 	err = 0;
 	for (i = 0; i < length; i++) {
-		if (page->params[i] == SesAddlElementStatus) {
+		if (page->params[i] == SesElementDescriptor) {
+			ses->ses_flags |= SES_FLAG_DESC;
+			break;
+		} else if (page->params[i] == SesAddlElementStatus) {
 			ses->ses_flags |= SES_FLAG_ADDLSTATUS;
 			break;
 		}
@@ -1486,7 +1490,8 @@ out:
 		ses_cache_free(enc, enc_cache);
 	else {
 		enc_update_request(enc, SES_UPDATE_GETSTATUS);
-		enc_update_request(enc, SES_UPDATE_GETELMDESCS);
+		if (ses->ses_flags & SES_FLAG_DESC)
+			enc_update_request(enc, SES_UPDATE_GETELMDESCS);
 		if (ses->ses_flags & SES_FLAG_ADDLSTATUS)
 			enc_update_request(enc, SES_UPDATE_GETELMADDLSTATUS);
 		enc_update_request(enc, SES_PUBLISH_CACHE);



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