Hi Alexander,

> On Apr 2, 2019, at 07:46, Alexander Motin <m...@freebsd.org> wrote:
> 
> Author: mav
> Date: Tue Apr  2 14:46:10 2019
> New Revision: 345805
> URL: https://svnweb.freebsd.org/changeset/base/345805
> 
> Log:
>  Unify SCSI_STATUS_BUSY retry handling with other cases.
> 
>   - Do not retry if periph was invalidated.
>   - Do not decrement retry_count if already zero.
>   - Report action_string when applicable.
> 
>  MFC after:    2 weeks
> 
> Modified:
>  head/sys/cam/cam_periph.c
> 
> Modified: head/sys/cam/cam_periph.c
> ==============================================================================
> --- head/sys/cam/cam_periph.c    Tue Apr  2 14:01:03 2019    (r345804)
> +++ head/sys/cam/cam_periph.c    Tue Apr  2 14:46:10 2019    (r345805)
> @@ -1513,6 +1513,7 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o
>     int *openings, u_int32_t *relsim_flags,
>     u_int32_t *timeout, u_int32_t *action, const char **action_string)
> {
> +    struct cam_periph *periph;
>    int error;
> 
>    switch (ccb->csio.scsi_status) {
> @@ -1595,14 +1596,21 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o
>         * Restart the queue after either another
>         * command completes or a 1 second timeout.
>         */
> -        if ((sense_flags & SF_RETRY_BUSY) != 0 ||
> -            (ccb->ccb_h.retry_count--) > 0) {
> +        periph = xpt_path_periph(ccb->ccb_h.path);
> +        if (periph->flags & CAM_PERIPH_INVALID) {

Is there a reason why this style is inconsistent with the other part of the 
change by not explicitly testing for “!= 0”?

Thanks!
-Enji
_______________________________________________
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"

Reply via email to