diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 1e632cae4615..cbc9b90ce060 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);