Skip to content

Commit

Permalink
via-velocity: don't annotate MAC registers as packed
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ulrich Hecht authored and David S. Miller committed May 25, 2011
1 parent 1ba37c5 commit d10358d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/via-velocity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ struct mac_regs {

volatile __le16 PatternCRC[8]; /* 0xB0 */
volatile __le32 ByteMask[4][4]; /* 0xC0 */
} __packed;
};


enum hw_mib {
Expand Down

0 comments on commit d10358d

Please sign in to comment.