Re: [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-22 Thread Guenter Roeck
On 7/22/20 2:52 PM, Brian Norris wrote: > + drinkcat, aseda > > On Tue, Jul 21, 2020 at 07:23:20AM -0700, Guenter Roeck wrote: >> On Tue, Jul 21, 2020 at 01:29:01PM +0200, Enric Balletbo i Serra wrote: >>> On 20/7/20 22:22, Guenter Roeck wrote: + [EC_RES_INVALID_HEADER_VERSION] = -EBADMSG,

Re: [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-22 Thread Brian Norris
+ drinkcat, aseda On Tue, Jul 21, 2020 at 07:23:20AM -0700, Guenter Roeck wrote: > On Tue, Jul 21, 2020 at 01:29:01PM +0200, Enric Balletbo i Serra wrote: > > On 20/7/20 22:22, Guenter Roeck wrote: > > > + [EC_RES_INVALID_HEADER_VERSION] = -EBADMSG, > > Any idea for EC_RES_INVALID_HEADER_VERSION

Re: [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-21 Thread Guenter Roeck
On Tue, Jul 21, 2020 at 01:29:01PM +0200, Enric Balletbo i Serra wrote: > Hi Guenter, > > Thank you for work on this. Cc'ing Gwendal as he has a deep knowledge of the > EC > and their errors. > > On 20/7/20 22:22, Guenter Roeck wrote: > > The EC reports a variety of error codes. Most of those,

Re: [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-21 Thread Guenter Roeck
Hi Enric, On Tue, Jul 21, 2020 at 01:29:01PM +0200, Enric Balletbo i Serra wrote: > Hi Guenter, > > Thank you for work on this. Cc'ing Gwendal as he has a deep knowledge of the > EC > and their errors. The series is now also available in Gerrit at

Re: [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-21 Thread Enric Balletbo i Serra
Hi Guenter, Thank you for work on this. Cc'ing Gwendal as he has a deep knowledge of the EC and their errors. On 20/7/20 22:22, Guenter Roeck wrote: > The EC reports a variety of error codes. Most of those, with the exception > of EC_RES_INVALID_VERSION, are converted to -EPROTO. As result, the

[PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

2020-07-20 Thread Guenter Roeck
The EC reports a variety of error codes. Most of those, with the exception of EC_RES_INVALID_VERSION, are converted to -EPROTO. As result, the actual error code gets lost. In cros_ec_cmd_xfer_status(), convert all EC errors to Linux error codes to report a more meaningful error to the caller to