mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
sdio: add quirk to clamp byte mode transfer
Some SDIO cards expect byte transfers not to exceed the configured block transfer size. Add a quirk to that effect. Patches to make use of this quirk will be sent separately. Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
729adf1b5f
commit
3fb7fb4a01
2 changed files with 13 additions and 1 deletions
|
|
@ -189,7 +189,12 @@ static inline unsigned int sdio_max_byte_size(struct sdio_func *func)
|
|||
{
|
||||
unsigned mval = min(func->card->host->max_seg_size,
|
||||
func->card->host->max_blk_size);
|
||||
mval = min(mval, func->max_blksize);
|
||||
|
||||
if (mmc_blksz_for_byte_mode(func->card))
|
||||
mval = min(mval, func->cur_blksize);
|
||||
else
|
||||
mval = min(mval, func->max_blksize);
|
||||
|
||||
return min(mval, 512u); /* maximum size for byte mode */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue