aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-11-03 02:44:42 -0400
committerLuciano Coelho <coelho@ti.com>2011-11-08 08:36:53 -0500
commite62c9ce4a4c0e0ffd5718e962ba4606cd5d0d600 (patch)
tree84a6455690856ee82ddc93f2d560a6262140b0ca /drivers
parentce39defb5c6312a89a0c7be48797d6fb8fe9abad (diff)
wl12xx: use the same SDIO block size for all different chips
The sdio driver uses a block size of 512 bytes by default. With our card, this doesn't work correctly because it sets the block size FBR in the chip too early (ie. before the chip is powered on). Thus, if we don't set it explicitly, block mode remains disabled in the chip. If we try to send more data than fits in one block, the sdio driver will split it into separate blocks before sending to the chip. This causes problems because the chip is not expecting multiple blocks. At the moment this is not a problem, because we use chunks of 512 bytes for firmware upload and the data is always sent in byte mode. In the next patch, we will change the chunk size to a bigger value, so this patch is a preparation for that. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index b9a3fe497274..aa1c0f3ebeeb 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1313,7 +1313,16 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
1313 /* 0. read chip id from CHIP_ID */ 1313 /* 0. read chip id from CHIP_ID */
1314 wl->chip.id = wl1271_read32(wl, CHIP_ID_B); 1314 wl->chip.id = wl1271_read32(wl, CHIP_ID_B);
1315 1315
1316 /* 1. check if chip id is valid */ 1316 /*
1317 * For wl127x based devices we could use the default block
1318 * size (512 bytes), but due to a bug in the sdio driver, we
1319 * need to set it explicitly after the chip is powered on. To
1320 * simplify the code and since the performance impact is
1321 * negligible, we use the same block size for all different
1322 * chip types.
1323 */
1324 if (!wl1271_set_block_size(wl))
1325 wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT;
1317 1326
1318 switch (wl->chip.id) { 1327 switch (wl->chip.id) {
1319 case CHIP_ID_1271_PG10: 1328 case CHIP_ID_1271_PG10:
@@ -1343,9 +1352,6 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
1343 ret = wl1271_setup(wl); 1352 ret = wl1271_setup(wl);
1344 if (ret < 0) 1353 if (ret < 0)
1345 goto out; 1354 goto out;
1346
1347 if (!wl1271_set_block_size(wl))
1348 wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT;
1349 break; 1355 break;
1350 case CHIP_ID_1283_PG10: 1356 case CHIP_ID_1283_PG10:
1351 default: 1357 default: