nvme: change the segment size of io request queue for nvme on k1

Because the swiotlb buffer size is 512k, for nvme ssd devices,
  the maximum length of a single dma sg in the io request queue can only be 512k.

Change-Id: I7b02572742dd5b9ff26de6e469dce71c20741aae
This commit is contained in:
huzhen 2024-04-28 21:36:30 +08:00 committed by zhangmeng
parent f53cb9c8ba
commit 659ee35a43

View file

@ -1912,6 +1912,9 @@ static void nvme_update_disk_info(struct gendisk *disk,
* value of the Atomic Write Unit Power Fail parameter.
*/
blk_queue_physical_block_size(disk->queue, min(phys_bs, atomic_bs));
#if defined(CONFIG_SOC_SPACEMIT_K1X)
blk_queue_max_segment_size(disk->queue, 0x80000);
#endif
blk_queue_io_min(disk->queue, phys_bs);
blk_queue_io_opt(disk->queue, io_opt);