Date: Wed, 9 Oct 2013 19:28:07 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r256227 - stable/9/sys/cam/scsi Message-ID: <201310091928.r99JS7um077290@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Oct 9 19:28:07 2013 New Revision: 256227 URL: http://svnweb.freebsd.org/changeset/base/256227 Log: MFC r255309: Make SES driver adequately react on simple enclosure devices -- read Short Enclosure status to enclosure status field, clear previous state and exit. Modified: stable/9/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_enc_ses.c Wed Oct 9 19:26:35 2013 (r256226) +++ stable/9/sys/cam/scsi/scsi_enc_ses.c Wed Oct 9 19:28:07 2013 (r256227) @@ -1555,6 +1555,18 @@ ses_process_status(enc_softc_t *enc, str ENC_VLOG(enc, "Enclosure Status Page Too Long\n"); goto out; } + + /* Check for simple enclosure reporting short enclosure status. */ + if (length >= 4 && page->hdr.page_code == SesShortStatus) { + ENC_DLOG(enc, "Got Short Enclosure Status page\n"); + ses->ses_flags &= ~(SES_FLAG_ADDLSTATUS | SES_FLAG_DESC); + ses_cache_free(enc, enc_cache); + enc_cache->enc_status = page->hdr.page_specific_flags; + enc_update_request(enc, SES_PUBLISH_CACHE); + err = 0; + goto out; + } + /* Make sure the length contains at least one header and status */ if (length < (sizeof(*page) + sizeof(*page->elements))) { ENC_VLOG(enc, "Enclosure Status Page Too Short\n");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310091928.r99JS7um077290>