Re: [PATCH] usb: dwc3: add cancelled reason for dwc3 requests

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

 



Hi,

Ray Chi <raychi@xxxxxxxxxx> writes:
> diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h
> index 0cd281949970..a23e85bd3933 100644
> --- a/drivers/usb/dwc3/gadget.h
> +++ b/drivers/usb/dwc3/gadget.h
> @@ -56,6 +56,12 @@ struct dwc3;
>  
>  /* Frame/Microframe Number Mask */
>  #define DWC3_FRNUMBER_MASK		0x3fff
> +
> +/* Cancel reason for dwc3 request */
> +#define DWC3_REQUEST_DEQUEUED		-ECONNRESET  /* Request get dequeued */
> +#define DWC3_REQUEST_DISCONNECTED	-ESHUTDOWN   /* Device is disconnected/disabled */
> +#define DWC3_REQUEST_STALL		-EPIPE       /* Bus or protocol error */

this is just obfuscation, pass the errors directly. Also, make sure
these are documented in the API.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux