> Date: Thu, 9 Jul 2015 15:40:37 +0200
> From: Stefan Sperling <[email protected]>
> 
> Allow more time for USB athn(4) firmware boot. It seems people on daemonforums
> are running into the previous 1 second timeout on some machines, which the
> driver will treat as fatal. I'm not sure if this will really fix the issue
> but it won't hurt. Also reported in NetBSD land which inherited our driver:
> http://mail-index.netbsd.org/current-users/2014/05/06/msg024793.html

Sure.  ok kettenis@

> Index: if_athn_usb.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_athn_usb.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 if_athn_usb.c
> --- if_athn_usb.c     12 Jun 2015 15:47:31 -0000      1.34
> +++ if_athn_usb.c     9 Jul 2015 13:28:01 -0000
> @@ -302,7 +302,8 @@ athn_usb_attachhook(void *xsc)
>       /* Load firmware. */
>       error = athn_usb_load_firmware(usc);
>       if (error != 0) {
> -             printf("%s: could not load firmware\n", sc->sc_dev.dv_xname);
> +             printf("%s: could not load firmware (error %d)\n",
> +                 sc->sc_dev.dv_xname, error);
>               return;
>       }
>  
> @@ -679,9 +680,9 @@ athn_usb_load_firmware(struct athn_usb_s
>       s = splusb();
>       usc->wait_msg_id = AR_HTC_MSG_READY;
>       error = usbd_do_request(usc->sc_udev, &req, NULL);
> -     /* Wait at most 1 second for firmware to boot. */
> +     /* Wait at most 2 seconds for firmware to boot. */
>       if (error == 0 && usc->wait_msg_id != 0)
> -             error = tsleep(&usc->wait_msg_id, 0, "athnfw", hz);
> +             error = tsleep(&usc->wait_msg_id, 0, "athnfw", 2 * hz);
>       usc->wait_msg_id = 0;
>       splx(s);
>       return (error);
> 
> 

Reply via email to