Skip to content

Commit

Permalink
libertas: if_sdio: fix buffer alignment in struct if_sdio_card
Browse files Browse the repository at this point in the history
The commit 886275c (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>
  • Loading branch information
Mike Rapoport authored and John W. Linville committed Aug 27, 2010
1 parent 6a017e0 commit 557de5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct if_sdio_card {
const char *helper;
const char *firmware;

u8 buffer[65536];
u8 buffer[65536] __attribute__((aligned(4)));

spinlock_t lock;
struct if_sdio_packet *packets;
Expand Down

0 comments on commit 557de5e

Please sign in to comment.