On Fri, Jun 28, 2024 at 11:06:54AM +0300, Adrian Hunter wrote: > On 27/06/24 17:47, Christoph Hellwig wrote: > > On Thu, Jun 27, 2024 at 04:44:30PM +0300, Adrian Hunter wrote: > >> Probably just do what the block layer was doing e.g. > > > > That was really just a hack due to the lack of error handling in > > the old blk_queue_* interfaces. If ADMA really doesn't actually have > > a limitation, please just don't set any max_segment_size at all. > > > > There is a limitation of 64KiB max. (or less with > SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC) per descriptor. Hmm, I thought the conflusion was that it can be more, which is why you proposed to increase it if the PAGE_SIZE is >= 64k. And based on Jon's report at least for his tegra setups it works with 64k.