Commit f8359dae68bd29ed7b3f91971e361801442c7b9b
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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: Felipe Balbi <balbi@ti.com>
Showing 2 changed files Side-by-side Diff
drivers/usb/dwc3/gadget.c
... | ... | @@ -882,8 +882,7 @@ |
882 | 882 | |
883 | 883 | if (i == (request->num_mapped_sgs - 1) || |
884 | 884 | sg_is_last(s)) { |
885 | - if (list_is_last(&req->list, | |
886 | - &dep->request_list)) | |
885 | + if (list_empty(&dep->request_list)) | |
887 | 886 | last_one = true; |
888 | 887 | chain = false; |
889 | 888 | } |
... | ... | @@ -901,6 +900,9 @@ |
901 | 900 | if (last_one) |
902 | 901 | break; |
903 | 902 | } |
903 | + | |
904 | + if (last_one) | |
905 | + break; | |
904 | 906 | } else { |
905 | 907 | dma = req->request.dma; |
906 | 908 | length = req->request.length; |
drivers/usb/phy/phy-mv-usb.c
... | ... | @@ -338,7 +338,6 @@ |
338 | 338 | static void mv_otg_update_state(struct mv_otg *mvotg) |
339 | 339 | { |
340 | 340 | struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; |
341 | - struct usb_phy *phy = &mvotg->phy; | |
342 | 341 | int old_state = mvotg->phy.otg->state; |
343 | 342 | |
344 | 343 | switch (old_state) { |
345 | 344 | |
... | ... | @@ -858,10 +857,10 @@ |
858 | 857 | { |
859 | 858 | struct mv_otg *mvotg = platform_get_drvdata(pdev); |
860 | 859 | |
861 | - if (mvotg->phy.state != OTG_STATE_B_IDLE) { | |
860 | + if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) { | |
862 | 861 | dev_info(&pdev->dev, |
863 | 862 | "OTG state is not B_IDLE, it is %d!\n", |
864 | - mvotg->phy.state); | |
863 | + mvotg->phy.otg->state); | |
865 | 864 | return -EAGAIN; |
866 | 865 | } |
867 | 866 |