lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y2ebju7r.fsf@kernel.org>
Date:   Thu, 25 Mar 2021 14:25:44 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     Ray Chi <raychi@...gle.com>, gregkh@...uxfoundation.org,
        Thinh.Nguyen@...opsys.com
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        albertccwang@...gle.com, Ray Chi <raychi@...gle.com>
Subject: Re: [PATCH] usb: dwc3: add cancelled reason for dwc3 requests

Hi,

Ray Chi <raychi@...gle.com> 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

Download attachment "signature.asc" of type "application/pgp-signature" (858 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ