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

Commit 493600dc authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Properly handle delayed status in ep_halt context"

parents 40cba27f 972f8a7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1319,6 +1319,7 @@ struct dwc3 {
	u8			rx_max_burst_prd;
	u8			tx_thr_num_pkt_prd;
	u8			tx_max_burst_prd;
	u8			clear_stall_protocol;

	const char		*hsphy_interface;

+1 −0
Original line number Diff line number Diff line
@@ -1149,6 +1149,7 @@ void dwc3_ep0_send_delayed_status(struct dwc3 *dwc)
	unsigned int direction = !dwc->ep0_expect_in;

	dwc->delayed_status = false;
	dwc->clear_stall_protocol = 0;

	if (dwc->ep0state != EP0_STATUS_PHASE)
		return;
+4 −1
Original line number Diff line number Diff line
@@ -1942,6 +1942,9 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)

			if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) {
				dep->flags |= DWC3_EP_PENDING_CLEAR_STALL;
				if (protocol)
					dwc->clear_stall_protocol = dep->number;

				return 0;
			}
		}
@@ -3464,7 +3467,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
				}

				dep->flags &= ~(DWC3_EP_STALL | DWC3_EP_WEDGE);
				if (dwc->delayed_status)
				if (dwc->clear_stall_protocol == dep->number)
					dwc3_ep0_send_delayed_status(dwc);
			}