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] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  7 Jul 2015 00:54:47 +0530
From:	Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
To:	linux-i2c@...r.kernel.org
Cc:	linux-arm-kernel@...ts.infradead.org, wsa@...-dreams.de,
	robert.jarzmik@...e.fr, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, robh+dt@...nel.org,
	Shouming Wang <wangshm@...vell.com>,
	Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
Subject: [PATCH-v3 03/11] i2c: pxa: Return I2C_RETRY when timeout in pio mode

From: Shouming Wang <wangshm@...vell.com>

In case of timeout in pio mode of operation return I2C_RETRY.
This behavior will be same as interrupt mode of operation.

Signed-off-by: Shouming Wang <wangshm@...vell.com>
[vaibhav.hiremath@...aro.org: Updated changelog]
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@...e.fr>
---
 drivers/i2c/busses/i2c-pxa.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 023e59f..632008f 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -745,8 +745,10 @@ static int i2c_pxa_do_pio_xfer(struct pxa_i2c *i2c,
 	ret = i2c->msg_idx;
 
 out:
-	if (timeout == 0)
+	if (timeout == 0) {
 		i2c_pxa_scream_blue_murder(i2c, "timeout");
+		ret = I2C_RETRY;
+	}
 
 	return ret;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ