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] [day] [month] [year] [list]
Message-ID: <8ec7cdcc-e709-357a-b255-27018f3972f1@synopsys.com>
Date:   Thu, 25 Mar 2021 21:00:27 +0000
From:   Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To:     Felipe Balbi <balbi@...nel.org>, Ray Chi <raychi@...gle.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "albertccwang@...gle.com" <albertccwang@...gle.com>
Subject: Re: [PATCH] usb: dwc3: add cancelled reason for dwc3 requests

Felipe Balbi wrote:
> 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.
> 

Note: we don't have documentation for error codes for gadget side, only
host. These are just the equivalent error codes from the host side.

What we currently have for host:
https://www.kernel.org/doc/html/latest/driver-api/usb/error-codes.html

Maybe someone can work on that in a separate patch.

Thanks,
Thinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ