Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v6.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC host fixes from Ulf Hansson:

- davinci_mmc: Prevent transmitted data size from exceeding sgm's
length

- sdhci: Fix max_seg_size for 64KiB PAGE_SIZE

* tag 'mmc-v6.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: davinci_mmc: Prevent transmitted data size from exceeding sgm's length
mmc: sdhci: Fix max_seg_size for 64KiB PAGE_SIZE

+18
+3
drivers/mmc/host/davinci_mmc.c
··· 224 224 } 225 225 p = sgm->addr; 226 226 227 + if (n > sgm->length) 228 + n = sgm->length; 229 + 227 230 /* NOTE: we never transfer more than rw_threshold bytes 228 231 * to/from the fifo here; there's no I/O overlap. 229 232 * This also assumes that access width( i.e. ACCWD) is 4 bytes
+15
drivers/mmc/host/sdhci.c
··· 4727 4727 if (host->quirks & SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC) { 4728 4728 host->max_adma = 65532; /* 32-bit alignment */ 4729 4729 mmc->max_seg_size = 65535; 4730 + /* 4731 + * sdhci_adma_table_pre() expects to define 1 DMA 4732 + * descriptor per segment, so the maximum segment size 4733 + * is set accordingly. SDHCI allows up to 64KiB per DMA 4734 + * descriptor (16-bit field), but some controllers do 4735 + * not support "zero means 65536" reducing the maximum 4736 + * for them to 65535. That is a problem if PAGE_SIZE is 4737 + * 64KiB because the block layer does not support 4738 + * max_seg_size < PAGE_SIZE, however 4739 + * sdhci_adma_table_pre() has a workaround to handle 4740 + * that case, and split the descriptor. Refer also 4741 + * comment in sdhci_adma_table_pre(). 4742 + */ 4743 + if (mmc->max_seg_size < PAGE_SIZE) 4744 + mmc->max_seg_size = PAGE_SIZE; 4730 4745 } else { 4731 4746 mmc->max_seg_size = 65536; 4732 4747 }