svn commit: r311396 - stable/10/sys/cam/scsi
Alexander Motin
mav at FreeBSD.org
Thu Jan 5 11:01:18 UTC 2017
Author: mav
Date: Thu Jan 5 11:01:17 2017
New Revision: 311396
URL: https://svnweb.freebsd.org/changeset/base/311396
Log:
MFC r309297: Make SES status updates more aggressive.
- On control request update all status pages, since they may also be
affected if user enables/disables enclosure slots.
- Periodically update element descriptors too, since there is some
hardware where they are changed dynamically.
Modified:
stable/10/sys/cam/scsi/scsi_enc_ses.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_enc_ses.c Thu Jan 5 11:00:27 2017 (r311395)
+++ stable/10/sys/cam/scsi/scsi_enc_ses.c Thu Jan 5 11:01:17 2017 (r311396)
@@ -550,6 +550,7 @@ static int ses_set_timed_completion(enc_
static int ses_putstatus(enc_softc_t *, int, struct ses_comstat *);
#endif
+static void ses_poll_status(enc_softc_t *);
static void ses_print_addl_data(enc_softc_t *, enc_element_t *);
/*=========================== SES cleanup routines ===========================*/
@@ -1476,11 +1477,7 @@ out:
if (err)
ses_cache_free(enc, enc_cache);
else {
- enc_update_request(enc, SES_UPDATE_GETSTATUS);
- 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);
+ ses_poll_status(enc);
enc_update_request(enc, SES_PUBLISH_CACHE);
}
ENC_DLOG(enc, "%s: exiting with err %d\n", __func__, err);
@@ -1870,7 +1867,7 @@ ses_process_control_request(enc_softc_t
* o Some SCSI status error.
*/
ses_terminate_control_requests(&ses->ses_pending_requests, error);
- enc_update_request(enc, SES_UPDATE_GETSTATUS);
+ ses_poll_status(enc);
return (0);
}
@@ -2804,6 +2801,8 @@ ses_poll_status(enc_softc_t *enc)
ses = enc->enc_private;
enc_update_request(enc, SES_UPDATE_GETSTATUS);
+ 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);
}
More information about the svn-src-stable
mailing list