Re: [PATCH 3/3 v2] usb/dwc3: return early in dwc3_cleanup_done_reqs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/02/2011 04:33 PM, Felipe Balbi wrote:
you're missing one detail, I guess. That break is actually what break us
out of the loop when req_queued isn't empty. See that we have:

do {
	req = next_request(&dep->req_queued);
	if (!req)
		break;

	...

	dwc3_gadget_giveback(dep, req);

	...

} while (true);

Should we change that to:

while (!list_empty(&dep->req_queued) {
}

to avoid problems ?

If we change it that way, then we don't enter the loop if the list is
empty and trb.ioc remains not-initialized.
In the early version of this code we cleaned up everything what we have
queued. With the additional handling of IOC for ISOC and short-OUT
packets we actually shouldn't get out here anymore. So what about
adding a WARN_ON() if we get out via the first break?

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux