Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>
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 13:48:38 -0600	[thread overview]
Message-ID: <87oaepepnt.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <8737w1942u.fsf@belgarion.home>

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]


Hi,

Robert Jarzmik <robert.jarzmik@free.fr> writes:
> 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 ?

good catch. v2 coming shortly.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2015-11-19 19:48 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
2015-11-19 19:48   ` Felipe Balbi [this message]
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=87oaepepnt.fsf@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=r.baldyga@samsung.com \
    --cc=robert.jarzmik@free.fr \
    --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