Re: [RFCv2 08/10] xhci: Add a global command queue

From: Sarah Sharp
Date: Wed Feb 05 2014 - 17:26:28 EST


On Tue, Feb 04, 2014 at 10:57:09PM -0800, Dan Williams wrote:
> On Thu, Jan 30, 2014 at 6:10 AM, Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> wrote:
> > @@ -1722,6 +1723,12 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
> > kfree(cur_cd);
> > }
> >
> > + list_for_each_entry_safe(cur_cmd, next_cmd,
> > + &xhci->cmd_list, cmd_list) {
> > + list_del(&cur_cmd->cmd_list);
> > + kfree(cur_cmd);
> > + }
> > +
>
> Aren't commands on the cmd_list currently being executed, or are there
> other guarantees that make sure all commands have terminated?

By the time we get to xhci_mem_cleanup, we've done our best effort to
halt the xHCI host controller. That could timeout, I suppose, but I'm
not sure what we're expected to do in that case. If the host won't
halt, I'm not sure it will be able to, say, respond to the request to
cancel the current command.

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/