diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-16 23:42:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-16 23:42:46 -0400 |
commit | 2bcb132c693566bcb8208cc7ce66b72a4f852ecf (patch) | |
tree | 6fc4f05ce18140d86aa78a10380a610734aeaef9 /drivers/usb/dwc3 | |
parent | 67e6da702753dac8f0540209dded80a0c4e60d81 (diff) | |
parent | 5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff) |
Merge 3.6-rc6 into usb-next
This resolves the merge problems with:
drivers/usb/dwc3/gadget.c
drivers/usb/musb/tusb6010.c
that had been seen in linux-next.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 9 | ||||
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 1 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 21 |
3 files changed, 26 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index bed2c1615463..b415c0c859d3 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -440,16 +440,21 @@ static int __devinit dwc3_probe(struct platform_device *pdev) | |||
440 | dev_err(dev, "missing IRQ\n"); | 440 | dev_err(dev, "missing IRQ\n"); |
441 | return -ENODEV; | 441 | return -ENODEV; |
442 | } | 442 | } |
443 | dwc->xhci_resources[1] = *res; | 443 | dwc->xhci_resources[1].start = res->start; |
444 | dwc->xhci_resources[1].end = res->end; | ||
445 | dwc->xhci_resources[1].flags = res->flags; | ||
446 | dwc->xhci_resources[1].name = res->name; | ||
444 | 447 | ||
445 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 448 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
446 | if (!res) { | 449 | if (!res) { |
447 | dev_err(dev, "missing memory resource\n"); | 450 | dev_err(dev, "missing memory resource\n"); |
448 | return -ENODEV; | 451 | return -ENODEV; |
449 | } | 452 | } |
450 | dwc->xhci_resources[0] = *res; | 453 | dwc->xhci_resources[0].start = res->start; |
451 | dwc->xhci_resources[0].end = dwc->xhci_resources[0].start + | 454 | dwc->xhci_resources[0].end = dwc->xhci_resources[0].start + |
452 | DWC3_XHCI_REGS_END; | 455 | DWC3_XHCI_REGS_END; |
456 | dwc->xhci_resources[0].flags = res->flags; | ||
457 | dwc->xhci_resources[0].name = res->name; | ||
453 | 458 | ||
454 | /* | 459 | /* |
455 | * Request memory region but exclude xHCI regs, | 460 | * Request memory region but exclude xHCI regs, |
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 1bba97ba218d..d7da073a23fe 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -792,7 +792,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, | |||
792 | transferred = min_t(u32, ur->length, | 792 | transferred = min_t(u32, ur->length, |
793 | transfer_size - length); | 793 | transfer_size - length); |
794 | memcpy(ur->buf, dwc->ep0_bounce, transferred); | 794 | memcpy(ur->buf, dwc->ep0_bounce, transferred); |
795 | dwc->ep0_bounced = false; | ||
796 | } else { | 795 | } else { |
797 | transferred = ur->length - length; | 796 | transferred = ur->length - length; |
798 | } | 797 | } |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index ba444e7f9c44..c9e729a4bf65 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -263,8 +263,11 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, | |||
263 | if (req->request.status == -EINPROGRESS) | 263 | if (req->request.status == -EINPROGRESS) |
264 | req->request.status = status; | 264 | req->request.status = status; |
265 | 265 | ||
266 | usb_gadget_unmap_request(&dwc->gadget, &req->request, | 266 | if (dwc->ep0_bounced && dep->number == 0) |
267 | req->direction); | 267 | dwc->ep0_bounced = false; |
268 | else | ||
269 | usb_gadget_unmap_request(&dwc->gadget, &req->request, | ||
270 | req->direction); | ||
268 | 271 | ||
269 | dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", | 272 | dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", |
270 | req, dep->name, req->request.actual, | 273 | req, dep->name, req->request.actual, |
@@ -1017,6 +1020,7 @@ static void __dwc3_gadget_start_isoc(struct dwc3 *dwc, | |||
1017 | if (list_empty(&dep->request_list)) { | 1020 | if (list_empty(&dep->request_list)) { |
1018 | dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n", | 1021 | dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n", |
1019 | dep->name); | 1022 | dep->name); |
1023 | dep->flags |= DWC3_EP_PENDING_REQUEST; | ||
1020 | return; | 1024 | return; |
1021 | } | 1025 | } |
1022 | 1026 | ||
@@ -1078,6 +1082,19 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) | |||
1078 | * | 1082 | * |
1079 | */ | 1083 | */ |
1080 | if (dep->flags & DWC3_EP_PENDING_REQUEST) { | 1084 | if (dep->flags & DWC3_EP_PENDING_REQUEST) { |
1085 | int ret; | ||
1086 | |||
1087 | /* | ||
1088 | * If xfernotready is already elapsed and it is a case | ||
1089 | * of isoc transfer, then issue END TRANSFER, so that | ||
1090 | * you can receive xfernotready again and can have | ||
1091 | * notion of current microframe. | ||
1092 | */ | ||
1093 | if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { | ||
1094 | dwc3_stop_active_transfer(dwc, dep->number); | ||
1095 | return 0; | ||
1096 | } | ||
1097 | |||
1081 | ret = __dwc3_gadget_kick_transfer(dep, 0, true); | 1098 | ret = __dwc3_gadget_kick_transfer(dep, 0, true); |
1082 | if (ret && ret != -EBUSY) | 1099 | if (ret && ret != -EBUSY) |
1083 | dev_dbg(dwc->dev, "%s: failed to kick transfers\n", | 1100 | dev_dbg(dwc->dev, "%s: failed to kick transfers\n", |