aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorXie Yongji <xieyongji@bytedance.com>2022-03-04 18:00:57 +0800
committerMichael S. Tsirkin <mst@redhat.com>2022-03-06 06:06:50 -0500
commitdacc73ed0b88f1a787ec20385f42ca9dd9eddcd0 (patch)
treeee6fb4913ad18aebc267b078fba42747c181db02 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parente2ae38cf3d91837a493cb2093c87700ff3cbe667 (diff)
virtio-blk: Don't use MAX_DISCARD_SEGMENTS if max_discard_seg is zero
Currently the value of max_discard_segment will be set to MAX_DISCARD_SEGMENTS (256) with no basis in hardware if device set 0 to max_discard_seg in configuration space. It's incorrect since the device might not be able to handle such large descriptors. To fix it, let's follow max_segments restrictions in this case. Fixes: 1f23816b8eb8 ("virtio_blk: add discard and write zeroes support") Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Link: https://lore.kernel.org/r/20220304100058.116-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
0 files changed, 0 insertions, 0 deletions