Skip to content

Commit c35b8d7

Browse files
mgurtovoykawasaki
authored andcommitted
nvme-pci: set virt boundary according to capability
Some controllers advertise DWORD alignment for SGLs, so configure the virtual boundary correctly for those devices. Signed-off-by: Max Gurtovoy <[email protected]>
1 parent ec9caac commit c35b8d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3326,7 +3326,9 @@ static unsigned long nvme_pci_get_virt_boundary(struct nvme_ctrl *ctrl,
33263326
{
33273327
if (!nvme_ctrl_sgl_supported(ctrl) || is_admin)
33283328
return NVME_CTRL_PAGE_SIZE - 1;
3329-
return 0;
3329+
else if (ctrl->sgls & NVME_CTRL_SGLS_BYTE_ALIGNED)
3330+
return 0;
3331+
return 3;
33303332
}
33313333

33323334
static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {

0 commit comments

Comments
 (0)