Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 225a1dd5 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

usb: gadget: u_ctrl_hsic: Fix hsic control endpoint stall



The USB EHCI and XHCI drivers assume that there will be only IN
status stage for 0 data length control transfers. If the device
connected over HSIC submits data on the control OUT endpoint, the
control transfer will never get finished.

There is no significance to 0 length SEND_ENCAPSULATED command. Fix
the control endpoint stall by dropping such packets.

CRs-Fixed: 563403
Change-Id: Ia9d4d8f6437abde7faffabbe5105cd53b9f2cd4d
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent f34d9bd5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -114,6 +114,11 @@ ghsic_send_cpkt_tomodem(u8 portno, void *buf, size_t len)
		return -ENODEV;
	}

	if (!len) {
		pr_debug("%s: dropping 0 len command\n", __func__);
		return 0;
	}

	cbuf = kmalloc(len, GFP_ATOMIC);
	if (!cbuf)
		return -ENOMEM;