svn commit: r255309 - head/sys/cam/scsi

Alexander Motin mav at FreeBSD.org
Fri Sep 6 15:41:38 UTC 2013


Author: mav
Date: Fri Sep  6 15:41:37 2013
New Revision: 255309
URL: http://svnweb.freebsd.org/changeset/base/255309

Log:
  Make SES driver adequately react on simple enclosure devices -- read Short
  Enclosure status to enclosure status field, clear previous state and exit.

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	Fri Sep  6 15:38:40 2013	(r255308)
+++ head/sys/cam/scsi/scsi_enc_ses.c	Fri Sep  6 15:41:37 2013	(r255309)
@@ -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");


More information about the svn-src-all mailing list