-
David Brownell authored
Attached is a patch that cleans up a few more issues in the OHCI unlink code. There may still be an ISO-IN data problem, I'll look at that separately since it seems unrelated to unlink issues. - Simplify/correct ED lifecycle * UNLINK is now for real: descheduled and waiting for SOF * finish_unlinks() expects descheduled EDs (may reschedule) * only ed_deschedule() turns off hardware schedule processing * no more NEW state * no more ED_URB_DEL flag (it added extra states) * new IDLE state, "not scheduled" (replaces previous UNLINKing) - Bugfixes * ed_get(), potential memleak is now gone * urb_enqueue(), won't submit to dead/sleeping hc * free_config(), rescans after SOF when needed * ed_schedule(), use wmb() * ed_schedule() and finish_unlinks(), more thorough about restarting control or bulk processing * finish_unlinks(), more cautious about reentering - General: * ed->ed_rm_list renamed ed_next; to be used more later * slightly shrink object code * rename some functions This leaves one notable issue in the unlink paths: the driver never waits for SOF after descheduling (empty) EDs. That's racey in most cases, though there are a few light-traffic cases where that's correct (in part because the ED is empty). Easy to fix once the rest of this is known to behave.
4ff8e934