summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2014-04-02 09:14:32 -0700
committerMarc Jones <marc.jones@se-eng.com>2014-10-22 04:00:47 +0200
commitc666e55b86d353dde42461cbe4d7ae253aa2e825 (patch)
treef2357af9dfa60b25776fa91d6628a4c5d21a4461 /payloads/libpayload/drivers
parent0b4e8df7e8535f30a4fe12c92032f638fc7244ab (diff)
downloadcoreboot-c666e55b86d353dde42461cbe4d7ae253aa2e825.tar.xz
libpayload: usb: xhci: Fix STALL endpoint handling
- Remove the call to clear_stall in xhci_reset_endpoint because we will call clear_stall from the mass-storage driver. - Remove the xhci_reset_endpoint call from xhci_bulk on STALL since we will reset on the next transfer anyway. - Remove the clear_halt parameter from xhci_bulk since it's now unused. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I852b87621861109e596ec24b78a8f036d796ff14 Reviewed-on: https://chromium-review.googlesource.com/192866 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> (cherry picked from commit e67e4f0545cbdc074328c83c7edccf9e712cd7be) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/7011 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 5b30d0cf54..23314855ee 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -461,8 +461,7 @@ xhci_stop (hci_t *controller)
}
static int
-xhci_reset_endpoint(usbdev_t *const dev, endpoint_t *const ep,
- const int clear_halt)
+xhci_reset_endpoint(usbdev_t *const dev, endpoint_t *const ep)
{
xhci_t *const xhci = XHCI_INST(dev->controller);
const int slot_id = dev->address;
@@ -487,10 +486,6 @@ xhci_reset_endpoint(usbdev_t *const dev, endpoint_t *const ep,
dev->controller->devices[hub]->speed == HIGH_SPEED)
/* TODO */;
- /* Try clearing the device' halt condition on non-control endpoints */
- if (clear_halt && ep)
- clear_stall(ep);
-
/* Reset transfer ring if the endpoint is in the right state */
const unsigned ep_state = EC_GET(STATE, epctx);
if (ep_state == 3 || ep_state == 4) {
@@ -602,7 +597,7 @@ xhci_control(usbdev_t *const dev, const direction_t dir,
/* Reset endpoint if it's not running */
const unsigned ep_state = EC_GET(STATE, epctx);
if (ep_state > 1) {
- if (xhci_reset_endpoint(dev, NULL, 0))
+ if (xhci_reset_endpoint(dev, NULL))
return -1;
}
@@ -713,7 +708,7 @@ xhci_bulk(endpoint_t *const ep, const int size, u8 *const src,
/* Reset endpoint if it's not running */
const unsigned ep_state = EC_GET(STATE, epctx);
if (ep_state > 1) {
- if (xhci_reset_endpoint(ep->dev, ep, 0))
+ if (xhci_reset_endpoint(ep->dev, ep))
return -1;
}
@@ -730,8 +725,6 @@ xhci_bulk(endpoint_t *const ep, const int size, u8 *const src,
xhci_debug("Stopping ID %d EP %d\n",
ep->dev->address, ep_id);
xhci_cmd_stop_endpoint(xhci, ep->dev->address, ep_id);
- } else if (ret == -CC_STALL_ERROR) {
- xhci_reset_endpoint(ep->dev, ep, 1);
}
xhci_debug("Bulk transfer failed: %d\n"
" ep state: %d -> %d\n"