2020-07-08 19:02:31

by kernelci.org bot

[permalink] [raw]
Subject: chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This automated bisection report was sent to you on the basis *
* that you may be involved with the breaking commit it has *
* found. No manual investigation has been done to verify it, *
* and the root cause of the problem may be somewhere else. *
* *
* If you do send a fix, please include this trailer: *
* Reported-by: "kernelci.org bot" <[email protected]> *
* *
* Hope this helps! *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

Summary:
Start: 154353417996 KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
Plain log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.txt
HTML log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.html
Result: 8c9a6ef40bf4 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

Checks:
revert: PASS
verify: PASS

Parameters:
Tree: chrome-platform
URL: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
Branch: for-kernelci
Target: rk3399-gru-kevin
CPU arch: arm64
Lab: lab-collabora
Compiler: gcc-8
Config: defconfig
Test case: baseline.bootrr.rockchip-dp-probed

Breaking commit found:

-------------------------------------------------------------------------------
commit 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
Author: Guenter Roeck <[email protected]>
Date: Sat Jul 4 07:26:07 2020 -0700

platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes

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 <[email protected]>
Cc: Prashant Malani <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>

diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index 3e745e0fe092..10aa9e483d35 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -543,6 +543,29 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
}
EXPORT_SYMBOL(cros_ec_cmd_xfer);

+static const int cros_ec_error_map[] = {
+ [EC_RES_INVALID_COMMAND] = -EOPNOTSUPP,
+ [EC_RES_ERROR] = -EIO,
+ [EC_RES_INVALID_PARAM] = -EINVAL,
+ [EC_RES_ACCESS_DENIED] = -EACCES,
+ [EC_RES_INVALID_RESPONSE] = -EPROTO,
+ [EC_RES_INVALID_VERSION] = -ENOTSUPP,
+ [EC_RES_INVALID_CHECKSUM] = -EBADMSG,
+ [EC_RES_IN_PROGRESS] = -EINPROGRESS,
+ [EC_RES_UNAVAILABLE] = -ENODATA,
+ [EC_RES_TIMEOUT] = -ETIMEDOUT,
+ [EC_RES_OVERFLOW] = -EOVERFLOW,
+ [EC_RES_INVALID_HEADER] = -EBADR,
+ [EC_RES_REQUEST_TRUNCATED] = -EBADR,
+ [EC_RES_RESPONSE_TOO_BIG] = -EFBIG,
+ [EC_RES_BUS_ERROR] = -EFAULT,
+ [EC_RES_BUSY] = -EBUSY,
+ [EC_RES_INVALID_HEADER_VERSION] = -EBADMSG,
+ [EC_RES_INVALID_HEADER_CRC] = -EBADMSG,
+ [EC_RES_INVALID_DATA_CRC] = -EBADMSG,
+ [EC_RES_DUP_UNAVAILABLE] = -ENODATA,
+};
+
/**
* cros_ec_cmd_xfer_status() - Send a command to the ChromeOS EC.
* @ec_dev: EC device.
@@ -555,8 +578,7 @@ EXPORT_SYMBOL(cros_ec_cmd_xfer);
*
* Return:
* >=0 - The number of bytes transferred
- * -ENOTSUPP - Operation not supported
- * -EPROTO - Protocol error
+ * <0 - Linux error code
*/
int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
struct cros_ec_command *msg)
@@ -566,13 +588,12 @@ int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
ret = cros_ec_cmd_xfer(ec_dev, msg);
if (ret < 0) {
dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret);
- } else if (msg->result == EC_RES_INVALID_VERSION) {
- dev_dbg(ec_dev->dev, "Command invalid version (err:%d)\n",
- msg->result);
- return -ENOTSUPP;
} else if (msg->result != EC_RES_SUCCESS) {
- dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result);
- return -EPROTO;
+ if (msg->result < ARRAY_SIZE(cros_ec_error_map) && cros_ec_error_map[msg->result])
+ ret = cros_ec_error_map[msg->result];
+ else
+ ret = -EPROTO;
+ dev_dbg(ec_dev->dev, "Command result (err: %d [%d])\n", msg->result, ret);
}

return ret;
-------------------------------------------------------------------------------


Git bisection log:

-------------------------------------------------------------------------------
git bisect start
# good: [b3a9e3b9622ae10064826dccb4f7a52bd88c7407] Linux 5.8-rc1
git bisect good b3a9e3b9622ae10064826dccb4f7a52bd88c7407
# bad: [15435341799604f20adcbb5f69b7f0beb2a2f964] KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
git bisect bad 15435341799604f20adcbb5f69b7f0beb2a2f964
# good: [3c5ca501b46b91e68b935b4bd752a0aba5232208] platform/chrome: cros_ec_spi: Document missing function parameters
git bisect good 3c5ca501b46b91e68b935b4bd752a0aba5232208
# good: [20b736872f7f324438649a277ec711a646ce8e8d] platform/chrome: cros_ec_typec: Add PM support
git bisect good 20b736872f7f324438649a277ec711a646ce8e8d
# bad: [8c9a6ef40bf400c64c9907031bd32b59f9d4aea2] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
git bisect bad 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
# good: [e48bc01ed5adec203676c735365373b31c3c7600] platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow
git bisect good e48bc01ed5adec203676c735365373b31c3c7600
# first bad commit: [8c9a6ef40bf400c64c9907031bd32b59f9d4aea2] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
-------------------------------------------------------------------------------


2020-07-08 19:13:47

by Guenter Roeck

[permalink] [raw]
Subject: Re: chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

On 7/8/20 11:59 AM, kernelci.org bot wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis *
> * that you may be involved with the breaking commit it has *
> * found. No manual investigation has been done to verify it, *
> * and the root cause of the problem may be somewhere else. *
> * *
> * If you do send a fix, please include this trailer: *
> * Reported-by: "kernelci.org bot" <[email protected]> *
> * *
> * Hope this helps! *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin
>
> Summary:
> Start: 154353417996 KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
> Plain log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.txt
> HTML log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.html
> Result: 8c9a6ef40bf4 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>
> Checks:
> revert: PASS
> verify: PASS
>
> Parameters:
> Tree: chrome-platform
> URL: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
> Branch: for-kernelci
> Target: rk3399-gru-kevin
> CPU arch: arm64
> Lab: lab-collabora
> Compiler: gcc-8
> Config: defconfig
> Test case: baseline.bootrr.rockchip-dp-probed
>
> Breaking commit found:
>
> -------------------------------------------------------------------------------
> commit 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
> Author: Guenter Roeck <[email protected]>
> Date: Sat Jul 4 07:26:07 2020 -0700
>
> platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>
> 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.
>

Interesting. Well, good that the patch was abandoned, so I don't expect this
to be a problem in practice.

Guenter

> Cc: Yu-Hsuan Hsu <[email protected]>
> Cc: Prashant Malani <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> Signed-off-by: Enric Balletbo i Serra <[email protected]>
>
> diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
> index 3e745e0fe092..10aa9e483d35 100644
> --- a/drivers/platform/chrome/cros_ec_proto.c
> +++ b/drivers/platform/chrome/cros_ec_proto.c
> @@ -543,6 +543,29 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
> }
> EXPORT_SYMBOL(cros_ec_cmd_xfer);
>
> +static const int cros_ec_error_map[] = {
> + [EC_RES_INVALID_COMMAND] = -EOPNOTSUPP,
> + [EC_RES_ERROR] = -EIO,
> + [EC_RES_INVALID_PARAM] = -EINVAL,
> + [EC_RES_ACCESS_DENIED] = -EACCES,
> + [EC_RES_INVALID_RESPONSE] = -EPROTO,
> + [EC_RES_INVALID_VERSION] = -ENOTSUPP,
> + [EC_RES_INVALID_CHECKSUM] = -EBADMSG,
> + [EC_RES_IN_PROGRESS] = -EINPROGRESS,
> + [EC_RES_UNAVAILABLE] = -ENODATA,
> + [EC_RES_TIMEOUT] = -ETIMEDOUT,
> + [EC_RES_OVERFLOW] = -EOVERFLOW,
> + [EC_RES_INVALID_HEADER] = -EBADR,
> + [EC_RES_REQUEST_TRUNCATED] = -EBADR,
> + [EC_RES_RESPONSE_TOO_BIG] = -EFBIG,
> + [EC_RES_BUS_ERROR] = -EFAULT,
> + [EC_RES_BUSY] = -EBUSY,
> + [EC_RES_INVALID_HEADER_VERSION] = -EBADMSG,
> + [EC_RES_INVALID_HEADER_CRC] = -EBADMSG,
> + [EC_RES_INVALID_DATA_CRC] = -EBADMSG,
> + [EC_RES_DUP_UNAVAILABLE] = -ENODATA,
> +};
> +
> /**
> * cros_ec_cmd_xfer_status() - Send a command to the ChromeOS EC.
> * @ec_dev: EC device.
> @@ -555,8 +578,7 @@ EXPORT_SYMBOL(cros_ec_cmd_xfer);
> *
> * Return:
> * >=0 - The number of bytes transferred
> - * -ENOTSUPP - Operation not supported
> - * -EPROTO - Protocol error
> + * <0 - Linux error code
> */
> int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
> struct cros_ec_command *msg)
> @@ -566,13 +588,12 @@ int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
> ret = cros_ec_cmd_xfer(ec_dev, msg);
> if (ret < 0) {
> dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret);
> - } else if (msg->result == EC_RES_INVALID_VERSION) {
> - dev_dbg(ec_dev->dev, "Command invalid version (err:%d)\n",
> - msg->result);
> - return -ENOTSUPP;
> } else if (msg->result != EC_RES_SUCCESS) {
> - dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result);
> - return -EPROTO;
> + if (msg->result < ARRAY_SIZE(cros_ec_error_map) && cros_ec_error_map[msg->result])
> + ret = cros_ec_error_map[msg->result];
> + else
> + ret = -EPROTO;
> + dev_dbg(ec_dev->dev, "Command result (err: %d [%d])\n", msg->result, ret);
> }
>
> return ret;
> -------------------------------------------------------------------------------
>
>
> Git bisection log:
>
> -------------------------------------------------------------------------------
> git bisect start
> # good: [b3a9e3b9622ae10064826dccb4f7a52bd88c7407] Linux 5.8-rc1
> git bisect good b3a9e3b9622ae10064826dccb4f7a52bd88c7407
> # bad: [15435341799604f20adcbb5f69b7f0beb2a2f964] KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
> git bisect bad 15435341799604f20adcbb5f69b7f0beb2a2f964
> # good: [3c5ca501b46b91e68b935b4bd752a0aba5232208] platform/chrome: cros_ec_spi: Document missing function parameters
> git bisect good 3c5ca501b46b91e68b935b4bd752a0aba5232208
> # good: [20b736872f7f324438649a277ec711a646ce8e8d] platform/chrome: cros_ec_typec: Add PM support
> git bisect good 20b736872f7f324438649a277ec711a646ce8e8d
> # bad: [8c9a6ef40bf400c64c9907031bd32b59f9d4aea2] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
> git bisect bad 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
> # good: [e48bc01ed5adec203676c735365373b31c3c7600] platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow
> git bisect good e48bc01ed5adec203676c735365373b31c3c7600
> # first bad commit: [8c9a6ef40bf400c64c9907031bd32b59f9d4aea2] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
> -------------------------------------------------------------------------------
>

2020-07-08 20:33:13

by Guenter Roeck

[permalink] [raw]
Subject: Re: chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

On 7/8/20 11:59 AM, kernelci.org bot wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis *
> * that you may be involved with the breaking commit it has *
> * found. No manual investigation has been done to verify it, *
> * and the root cause of the problem may be somewhere else. *
> * *
> * If you do send a fix, please include this trailer: *
> * Reported-by: "kernelci.org bot" <[email protected]> *
> * *
> * Hope this helps! *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin
>
> Summary:
> Start: 154353417996 KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
> Plain log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.txt
> HTML log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.html
> Result: 8c9a6ef40bf4 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>
> Checks:
> revert: PASS
> verify: PASS
>
> Parameters:
> Tree: chrome-platform
> URL: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
> Branch: for-kernelci
> Target: rk3399-gru-kevin
> CPU arch: arm64
> Lab: lab-collabora
> Compiler: gcc-8
> Config: defconfig
> Test case: baseline.bootrr.rockchip-dp-probed
>
> Breaking commit found:
>
> -------------------------------------------------------------------------------
> commit 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
> Author: Guenter Roeck <[email protected]>
> Date: Sat Jul 4 07:26:07 2020 -0700
>
> platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>
> 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 <[email protected]>
> Cc: Prashant Malani <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> Signed-off-by: Enric Balletbo i Serra <[email protected]>
>

So, just FTR, turns out that there are callers which specifically check for
-EPROTO and examine the EC error code if it is returned, or just accept
-EPROTO as generic failure (but nothing else). Example is drivers/pwm/pwm-cros-ec.c:
cros_ec_num_pwms(). Such commands now fail, in this case because
EC_RES_INVALID_PARAM is now returned as -EINVAL and cros_ec_num_pwms()
doesn't expect that.

drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c has a similar problem;
it only accepts -EPROTO as "valid" error, but nothing else. I didn't check
for others.

Guenter

2020-07-09 09:18:40

by Enric Balletbo i Serra

[permalink] [raw]
Subject: Re: chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

Hi,

On 8/7/20 22:32, Guenter Roeck wrote:
> On 7/8/20 11:59 AM, kernelci.org bot wrote:
>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>> * This automated bisection report was sent to you on the basis *
>> * that you may be involved with the breaking commit it has *
>> * found. No manual investigation has been done to verify it, *
>> * and the root cause of the problem may be somewhere else. *
>> * *
>> * If you do send a fix, please include this trailer: *
>> * Reported-by: "kernelci.org bot" <[email protected]> *
>> * *
>> * Hope this helps! *
>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>
>> chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin
>>
>> Summary:
>> Start: 154353417996 KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
>> Plain log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.txt
>> HTML log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.html
>> Result: 8c9a6ef40bf4 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>>
>> Checks:
>> revert: PASS
>> verify: PASS
>>
>> Parameters:
>> Tree: chrome-platform
>> URL: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
>> Branch: for-kernelci
>> Target: rk3399-gru-kevin
>> CPU arch: arm64
>> Lab: lab-collabora
>> Compiler: gcc-8
>> Config: defconfig
>> Test case: baseline.bootrr.rockchip-dp-probed
>>
>> Breaking commit found:
>>
>> -------------------------------------------------------------------------------
>> commit 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
>> Author: Guenter Roeck <[email protected]>
>> Date: Sat Jul 4 07:26:07 2020 -0700
>>
>> platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>>
>> 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 <[email protected]>
>> Cc: Prashant Malani <[email protected]>
>> Signed-off-by: Guenter Roeck <[email protected]>
>> Signed-off-by: Enric Balletbo i Serra <[email protected]>
>>

So, as Guenter pointed I dropped this patch now.

>
> So, just FTR, turns out that there are callers which specifically check for
> -EPROTO and examine the EC error code if it is returned, or just accept
> -EPROTO as generic failure (but nothing else). Example is drivers/pwm/pwm-cros-ec.c:
> cros_ec_num_pwms(). Such commands now fail, in this case because
> EC_RES_INVALID_PARAM is now returned as -EINVAL and cros_ec_num_pwms()
> doesn't expect that.
>

Right, that's interesting, and I'll take in consideration for future reworks of
the above patch and also take a deeper look at those specific cases reported.

BTW, Guillaume, I queued that patch to give a try and test 3 days ago. Is the
bisection job expected to take that time to run? In this case I think it also
took some time to receive the build test, so probably is just a matter of having
lot of jobs in the queue?

I am not complaining at all, just curious, and just want to know to improve my
maintainer workflow.

Thanks,
Enric

> drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c has a similar problem;
> it only accepts -EPROTO as "valid" error, but nothing else. I didn't check
> for others.
>
> Guenter
>

2020-07-09 11:05:51

by Guillaume Tucker

[permalink] [raw]
Subject: Re: chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin

On 09/07/2020 10:17, Enric Balletbo i Serra wrote:
> Hi,
>
> On 8/7/20 22:32, Guenter Roeck wrote:
>> On 7/8/20 11:59 AM, kernelci.org bot wrote:
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>> * This automated bisection report was sent to you on the basis *
>>> * that you may be involved with the breaking commit it has *
>>> * found. No manual investigation has been done to verify it, *
>>> * and the root cause of the problem may be somewhere else. *
>>> * *
>>> * If you do send a fix, please include this trailer: *
>>> * Reported-by: "kernelci.org bot" <[email protected]> *
>>> * *
>>> * Hope this helps! *
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>>
>>> chrome-platform/for-kernelci bisection: baseline.bootrr.rockchip-dp-probed on rk3399-gru-kevin
>>>
>>> Summary:
>>> Start: 154353417996 KERNELCI: x86_64_defconfig: Enable support for Chromebooks devices
>>> Plain log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.txt
>>> HTML log: https://storage.kernelci.org/chrome-platform/for-kernelci/v5.8-rc1-20-g154353417996/arm64/defconfig/gcc-8/lab-collabora/baseline-rk3399-gru-kevin.html
>>> Result: 8c9a6ef40bf4 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>>>
>>> Checks:
>>> revert: PASS
>>> verify: PASS
>>>
>>> Parameters:
>>> Tree: chrome-platform
>>> URL: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
>>> Branch: for-kernelci
>>> Target: rk3399-gru-kevin
>>> CPU arch: arm64
>>> Lab: lab-collabora
>>> Compiler: gcc-8
>>> Config: defconfig
>>> Test case: baseline.bootrr.rockchip-dp-probed
>>>
>>> Breaking commit found:
>>>
>>> -------------------------------------------------------------------------------
>>> commit 8c9a6ef40bf400c64c9907031bd32b59f9d4aea2
>>> Author: Guenter Roeck <[email protected]>
>>> Date: Sat Jul 4 07:26:07 2020 -0700
>>>
>>> platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
>>>
>>> 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 <[email protected]>
>>> Cc: Prashant Malani <[email protected]>
>>> Signed-off-by: Guenter Roeck <[email protected]>
>>> Signed-off-by: Enric Balletbo i Serra <[email protected]>
>>>
>
> So, as Guenter pointed I dropped this patch now.
>
>>
>> So, just FTR, turns out that there are callers which specifically check for
>> -EPROTO and examine the EC error code if it is returned, or just accept
>> -EPROTO as generic failure (but nothing else). Example is drivers/pwm/pwm-cros-ec.c:
>> cros_ec_num_pwms(). Such commands now fail, in this case because
>> EC_RES_INVALID_PARAM is now returned as -EINVAL and cros_ec_num_pwms()
>> doesn't expect that.
>>
>
> Right, that's interesting, and I'll take in consideration for future reworks of
> the above patch and also take a deeper look at those specific cases reported.

This bisection is probably one of the most interesting ones
indeed. I should mention it when I finally get round to making
a "KernelCI bisections hall of fame" blog post.

> BTW, Guillaume, I queued that patch to give a try and test 3 days ago. Is the
> bisection job expected to take that time to run? In this case I think it also
> took some time to receive the build test, so probably is just a matter of having
> lot of jobs in the queue?
>
> I am not complaining at all, just curious, and just want to know to improve my
> maintainer workflow.

I think what you're doing is perfectly fine, there were some
issues with Jenkins and one build server that caused some
KernelCI builds to not be run this week. Also there is an
intermittent bug in LAVA that causes tests to not run, so I think
the delay was due to an unfortunate combination of infrastructure
issues.

We now have a rather fast build server dedicated to bisections,
so for a maintainer branch like yours where it just takes a
handful of iterations I would expect this kind of report to be
sent at most 6h after a git push. Bisecting linux-next can take
a few extra hours with typically 10~15 iterations.

Best wishes,
Guillaume

>> drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c has a similar problem;
>> it only accepts -EPROTO as "valid" error, but nothing else. I didn't check
>> for others.
>>
>> Guenter
>>