linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
@ 2014-09-05 23:34 Sergei Shtylyov
       [not found] ` <2641177.jdYX8POT82-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2014-09-05 23:34 UTC (permalink / raw)
  To: wsa, linux-i2c; +Cc: linux-sh

Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
1's in bits 8-31, thus going against the manuals, so fix them.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org

---
The patch is against Wolfram Sang's 'linux.git' repo's 'i2c/for-current' branch.

 drivers/i2c/busses/i2c-rcar.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/i2c/busses/i2c-rcar.c
===================================================================
--- linux.orig/drivers/i2c/busses/i2c-rcar.c
+++ linux/drivers/i2c/busses/i2c-rcar.c
@@ -76,8 +76,8 @@
 #define RCAR_IRQ_RECV	(MNR | MAL | MST | MAT | MDR)
 #define RCAR_IRQ_STOP	(MST)
 
-#define RCAR_IRQ_ACK_SEND	(~(MAT | MDE))
-#define RCAR_IRQ_ACK_RECV	(~(MAT | MDR))
+#define RCAR_IRQ_ACK_SEND	(~(MAT | MDE) & 0xFF)
+#define RCAR_IRQ_ACK_RECV	(~(MAT | MDR) & 0xFF)
 
 #define ID_LAST_MSG	(1 << 0)
 #define ID_IOERROR	(1 << 1)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
       [not found] ` <2641177.jdYX8POT82-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2014-09-20  9:51   ` Wolfram Sang
  2014-09-21 17:39     ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2014-09-20  9:51 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

On Sat, Sep 06, 2014 at 03:34:32AM +0400, Sergei Shtylyov wrote:
> Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
> 0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
> 1's in bits 8-31, thus going against the manuals, so fix them.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 

Applied to for-current, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
  2014-09-20  9:51   ` Wolfram Sang
@ 2014-09-21 17:39     ` Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-09-21 17:39 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-sh

Hello.

On 09/20/2014 01:51 PM, Wolfram Sang wrote:

>> Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
>> 0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
>> 1's in bits 8-31, thus going against the manuals, so fix them.

>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> Cc: stable@vger.kernel.org

> Applied to for-current, thanks!

    Thanks. However, I don't see it in your tree (and neither my cleanups).

WBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-21 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 23:34 [PATCH] i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND} Sergei Shtylyov
     [not found] ` <2641177.jdYX8POT82-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2014-09-20  9:51   ` Wolfram Sang
2014-09-21 17:39     ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).