aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 15:11:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 15:17:52 -0700
commit8a0ca91e1db5de5eb5b18cfa919d52ff8be375af (patch)
treebd3a1564940d27ae7f6229089db1283ff2a636c8 /drivers/net
parent9c1be0c4712fe760d8969427ef91107e9c062d91 (diff)
parentc43d8636971c39da993e94082fd65bfff421618e (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (68 commits) sdio_uart: Fix SDIO break control to now return success or an error mmc: host driver for Ricoh Bay1Controllers sdio: sdio_io.c Fix sparse warnings sdio: fix the use of hard coded timeout value. mmc: OLPC: update vdd/powerup quirk comment mmc: fix spares errors of sdhci.c mmc: remove multiwrite capability wbsd: fix bad dma_addr_t conversion atmel-mci: Driver for Atmel on-chip MMC controllers mmc: fix sdio_io sparse errors mmc: wbsd.c fix shadowing of 'dma' variable MMC: S3C24XX: Refuse incorrectly aligned transfers MMC: S3C24XX: Add maintainer entry MMC: S3C24XX: Update error debugging. MMC: S3C24XX: Add media presence test to request handling. MMC: S3C24XX: Fix use of msecs where jiffies are needed MMC: S3C24XX: Add MODULE_ALIAS() entries for the platform devices MMC: S3C24XX: Fix s3c2410_dma_request() return code check. MMC: S3C24XX: Allow card-detect on non-IRQ capable pin MMC: S3C24XX: Ensure host->mrq->data is valid ... Manually fixed up bogus executable bits on drivers/mmc/core/sdio_io.c and include/linux/mmc/sdio_func.h when merging.
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 3dd537be87d..b54e2ea8346 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1,7 +1,7 @@
/*
* linux/drivers/net/wireless/libertas/if_sdio.c
*
- * Copyright 2007 Pierre Ossman
+ * Copyright 2007-2008 Pierre Ossman
*
* Inspired by if_cs.c, Copyright 2007 Holger Schurig
*
@@ -266,13 +266,10 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
/*
* The transfer must be in one transaction or the firmware
- * goes suicidal.
+ * goes suicidal. There's no way to guarantee that for all
+ * controllers, but we can at least try.
*/
- chunk = size;
- if ((chunk > card->func->cur_blksize) || (chunk > 512)) {
- chunk = (chunk + card->func->cur_blksize - 1) /
- card->func->cur_blksize * card->func->cur_blksize;
- }
+ chunk = sdio_align_size(card->func, size);
ret = sdio_readsb(card->func, card->buffer, card->ioport, chunk);
if (ret)
@@ -696,13 +693,10 @@ static int if_sdio_host_to_card(struct lbs_private *priv,
/*
* The transfer must be in one transaction or the firmware
- * goes suicidal.
+ * goes suicidal. There's no way to guarantee that for all
+ * controllers, but we can at least try.
*/
- size = nb + 4;
- if ((size > card->func->cur_blksize) || (size > 512)) {
- size = (size + card->func->cur_blksize - 1) /
- card->func->cur_blksize * card->func->cur_blksize;
- }
+ size = sdio_align_size(card->func, nb + 4);
packet = kzalloc(sizeof(struct if_sdio_packet) + size,
GFP_ATOMIC);