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

2020-07-07 Thread Guenter Roeck
On 7/7/20 3:10 AM, Enric Balletbo i Serra wrote: > Hi Prashant and Guenter, > > Thank you to spend your time on look at this. > > On 4/7/20 16:26, 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 -EPR

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

2020-07-07 Thread Enric Balletbo i Serra
Hi Prashant and Guenter, Thank you to spend your time on look at this. On 4/7/20 16:26, 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 actual > error code gets lost. Convert al

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

2020-07-06 Thread Prashant Malani
On Mon, Jul 6, 2020 at 2:38 PM Guenter Roeck wrote: > > On 7/6/20 1:07 PM, Prashant Malani wrote: > > On Mon, Jul 6, 2020 at 12:41 PM Guenter Roeck wrote: > >> > >> On Mon, Jul 06, 2020 at 11:52:30AM -0700, Prashant Malani wrote: > >>> Hi Guenter, > >>> > >>> On Sat, Jul 04, 2020 at 07:26:07AM -0

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

2020-07-06 Thread Guenter Roeck
On 7/6/20 1:07 PM, Prashant Malani wrote: > On Mon, Jul 6, 2020 at 12:41 PM Guenter Roeck wrote: >> >> On Mon, Jul 06, 2020 at 11:52:30AM -0700, Prashant Malani wrote: >>> Hi Guenter, >>> >>> On Sat, Jul 04, 2020 at 07:26:07AM -0700, Guenter Roeck wrote: The EC reports a variety of error code

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

2020-07-06 Thread Prashant Malani
On Mon, Jul 6, 2020 at 12:41 PM Guenter Roeck wrote: > > On Mon, Jul 06, 2020 at 11:52:30AM -0700, Prashant Malani wrote: > > Hi Guenter, > > > > On Sat, Jul 04, 2020 at 07:26:07AM -0700, Guenter Roeck wrote: > > > The EC reports a variety of error codes. Most of those, with the exception > > > of

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

2020-07-06 Thread Guenter Roeck
On Mon, Jul 06, 2020 at 11:52:30AM -0700, Prashant Malani wrote: > Hi Guenter, > > On Sat, Jul 04, 2020 at 07:26:07AM -0700, 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 a

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

2020-07-06 Thread Prashant Malani
Hi Guenter, On Sat, Jul 04, 2020 at 07:26:07AM -0700, 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 actual > error code gets lost. Convert all EC errors to Linux error codes to

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

2020-07-04 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. Convert all EC errors to Linux error codes to report a more meaningful error to the caller to aid debugging. Cc: Yu-Hsuan Hsu