diff options
| author | Keith Busch <kbusch@kernel.org> | 2024-11-13 13:57:04 -0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2024-11-18 09:17:26 -0800 |
| commit | 6399a0db8cd61eedbfb4b7809a4f4699157a9bf8 (patch) | |
| tree | bbeca3d9cc06ae9b971de233be59adea19f2d2f0 /drivers/nvme/target/admin-cmd.c | |
| parent | 979c6342f9c0a48696a6420f14f9dd409591657f (diff) | |
| download | linux-next-6399a0db8cd61eedbfb4b7809a4f4699157a9bf8.tar.gz linux-next-6399a0db8cd61eedbfb4b7809a4f4699157a9bf8.zip | |
nvme: define the remaining used sgls constants
This provides a little more context when reading the code than hardcoded
magic numbers.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/target/admin-cmd.c')
| -rw-r--r-- | drivers/nvme/target/admin-cmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 934b401fbc2f..4fa8496a4d96 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -601,11 +601,12 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req) id->awun = 0; id->awupf = 0; - id->sgls = cpu_to_le32(1 << 0); /* we always support SGLs */ + /* we always support SGLs */ + id->sgls = cpu_to_le32(NVME_CTRL_SGLS_BYTE_ALIGNED); if (ctrl->ops->flags & NVMF_KEYED_SGLS) - id->sgls |= cpu_to_le32(1 << 2); + id->sgls |= cpu_to_le32(NVME_CTRL_SGLS_KSDBDS); if (req->port->inline_data_size) - id->sgls |= cpu_to_le32(1 << 20); + id->sgls |= cpu_to_le32(NVME_CTRL_SGLS_SAOS); strscpy(id->subnqn, ctrl->subsys->subsysnqn, sizeof(id->subnqn)); |
