Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Felipe Balbi <balbi@ti.com>
Cc: Linux USB Mailing List <linux-usb@vger.kernel.org>,
	Robert Baldyga <r.baldyga@samsung.com>,
	"# v3 . 10+" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: gadget: pxa27x: fix suspend callback
Date: Thu, 19 Nov 2015 20:33:45 +0100	[thread overview]
Message-ID: <8737w1942u.fsf@belgarion.home> (raw)
In-Reply-To: <1447945287-12698-1-git-send-email-balbi@ti.com> (Felipe Balbi's message of "Thu, 19 Nov 2015 09:01:27 -0600")

Felipe Balbi <balbi@ti.com> writes:

> pxa27x disconnects pullups on suspend but doesn't
> notify the gadget driver about it, so gadget driver
> can't disable the endpoints it was using.
>
> This causes problems on resume because gadget core
> will think endpoints are still enabled and just
> ignore the following usb_ep_enable().
>
> Fix this problem by calling
> gadget_driver->disconnect().
Thanks for doing this for me.
> @@ -2535,6 +2535,7 @@ static int pxa_udc_suspend(struct platform_device *_dev, pm_message_t state)
>  	udc_disable(udc);
>  	udc->pullup_resume = udc->pullup_on;
>  	dplus_pullup(udc, 0);
> +	udc->driver->disconnect(&udc->gadget);
If no driver is bound, this will segfault, right ?
Shouldn't an "if (udc->driver)" protect this line ?

Cheers.

-- 
Robert

  reply	other threads:[~2015-11-19 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 15:01 [PATCH] usb: gadget: pxa27x: fix suspend callback Felipe Balbi
2015-11-19 19:33 ` Robert Jarzmik [this message]
2015-11-19 19:48   ` Felipe Balbi
2015-11-19 19:51   ` Felipe Balbi
2015-11-19 20:44     ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737w1942u.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=balbi@ti.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=r.baldyga@samsung.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox