Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2019 09:43:40 -0700
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        Alexander Motin <mav@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r345805 - head/sys/cam
Message-ID:  <E04D8DC1-5C88-4735-8453-EDB987B2B840@gmail.com>
In-Reply-To: <201904021446.x32EkBM7016545@repo.freebsd.org>
References:  <201904021446.x32EkBM7016545@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alexander,

> On Apr 2, 2019, at 07:46, Alexander Motin <mav@freebsd.org> wrote:
>=20
> Author: mav
> Date: Tue Apr  2 14:46:10 2019
> New Revision: 345805
> URL: https://svnweb.freebsd.org/changeset/base/345805
>=20
> Log:
>  Unify SCSI_STATUS_BUSY retry handling with other cases.
>=20
>   - Do not retry if periph was invalidated.
>   - Do not decrement retry_count if already zero.
>   - Report action_string when applicable.
>=20
>  MFC after:    2 weeks
>=20
> Modified:
>  head/sys/cam/cam_periph.c
>=20
> Modified: head/sys/cam/cam_periph.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- 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;
>=20
>    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) !=3D 0 ||
> -            (ccb->ccb_h.retry_count--) > 0) {
> +        periph =3D 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 c=
hange by not explicitly testing for =E2=80=9C!=3D 0=E2=80=9D?

Thanks!
-Enji=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E04D8DC1-5C88-4735-8453-EDB987B2B840>