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>
This commit is contained in:
Keith Busch
2024-11-13 13:57:04 -08:00
parent 979c6342f9
commit 6399a0db8c
4 changed files with 12 additions and 6 deletions

View File

@@ -1123,7 +1123,8 @@ static inline void nvme_start_request(struct request *rq)
static inline bool nvme_ctrl_sgl_supported(struct nvme_ctrl *ctrl)
{
return ctrl->sgls & ((1 << 0) | (1 << 1));
return ctrl->sgls & (NVME_CTRL_SGLS_BYTE_ALIGNED |
NVME_CTRL_SGLS_DWORD_ALIGNED);
}
static inline bool nvme_ctrl_meta_sgl_supported(struct nvme_ctrl *ctrl)