Skip to content

Commit 9d4fe4f

Browse files
Iouri Tarassovtyhicks
authored andcommitted
drivers:hv:dxgkrnl: Handle the new behavior of the VM bus channel where channel->max_pkt_size needs to be initialized.
Signed-off-by: Iouri Tarassov <iourit@linux.microsoft.com>
1 parent bc51d5e commit 9d4fe4f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/hv/dxgkrnl/dxgvmbus.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ int dxgvmbuschannel_init(struct dxgvmbuschannel *ch, struct hv_device *hdev)
206206
goto cleanup;
207207
}
208208

209+
hdev->channel->max_pkt_size = DXG_MAX_VM_BUS_PACKET_SIZE;
209210
ret = vmbus_open(hdev->channel, RING_BUFSIZE, RING_BUFSIZE,
210211
NULL, 0, dxgvmbuschannel_receive, ch);
211212
if (ret) {
@@ -393,9 +394,11 @@ void dxgvmbuschannel_receive(void *ctx)
393394
if (desc->type == VM_PKT_COMP) {
394395
process_completion_packet(channel, desc);
395396
} else {
396-
if (desc->type != VM_PKT_DATA_INBAND)
397+
if (desc->type != VM_PKT_DATA_INBAND) {
397398
pr_err("unexpected packet type");
398-
process_inband_packet(channel, desc);
399+
} else {
400+
process_inband_packet(channel, desc);
401+
}
399402
}
400403
}
401404
}

0 commit comments

Comments
 (0)