mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
IB/uverbs: Add device memory capabilities reporting
This change allows vendors to report device memory capability max_dm_size - to user via uverbs command. Signed-off-by: Ariel Levkovich <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
d41c120895
commit
1d8eeb9f6a
2 changed files with 7 additions and 0 deletions
|
|
@ -4006,6 +4006,12 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
|
|||
resp.cq_moderation_caps.max_cq_moderation_period =
|
||||
attr.cq_caps.max_cq_moderation_period;
|
||||
resp.response_length += sizeof(resp.cq_moderation_caps);
|
||||
|
||||
if (ucore->outlen < resp.response_length + sizeof(resp.max_dm_size))
|
||||
goto end;
|
||||
|
||||
resp.max_dm_size = attr.max_dm_size;
|
||||
resp.response_length += sizeof(resp.max_dm_size);
|
||||
end:
|
||||
err = ib_copy_to_udata(ucore, &resp, resp.response_length);
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue