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.
This commit is contained in:
mav 2012-11-07 23:12:53 +00:00
parent b57ca0f66c
commit 70551b60a0

View File

@ -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);