* [PATCH] via-velocity: don't annotate MAC registers as packed
@ 2011-05-25 11:07 Ulrich Hecht
2011-05-25 21:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Hecht @ 2011-05-25 11:07 UTC (permalink / raw)
To: netdev; +Cc: uli
On ARM, memory accesses through packed pointers behave in unexpected
ways in GCC releases 4.3 and higher; see https://lkml.org/lkml/2011/2/2/163
for discussion.
In this particular case, 32-bit I/O registers are accessed bytewise,
causing incorrect setting of the DMA address registers which in turn
leads to an error interrupt storm that brings the system to a halt.
Since the mac_regs structure does not need any packing anyway, this patch
simply removes the attribute to fix the issue.
Signed-off-by: Ulrich Hecht <uli@suse.de>
---
drivers/net/via-velocity.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
index 70da79d..659b211 100644
--- a/drivers/net/via-velocity.h
+++ b/drivers/net/via-velocity.h
@@ -1096,7 +1096,7 @@ struct mac_regs {
volatile __le16 PatternCRC[8]; /* 0xB0 */
volatile __le32 ByteMask[4][4]; /* 0xC0 */
-} __packed;
+};
enum hw_mib {
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] via-velocity: don't annotate MAC registers as packed
2011-05-25 11:07 [PATCH] via-velocity: don't annotate MAC registers as packed Ulrich Hecht
@ 2011-05-25 21:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-05-25 21:57 UTC (permalink / raw)
To: uli; +Cc: netdev
From: Ulrich Hecht <uli@suse.de>
Date: Wed, 25 May 2011 13:07:22 +0200
> On ARM, memory accesses through packed pointers behave in unexpected
> ways in GCC releases 4.3 and higher; see https://lkml.org/lkml/2011/2/2/163
> for discussion.
>
> In this particular case, 32-bit I/O registers are accessed bytewise,
> causing incorrect setting of the DMA address registers which in turn
> leads to an error interrupt storm that brings the system to a halt.
>
> Since the mac_regs structure does not need any packing anyway, this patch
> simply removes the attribute to fix the issue.
>
> Signed-off-by: Ulrich Hecht <uli@suse.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-25 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 11:07 [PATCH] via-velocity: don't annotate MAC registers as packed Ulrich Hecht
2011-05-25 21:57 ` 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).