aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.h
diff options
context:
space:
mode:
authorYanming Liu <[email protected]>2022-01-20 04:20:52 +0800
committerWei Liu <[email protected]>2022-01-23 22:31:23 +0000
commit96d9d1fa5cd505078534113308ced0aa56d8da58 (patch)
tree748c037da2bc41d3c5b8b555297c950f2f12b472 /drivers/usb/cdns3/cdns3-trace.h
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff)
Drivers: hv: balloon: account for vmbus packet header in max_pkt_size
Commit adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer") introduced a notion of maximum packet size in vmbus channel and used that size to initialize a buffer holding all incoming packet along with their vmbus packet header. hv_balloon uses the default maximum packet size VMBUS_DEFAULT_MAX_PKT_SIZE which matches its maximum message size, however vmbus_open expects this size to also include vmbus packet header. This leads to 4096 bytes dm_unballoon_request messages being truncated to 4080 bytes. When the driver tries to read next packet it starts from a wrong read_index, receives garbage and prints a lot of "Unhandled message: type: <garbage>" in dmesg. Allocate the buffer with HV_HYP_PAGE_SIZE more bytes to make room for the header. Fixes: adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer") Suggested-by: Michael Kelley (LINUX) <[email protected]> Suggested-by: Andrea Parri (Microsoft) <[email protected]> Signed-off-by: Yanming Liu <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Reviewed-by: Andrea Parri (Microsoft) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions