From owner-svn-src-all@FreeBSD.ORG Wed Nov 7 23:12:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2ACEE605; Wed, 7 Nov 2012 23:12:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EC9828FC16; Wed, 7 Nov 2012 23:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qA7NCrTM026152; Wed, 7 Nov 2012 23:12:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qA7NCrvp026150; Wed, 7 Nov 2012 23:12:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201211072312.qA7NCrvp026150@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Nov 2012 23:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242720 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2012 23:12:54 -0000 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);