netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes
@ 2015-09-09  3:06 Florian Fainelli
  2015-09-09  3:33 ` Vivien Didelot
  2015-09-09 21:14 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2015-09-09  3:06 UTC (permalink / raw)
  To: netdev; +Cc: davem, vivien.didelot, Florian Fainelli

The macro to write 64-bits quantities to the 32-bits register swapped
the value and offsets arguments, we want to preserve the ordering of the
arguments with respect to how writel() is implemented for instance:
value first, offset/base second.

Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
David,

Can you also queue this one for -stable? Thanks!

 drivers/net/dsa/bcm_sf2.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index 22e2ebf31333..789d7b7737da 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -112,8 +112,8 @@ static inline u64 name##_readq(struct bcm_sf2_priv *priv, u32 off)	\
 	spin_unlock(&priv->indir_lock);					\
 	return (u64)indir << 32 | dir;					\
 }									\
-static inline void name##_writeq(struct bcm_sf2_priv *priv, u32 off,	\
-							u64 val)	\
+static inline void name##_writeq(struct bcm_sf2_priv *priv, u64 val,	\
+							u32 off)	\
 {									\
 	spin_lock(&priv->indir_lock);					\
 	reg_writel(priv, upper_32_bits(val), REG_DIR_DATA_WRITE);	\
-- 
2.1.0

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

* Re: [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes
  2015-09-09  3:06 [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes Florian Fainelli
@ 2015-09-09  3:33 ` Vivien Didelot
  2015-09-09 21:14 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Vivien Didelot @ 2015-09-09  3:33 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: netdev, davem

On Sep. Tuesday 08 (37) 08:06 PM, Florian Fainelli wrote:
> The macro to write 64-bits quantities to the 32-bits register swapped
> the value and offsets arguments, we want to preserve the ordering of the
> arguments with respect to how writel() is implemented for instance:
> value first, offset/base second.
> 
> Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

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

* Re: [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes
  2015-09-09  3:06 [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes Florian Fainelli
  2015-09-09  3:33 ` Vivien Didelot
@ 2015-09-09 21:14 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-09-09 21:14 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, vivien.didelot

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue,  8 Sep 2015 20:06:41 -0700

> The macro to write 64-bits quantities to the 32-bits register swapped
> the value and offsets arguments, we want to preserve the ordering of the
> arguments with respect to how writel() is implemented for instance:
> value first, offset/base second.
> 
> Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> David,
> 
> Can you also queue this one for -stable? Thanks!

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2015-09-09 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09  3:06 [PATCH net] net: dsa: bcm_sf2: Fix 64-bits register writes Florian Fainelli
2015-09-09  3:33 ` Vivien Didelot
2015-09-09 21:14 ` David Miller

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).