]> git.itanic.dy.fi Git - linux-stable/commit
nvme: simplify the max_discard_segments calculation
authorChristoph Hellwig <hch@lst.de>
Tue, 26 Dec 2023 08:58:44 +0000 (08:58 +0000)
committerKeith Busch <kbusch@kernel.org>
Wed, 3 Jan 2024 16:09:40 +0000 (08:09 -0800)
commit3b946fe1cc149b23dad3a233c77b1475834f4d6f
treebfa16afc1b9a30aaae21caeb68d44311733cfd48
parentf29886c249ec2ed566e423fd02f6071b8f0a3346
nvme: simplify the max_discard_segments calculation

Just stash away the DMRL value in the nvme_ctrl struture, and leave
all interpretation to nvme_config_discard, where we know DSM is
supported by the time we're configuring the number of segments.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h