diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-26 08:58:44 +0000 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-01-03 08:09:40 -0800 |
commit | 3b946fe1cc149b23dad3a233c77b1475834f4d6f (patch) | |
tree | bfa16afc1b9a30aaae21caeb68d44311733cfd48 /drivers/nvme/host/nvme.h | |
parent | f29886c249ec2ed566e423fd02f6071b8f0a3346 (diff) | |
download | linux-3b946fe1cc149b23dad3a233c77b1475834f4d6f.tar.gz linux-3b946fe1cc149b23dad3a233c77b1475834f4d6f.tar.bz2 linux-3b946fe1cc149b23dad3a233c77b1475834f4d6f.zip |
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>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 9a698c49ea03..297b80430f1b 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -297,13 +297,13 @@ struct nvme_ctrl { u32 max_hw_sectors; u32 max_segments; u32 max_integrity_segments; - u32 max_discard_segments; u32 max_zeroes_sectors; #ifdef CONFIG_BLK_DEV_ZONED u32 max_zone_append; #endif u16 crdt[3]; u16 oncs; + u8 dmrl; u32 dmrsl; u16 oacs; u16 sqsize; |