netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] qed: Fix next-ptr chains for BE / 32-bit
@ 2016-06-04  5:20 Yuval Mintz
  2016-06-04  5:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yuval Mintz @ 2016-06-04  5:20 UTC (permalink / raw)
  To: davem, netdev; +Cc: fengguang.wu, Yuval Mintz

Commit a91eb52abb50 ("qed: Revisit chain implementation") contains an
incorrect implementation for BE platforms, as device's regpairs containing
addresses are LE and they're not converted correctly when read back.
In addition, it raises a compilation warning for 32-bit platforms where
dma_addr_t is a 32-bit variable.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
Dave,

Please consider applying this to `net-next'.

Thanks,
Yuval
---
 include/linux/qed/qed_chain.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h
index eceaa9e..7e441bd 100644
--- a/include/linux/qed/qed_chain.h
+++ b/include/linux/qed/qed_chain.h
@@ -25,10 +25,9 @@
 				} while (0)
 
 #define HILO_GEN(hi, lo, type)  ((((type)(hi)) << 32) + (lo))
-#define HILO_DMA(hi, lo)        HILO_GEN(hi, lo, dma_addr_t)
 #define HILO_64(hi, lo) HILO_GEN((le32_to_cpu(hi)), (le32_to_cpu(lo)), u64)
-#define HILO_DMA_REGPAIR(regpair)       (HILO_DMA(regpair.hi, regpair.lo))
 #define HILO_64_REGPAIR(regpair)        (HILO_64(regpair.hi, regpair.lo))
+#define HILO_DMA_REGPAIR(regpair)	((dma_addr_t)HILO_64_REGPAIR(regpair))
 
 enum qed_chain_mode {
 	/* Each Page contains a next pointer at its end */
-- 
1.9.3

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

* Re: [PATCH net-next] qed: Fix next-ptr chains for BE / 32-bit
  2016-06-04  5:20 [PATCH net-next] qed: Fix next-ptr chains for BE / 32-bit Yuval Mintz
@ 2016-06-04  5:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-06-04  5:42 UTC (permalink / raw)
  To: Yuval.Mintz; +Cc: netdev, fengguang.wu

From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Sat, 4 Jun 2016 08:20:16 +0300

> Commit a91eb52abb50 ("qed: Revisit chain implementation") contains an
> incorrect implementation for BE platforms, as device's regpairs containing
> addresses are LE and they're not converted correctly when read back.
> In addition, it raises a compilation warning for 32-bit platforms where
> dma_addr_t is a 32-bit variable.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>

Applied, thanks.

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

end of thread, other threads:[~2016-06-04  5:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-04  5:20 [PATCH net-next] qed: Fix next-ptr chains for BE / 32-bit Yuval Mintz
2016-06-04  5:42 ` 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).