public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>
Cc: m.szyprowski@samsung.com, kbusch@kernel.org, axboe@kernel.dk,
	hch@lst.de, sagi@grimberg.me, robin.murphy@arm.com,
	martin.petersen@oracle.com, damien.lemoal@opensource.wdc.com,
	john.g.garry@oracle.com, ahuang12@lenovo.com,
	iommu@lists.linux.dev, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	ionut_n2001@yahoo.com, sunlightlinux@gmail.com
Subject: Re: [PATCH v1 2/2] nvme-pci: handle dma_opt_mapping_size() returning 0
Date: Tue, 17 Mar 2026 15:14:42 +0100	[thread overview]
Message-ID: <20260317141442.GA3539@lst.de> (raw)
In-Reply-To: <20260316203956.64515-3-ionut.nechita@windriver.com>

On Mon, Mar 16, 2026 at 10:39:56PM +0200, Ionut Nechita (Wind River) wrote:
> From: Ionut Nechita <ionut.nechita@windriver.com>
> 
> After the previous commit, dma_opt_mapping_size() returns 0 when no DMA
> backend provides an optimal mapping size hint (e.g. IOMMU in passthrough
> mode with no ops->opt_mapping_size callback).
> 
> The NVMe PCI driver used min_t(u32, NVME_MAX_BYTES >> SECTOR_SHIFT,
> dma_opt_mapping_size() >> 9) to cap max_hw_sectors.  With a 0 return
> value this would set max_hw_sectors to 0, which is invalid.

... which means that if you want to change it, you need to combine
both patches into one to not create a regression.


  parent reply	other threads:[~2026-03-17 14:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 20:39 [PATCH v1 0/2] dma: fix dma_opt_mapping_size() returning bogus value when no backend hint exists Ionut Nechita (Wind River)
2026-03-16 20:39 ` [PATCH v1 1/2] dma: return 0 from dma_opt_mapping_size() when no real " Ionut Nechita (Wind River)
2026-03-17  9:43   ` Robin Murphy
2026-03-17 14:19     ` Christoph Hellwig
2026-03-16 20:39 ` [PATCH v1 2/2] nvme-pci: handle dma_opt_mapping_size() returning 0 Ionut Nechita (Wind River)
2026-03-16 21:21   ` Damien Le Moal
2026-03-17  8:55   ` John Garry
2026-03-17 14:14   ` Christoph Hellwig [this message]
2026-03-17  9:11 ` [PATCH v1 0/2] dma: fix dma_opt_mapping_size() returning bogus value when no backend hint exists John Garry
2026-03-17  9:18   ` Damien Le Moal
2026-03-17 14:36   ` Christoph Hellwig
2026-03-17 15:18     ` John Garry

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=20260317141442.GA3539@lst.de \
    --to=hch@lst.de \
    --cc=ahuang12@lenovo.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=iommu@lists.linux.dev \
    --cc=ionut.nechita@windriver.com \
    --cc=ionut_n2001@yahoo.com \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.petersen@oracle.com \
    --cc=robin.murphy@arm.com \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.org \
    --cc=sunlightlinux@gmail.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