diff options
author | Mike Rapoport <mike@compulab.co.il> | 2010-08-22 07:22:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-27 13:13:11 -0400 |
commit | 557de5eb29caeab56c2f97b49eec02e32a2cbe32 (patch) | |
tree | 17ba29fd66c386b19da247c5090b2a48c28211d2 | |
parent | 6a017e043a8c5e4f1e7c1152bc6477da8066f5f6 (diff) |
libertas: if_sdio: fix buffer alignment in struct if_sdio_card
The commit 886275ce41a9751117367fb387ed171049eb6148 (param: lock
if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes)
introduced new fields into the if_sdio_card structure. It caused
missalignment of the if_sdio_card.buffer field and failure at driver
load time:
~# modprobe libertas_sdio
[ 62.315124] libertas_sdio: Libertas SDIO driver
[ 62.319976] libertas_sdio: Copyright Pierre Ossman
[ 63.020629] DMA misaligned error with device 48
[ 63.025207] mmci-omap-hs mmci-omap-hs.1: unexpected dma status 800
[ 66.005035] libertas: command 0x0003 timed out
[ 66.009826] libertas: Timeout submitting command 0x0003
[ 66.016296] libertas: PREP_CMD: command 0x0003 failed: -110
Adding explicit alignment attribute for the if_sdio_card.buffer field
fixes this problem.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 6e71346a7550..382f2371a1ab 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -126,7 +126,7 @@ struct if_sdio_card { | |||
126 | const char *helper; | 126 | const char *helper; |
127 | const char *firmware; | 127 | const char *firmware; |
128 | 128 | ||
129 | u8 buffer[65536]; | 129 | u8 buffer[65536] __attribute__((aligned(4))); |
130 | 130 | ||
131 | spinlock_t lock; | 131 | spinlock_t lock; |
132 | struct if_sdio_packet *packets; | 132 | struct if_sdio_packet *packets; |