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>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUtqoQAAoJEIaOsuA1yqRENP4QAJSfu3O8cOepIVnyIAZfnEdT
 BauykTwkZj/LfH2B+6v6cacFVCSr7nuRb7bZ+dTgVykqClzCEIySqahnQEAt65u9
 ergvINYZpi/t7B6DsNK7OHYyIyXKnFGmBr3R8jiHBRbJ832e/3bIZ/0pdFAmwpah
 qhoGtjg0wNolF4ILXAFu3ghB/AkWBulCAwumMpldv+5p6wNzJRV72Vnto0pPpqYo
 C8W6f1aXXx3C8kqv5cU60lmPT85q+CCjtaLPoCneo7KTtSqM4xQgf78M02LUNYFl
 1qymKr3rWxYic6b+VEODA9y/NTBhQz0fy5JhEide6T8+eaQc+QpYSGAO+bxVK1fi
 CHpdF7Yg83TAwT/HCztirqMl1TmkXc2x/NFgzY0di5NMqgDhodC+3vVtnHZPoX5S
 W0g5D4QlGk0mYANx4kvijvLGBbjR/OtAv6OrK96Qvia1Vv9Nb4jrxg4PN/jbwXbR
 nQ8qtU1a1AIqBYE92GIjFIiZIxFPpWzddlnRcbX1wh/1Qr2C8jsFnNQ6QwS2tyw2
 HH0pVRpCLCA0oLgrCE47Y+aSHaJ5t7EsxYmb+fhi/5prOHdsggHTBQSPl526NiK+
 UJ8HWm2h6sel1/JdEITT+plrn62b8UL7Vd5hYQrVewgkyDrXSIpVRYA1V1dBg40U
 kEQDS7JvFdFP46IRh/Cw
 =iLKs
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Greg Kroah-Hartman 2015-01-14 16:27:23 -08:00
commit f8359dae68
2 changed files with 6 additions and 5 deletions

View file

@ -882,8 +882,7 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
if (i == (request->num_mapped_sgs - 1) ||
sg_is_last(s)) {
if (list_is_last(&req->list,
&dep->request_list))
if (list_empty(&dep->request_list))
last_one = true;
chain = false;
}
@ -901,6 +900,9 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
if (last_one)
break;
}
if (last_one)
break;
} else {
dma = req->request.dma;
length = req->request.length;

View file

@ -338,7 +338,6 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg)
static void mv_otg_update_state(struct mv_otg *mvotg)
{
struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl;
struct usb_phy *phy = &mvotg->phy;
int old_state = mvotg->phy.otg->state;
switch (old_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);
if (mvotg->phy.state != OTG_STATE_B_IDLE) {
if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) {
dev_info(&pdev->dev,
"OTG state is not B_IDLE, it is %d!\n",
mvotg->phy.state);
mvotg->phy.otg->state);
return -EAGAIN;
}