Commit f8359dae authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'fixes-for-v3.19-rc6' of...

Merge tag 'fixes-for-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.19-rc6

The final set of fixes for v3.19. Two of the fixes are
related to dwc3 scatter/gather implementation when we have
more requests queued than available TRBs, while the other
is a build fix for mv-usb PHY.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parents 919ba4ee 39e60635
...@@ -882,8 +882,7 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) ...@@ -882,8 +882,7 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
if (i == (request->num_mapped_sgs - 1) || if (i == (request->num_mapped_sgs - 1) ||
sg_is_last(s)) { sg_is_last(s)) {
if (list_is_last(&req->list, if (list_empty(&dep->request_list))
&dep->request_list))
last_one = true; last_one = true;
chain = false; chain = false;
} }
...@@ -901,6 +900,9 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) ...@@ -901,6 +900,9 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
if (last_one) if (last_one)
break; break;
} }
if (last_one)
break;
} else { } else {
dma = req->request.dma; dma = req->request.dma;
length = req->request.length; length = req->request.length;
......
...@@ -338,7 +338,6 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg) ...@@ -338,7 +338,6 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg)
static void mv_otg_update_state(struct mv_otg *mvotg) static void mv_otg_update_state(struct mv_otg *mvotg)
{ {
struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl;
struct usb_phy *phy = &mvotg->phy;
int old_state = mvotg->phy.otg->state; int old_state = mvotg->phy.otg->state;
switch (old_state) { switch (old_state) {
...@@ -858,10 +857,10 @@ static int mv_otg_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -858,10 +857,10 @@ static int mv_otg_suspend(struct platform_device *pdev, pm_message_t state)
{ {
struct mv_otg *mvotg = platform_get_drvdata(pdev); struct mv_otg *mvotg = platform_get_drvdata(pdev);
if (mvotg->phy.state != OTG_STATE_B_IDLE) { if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) {
dev_info(&pdev->dev, dev_info(&pdev->dev,
"OTG state is not B_IDLE, it is %d!\n", "OTG state is not B_IDLE, it is %d!\n",
mvotg->phy.state); mvotg->phy.otg->state);
return -EAGAIN; return -EAGAIN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment