Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237239

[PATCH 4.1 12/29] net: dsa: bcm_sf2: Fix 64-bits register writes

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.1 12/29] net: dsa: bcm_sf2: Fix 64-bits register writes
Date 2015-10-01 11:50 +0200
Message-ID <qeIEW-gR-19@gated-at.bofh.it> (permalink)
References <qeIvg-5L-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Florian Fainelli <f.fainelli@gmail.com>

[ Upstream commit 03679a14739a0d4c14b52ba65a69ff553bfba73b ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/dsa/bcm_sf2.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -112,8 +112,8 @@ static inline u64 name##_readq(struct bc
 	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);	\


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.1 00/29] 4.1.10-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-01 11:50 +0200
  [PATCH 4.1 10/29] net: dsa: bcm_sf2: Fix ageing conditions and operation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-01 11:50 +0200
  [PATCH 4.1 12/29] net: dsa: bcm_sf2: Fix 64-bits register writes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-01 11:50 +0200
  Re: [PATCH 4.1 15/29] bridge: fix igmpv3 / mldv2 report parsing Linus Lüssing <linus.luessing@c0d3.blue> - 2015-10-02 01:20 +0200
  Re: [PATCH 4.1 00/29] 4.1.10-stable review Guenter Roeck <linux@roeck-us.net> - 2015-10-02 03:30 +0200
  Re: [PATCH 4.1 00/29] 4.1.10-stable review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-02 08:30 +0200
  Re: [PATCH 4.1 00/29] 4.1.10-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-10-02 17:50 +0200

csiph-web