Root/
Source at commit fdcac172482f679852551586576a67d374788666 created 13 years 1 month ago. By Lars-Peter Clausen, Restore sdio fix for the spectec wlan card | |
---|---|
1 | --- a/drivers/mmc/core/sdio_cis.c 2010-01-05 03:36:51.000000000 +0100 |
2 | +++ b/drivers/mmc/core/sdio_cis.c 2010-01-05 03:38:44.000000000 +0100 |
3 | @@ -123,14 +123,14 @@ |
4 | vsn = func->card->cccr.sdio_vsn; |
5 | min_size = (vsn == SDIO_SDIO_REV_1_00) ? 28 : 42; |
6 | |
7 | - if (size < min_size || buf[0] != 1) |
8 | + if (buf[0] != 1) |
9 | return -EINVAL; |
10 | |
11 | /* TPLFE_MAX_BLK_SIZE */ |
12 | func->max_blksize = buf[12] | (buf[13] << 8); |
13 | |
14 | /* TPLFE_ENABLE_TIMEOUT_VAL, present in ver 1.1 and above */ |
15 | - if (vsn > SDIO_SDIO_REV_1_00) |
16 | + if (vsn > SDIO_SDIO_REV_1_00 && size >= min_size) |
17 | func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10; |
18 | else |
19 | func->enable_timeout = jiffies_to_msecs(HZ); |
20 |