From 4671435c54ce79d3c671177cb47461d208186eae Mon Sep 17 00:00:00 2001 From: Dai Okamura Date: Fri, 9 Dec 2022 20:38:27 +0900 Subject: i2c: uniphier-f: correct error recovery The uniphier i2c block can recognize some handshake errors. But driver handles all error detections as no error if no timeout. So this makes unrecoverable state. This replaces the return values with the right ones to tell the i2c framework the errors: - EDEADLK for arbitration lost error - ENODATA for no answer error Signed-off-by: Dai Okamura Acked-by: Kunihiko Hayashi Reviewed-by: Heiko Schocher --- drivers/i2c/i2c-uniphier-f.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c index 9d6f1688cb1..3dcd382469e 100644 --- a/drivers/i2c/i2c-uniphier-f.c +++ b/drivers/i2c/i2c-uniphier-f.c @@ -130,12 +130,12 @@ static int wait_for_irq(struct uniphier_fi2c_priv *priv, u32 flags, if (irq & I2C_INT_AL) { dev_dbg(priv->dev, "error: arbitration lost\n"); *stop = false; - return ret; + return -EDEADLK; } if (irq & I2C_INT_NA) { dev_dbg(priv->dev, "error: no answer\n"); - return ret; + return -ENODATA; } return 0; -- cgit v1.2.3 From bee3551e00046678e300e5ba1392443f30cbe45a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 17 Dec 2022 18:41:13 +0100 Subject: Revert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot"" This reverts commit ed6251187afabf811a5fd49a44ebd61c53c7b378. Superseded by "cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage" which is less heavy-handed approach and retains part of the original behavior for non-fitImage. Signed-off-by: Marek Vasut Acked-by: Neil Armstrong --- drivers/net/tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 519ea14b070..d69a9ff4773 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -156,7 +156,7 @@ static int tsec_mcast_addr(struct udevice *dev, const u8 *mcast_mac, int join) return 0; } -static int tsec_set_promisc(struct udevice *dev, bool enable) +static int __maybe_unused tsec_set_promisc(struct udevice *dev, bool enable) { struct tsec_private *priv = dev_get_priv(dev); struct tsec __iomem *regs = priv->regs; -- cgit v1.2.3