]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
wl12xx: Clamp byte mode transfers for 128x chips
authorArik Nemtsov <arik@wizery.com>
Fri, 18 Mar 2011 12:49:57 +0000 (14:49 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 19 Apr 2011 13:49:07 +0000 (16:49 +0300)
On wl128x based devices, when TX packets are aggregated, each packet
size must be aligned to the SDIO block size, and sent using block mode
transfers.

The block size is set to 256 bytes, which is less than the maximum
possible byte transfer. Thus, if two small packets (< 256 bytes) are
aggregated, the aggregation buffer size would be 512, and will be sent
using byte mode transfers. This can have undesired side effects.

Fix this by setting the MMC_QUIRK_BLKSZ_FOR_BYTE_MODE mmc card quirk.
For 127x chips this has no effect, as the block size is set to 512
bytes.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/sdio.c
drivers/net/wireless/wl12xx/sdio_test.c

index 5a2951ed6eda8ba42394ef7e4f4ce57caea42dec..2ade222f7cbb7b2aa6d22da78db33d09eb0e88e7 100644 (file)
@@ -246,6 +246,9 @@ static int __devinit wl1271_probe(struct sdio_func *func,
        /* Grab access to FN0 for ELP reg. */
        func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
 
+       /* Use block mode for transferring over one block size of data */
+       func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
+
        wlan_data = wl12xx_get_platform_data();
        if (IS_ERR(wlan_data)) {
                ret = PTR_ERR(wlan_data);
index 968249a4da3941f7b1b2a5ccc157ac2f94d94169..f2891539287733c6354a5322460c4e4e159b8765 100644 (file)
@@ -417,6 +417,9 @@ static int __devinit wl1271_probe(struct sdio_func *func,
        /* Grab access to FN0 for ELP reg. */
        func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
 
+       /* Use block mode for transferring over one block size of data */
+       func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
+
        wlan_data = wl12xx_get_platform_data();
        if (IS_ERR(wlan_data)) {
                ret = PTR_ERR(wlan_data);