diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2014-05-08 19:26:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-20 10:03:25 +0900 |
commit | c9aa1a2de4cbf7d0db6012fbf86b6ee0c3719470 (patch) | |
tree | 418f09500cbbe216460c77689ea6ac7b18e37714 /drivers/usb/host/xhci.c | |
parent | ddba5cd0aeff5bbed92ebdf4b1223300b0541e78 (diff) | |
download | op-kernel-dev-c9aa1a2de4cbf7d0db6012fbf86b6ee0c3719470.zip op-kernel-dev-c9aa1a2de4cbf7d0db6012fbf86b6ee0c3719470.tar.gz |
xhci: Add a global command queue
Create a list to store command structures, add a structure to it every time
a command is submitted, and remove it from the list once we get a
command completion event matching the command.
Callers that wait for completion will free their command structures themselves.
The other command structures are freed in the command completion event handler.
Also add a check that prevents queuing commands if host is dying
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 9a4c6df..8dbc410 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3732,7 +3732,6 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) timeleft == 0 ? "Timeout" : "Signal"); /* cancel the enable slot request */ ret = xhci_cancel_cmd(xhci, NULL, command->command_trb); - kfree(command); return ret; } @@ -3891,7 +3890,6 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev, timeleft == 0 ? "Timeout" : "Signal", act); /* cancel the address device command */ ret = xhci_cancel_cmd(xhci, NULL, command->command_trb); - kfree(command); if (ret < 0) return ret; return -ETIME; |