Unverified Commit ec076798 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1639 nvme-pci: set min_align_mask before calculating max_hw_sectors

parents a384d9a1 7cd0ff82
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2624,6 +2624,8 @@ static void nvme_reset_work(struct work_struct *work)
	if (result)
		goto out_unlock;

	dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1);

	/*
	 * Limit the max command size to prevent iod->sg allocations going
	 * over a single page.
@@ -2636,7 +2638,6 @@ static void nvme_reset_work(struct work_struct *work)
	 * Don't limit the IOMMU merged segment size.
	 */
	dma_set_max_seg_size(dev->dev, 0xffffffff);
	dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1);

	mutex_unlock(&dev->shutdown_lock);