Scott Cheloha writes:

> Given the SCSI_NOSLEEP split here I think the simplest thing we can do
> is ask to sleep as much as we delay(9).
>
> The question is: if you *could* poll in 10us intervals here with
> tsleep_nsec(9), would you want to?  If so, then this works.  If
> not, what is a more appropriate interval?
>

Hi,

I believe it would be fine to use the same value as in the delay,
"1" was just the smallest available for the tsleep.

OK mikeb for the change.

Cheers,
Mike

> Index: pv/xbf.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pv/xbf.c,v
> retrieving revision 1.32
> diff -u -p -r1.32 xbf.c
> --- pv/xbf.c  17 Jul 2017 10:30:03 -0000      1.32
> +++ pv/xbf.c  15 Jan 2020 06:20:25 -0000
> @@ -738,7 +738,7 @@ xbf_poll_cmd(struct scsi_xfer *xs)
>               if (ISSET(xs->flags, SCSI_NOSLEEP))
>                       delay(10);
>               else
> -                     tsleep(xs, PRIBIO, "xbfpoll", 1);
> +                     tsleep_nsec(xs, PRIBIO, "xbfpoll", USEC_TO_NSEC(10));
>               xbf_intr(xs->sc_link->adapter_softc);
>       } while(--timo > 0);
>  

Reply via email to