Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: John Garry <john.g.garry@oracle.com>,
	James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, m.szyprowski@samsung.com, hch@lst.de,
	linux-scsi@vger.kernel.org, iommu@lists.linux.dev,
	ionut.nechita@windriver.com
Subject: Re: [PATCH 1/2] dma-mapping: make dma_max_mapping_size() return 0 for no DMA capability
Date: Thu, 2 Jul 2026 16:11:16 +0200	[thread overview]
Message-ID: <20260702141116.GA22720@lst.de> (raw)
In-Reply-To: <7c9720fd-c615-481c-ba4d-f5e0efbdd7f0@arm.com>

On Mon, Jun 29, 2026 at 12:09:42PM +0100, Robin Murphy wrote:
>>  > Additionally, could this cause invalid zero-sized block layer queue 
>> limits
>>  > in MMC drivers? In drivers/mmc/host/bcm2835.c:bcm2835_add_host(), the
>>  > return value clamps max_req_size:
>>  >
>>  >          mmc->max_req_size = min_t(size_t, 524288, 
>> dma_max_mapping_size(dev));
>>
>> bcm2835.c is a platform device driver, and platform devices have their 
>> dev->dma_mask set in setup_pdev_dma_masks()
>>
>> Indeed, that driver does have a non-DMA mode of operation, but that looks 
>> to be selected independent of whether dev->dma_mask is set.
>
> That one seems pretty bogus already, given that DMA mode is apparently 
> dependent on an external DMA channel, so "dev" is the wrong device to check 
> (should be dmaengine_get_dma_device()), while conversely 
> dma_max_mapping_size(anything) is a questionably meaningless number for PIO 
> mode... :/

Yeah.  It would be good to get this fixed before this change hits mainline,
though.


  reply	other threads:[~2026-07-02 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  8:53 [PATCH 0/2] Drop SCSI core dev->dma_mask check John Garry
2026-06-29  8:53 ` [PATCH 1/2] dma-mapping: make dma_max_mapping_size() return 0 for no DMA capability John Garry
2026-06-29  9:10   ` sashiko-bot
2026-06-29 10:11   ` Robin Murphy
2026-06-29 10:46     ` John Garry
2026-06-29 11:09       ` Robin Murphy
2026-07-02 14:11         ` Christoph Hellwig [this message]
2026-07-02 14:32           ` John Garry
2026-07-02 14:11   ` Christoph Hellwig
2026-06-29  8:53 ` [PATCH 2/2] scsi: core: Drop dev->dma_mask check in evaluating max_sectors John Garry
2026-07-02 14:12   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260702141116.GA22720@lst.de \
    --to=hch@lst.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=iommu@lists.linux.dev \
    --cc=ionut.nechita@windriver.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.petersen@oracle.com \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox