On Fri, Jan 10, 2020 at 08:33:43PM -0600, Scott Cheloha wrote:
> This sleep has no unit, though most architectures are 100hz.
> 
> Is it fair to assume 500 ticks -> 5 seconds and move on?

I think this is actually an error and should be 500ms, I doubt it takes
more than a second for a command to complete. Waiting for 5s is maybe
excessive but should not hurt and is what the driver is doing now so OK
claudio@
 
> Index: pcmcia/if_malo.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pcmcia/if_malo.c,v
> retrieving revision 1.94
> diff -u -p -r1.94 if_malo.c
> --- pcmcia/if_malo.c  31 Dec 2019 10:05:33 -0000      1.94
> +++ pcmcia/if_malo.c  11 Jan 2020 02:31:28 -0000
> @@ -2026,7 +2026,7 @@ cmalo_cmd_request(struct malo_softc *sc,
>               return (0);
>  
>       /* wait for the command response */
> -     if (tsleep(sc, 0, "malocmd", 500)) {
> +     if (tsleep_nsec(sc, 0, "malocmd", SEC_TO_NSEC(5))) {
>               printf("%s: timeout while waiting for cmd response\n",
>                   sc->sc_dev.dv_xname);
>               return (EIO);
> 

-- 
:wq Claudio

Reply via email to