diff options
author | mav <mav@FreeBSD.org> | 2012-11-07 23:12:53 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-11-07 23:12:53 +0000 |
commit | 70551b60a00c987947a37eb19879c9d541aef49a (patch) | |
tree | 9c27e4fd5bb2a30358064da8647055d71e63710c /sys/cam/scsi/scsi_enc_ses.c | |
parent | b57ca0f66ce04cd94bfb6cf2fd42299f99dd3b7a (diff) | |
download | FreeBSD-src-70551b60a00c987947a37eb19879c9d541aef49a.zip FreeBSD-src-70551b60a00c987947a37eb19879c9d541aef49a.tar.gz |
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.
Diffstat (limited to 'sys/cam/scsi/scsi_enc_ses.c')
-rw-r--r-- | sys/cam/scsi/scsi_enc_ses.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 1e632ca..cbc9b90 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -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, struct enc_fsm_state *state, 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); |