Author: mav Date: Tue Nov 29 13:48:36 2016 New Revision: 309297 URL: https://svnweb.freebsd.org/changeset/base/309297
Log: 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. MFC after: 2 weeks Sponsored by: iXsystems, Inc. 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 Tue Nov 29 13:32:23 2016 (r309296) +++ head/sys/cam/scsi/scsi_enc_ses.c Tue Nov 29 13:48:36 2016 (r309297) @@ -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 ===========================*/ @@ -1475,11 +1476,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); @@ -1869,7 +1866,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); } @@ -2801,6 +2798,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); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"