Re: [Discussion] USB: musb-gadget: how to fix ZLP issue in musb_g_tx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/17 Sergei Shtylyov <sshtylyov@xxxxxxxxxx>:

>>>  I don't understand why we have to check this twice when only once would
>>> suffice.
>
>> This check can handle both zero and non-zero request, so it is needed.
>
>   It's needed above all the other checks, that's all. We don't need to check
> it twice.

The 1st check is

       if ((request->zero && request->length
            && (request->length % musb_ep->packet_sz == 0)
            && (request->actual == request->length)
            ||  ... ) {
            ...
       }

The 2nd is

        if (request->actual == request->length) {
            musb_g_giveback(musb_ep, request, 0);
            ......
        }

The 1st check only can handle request with zlp, but the 2nd check
can handle requests with zlp or not, so it is needed indeed, isn't it?

-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux