|
@@ -1949,10 +1949,14 @@ int sdhci_add_host(struct sdhci_host *host)
|
|
|
* of bytes. When doing hardware scatter/gather, each entry cannot
|
|
|
* be larger than 64 KiB though.
|
|
|
*/
|
|
|
- if (host->flags & SDHCI_USE_ADMA)
|
|
|
- mmc->max_seg_size = 65536;
|
|
|
- else
|
|
|
+ if (host->flags & SDHCI_USE_ADMA) {
|
|
|
+ if (host->quirks & SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC)
|
|
|
+ mmc->max_seg_size = 65535;
|
|
|
+ else
|
|
|
+ mmc->max_seg_size = 65536;
|
|
|
+ } else {
|
|
|
mmc->max_seg_size = mmc->max_req_size;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* Maximum block size. This varies from controller to controller and
|