提交 1d732e8c 编写于 作者: A Arik Nemtsov 提交者: Luciano Coelho

wl12xx: Clamp byte mode transfers for 128x chips

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: NArik Nemtsov <arik@wizery.com>
Signed-off-by: NIdo Yariv <ido@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 958b20e0
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册