USB2 patches

Andrew Thompson thompsa at FreeBSD.org
Sun Feb 1 11:26:42 PST 2009


On Sun, Feb 01, 2009 at 07:22:15PM +0100, Hans Petter Selasky wrote:
> 
> If you compare the old USB code with the new USB code for if_zyd for example 
> you see that there are dozens of error checks everywhere:
> 
> if (error != 0)
>   goto fail;
> 
> In the new USB code I've factored out all those checks into 3 lines of code in 
> every driver:
> 
>         if (usb2_config_td_is_gone(&sc->sc_config_td)) {
>                 goto error;
>         }
> 
> In your patch you remove all error checking! If the taskqueue system does not 
> have an API function that can tell if the taskqueue is being drained from 
> inside the taskqueue callback, the taskqueue system has to be modified! It 
> cannot replace the existing system like it is now!

Things are still a work in progress, if I have missed some error
checking then it can be fixed up.


Andrew


More information about the freebsd-usb mailing list