linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Johannes Stezenbach <js@linuxtv.org>,
	Shuah Khan <shuah.kh@samsung.com>,
	linux-media@vger.kernel.org, Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: em28xx breaks after hibernate
Date: Thu, 25 Sep 2014 09:07:47 -0600	[thread overview]
Message-ID: <54242FC3.7090801@osg.samsung.com> (raw)
In-Reply-To: <20140925111046.1bb1b2d9.m.chehab@samsung.com>

On 09/25/2014 08:10 AM, Mauro Carvalho Chehab wrote:
> Hi Johannes and Shuah,
> 
> Em Thu, 25 Sep 2014 07:45:37 -0600
> Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> 
>> Hi Johannes,
>>
>> On 09/25/2014 06:53 AM, Johannes Stezenbach wrote:
>>> Hi Shuah,
>>>
>>> ever since your patchset which implements suspend/resume
>>> for em28xx, hibernating the system breaks the Hauppauge WinTV HVR 930C driver.
>>> In v3.15.y and v3.16.y it throws a request_firmware warning
>>> during hibernate + resume, and the /dev/dvb/ device nodes disappears after
>>> resume.  In current git v3.17-rc6-247-g005f800, it hangs
>>> after resume.  I bisected the hang in qemu to
>>> b89193e0b06f "media: em28xx - remove reset_resume interface",
>>> the hang is fixed if I revert this commit on top of v3.17-rc6-247-g005f800.
> 
> Yes, that patch is very likely wrong. I talked with some PM
> maintainers with experience at the USB core: basically, some drivers
> call reset_resume, while others call resume. So, drivers need to
> implement both callbacks in order to be properly resumed.
> 
>>>
>>> Regarding the request_firmware issue. I think a possible
>>> fix would be:
>>
>> The request_firmware has been fixed. I ran into this on
>> Hauppauge WinTV HVR 950Q device. The fix is in xc5000
>> driver to not release firmware as soon as it loads.
>> With this fix firmware is cached and available in
>> resume path.
>>
>> These patches are pulled into linux-media git couple
>> of days ago.
>>
>> http://patchwork.linuxtv.org/patch/26073/
>> http://patchwork.linuxtv.org/patch/25345/
>>
>> The reset_resume and this request firmware problem
>> might be related. Could you please try with the
>> above two patches and see if the problems goes away.
>> i.e without reverting
>>
>> b89193e0b06f "media: em28xx - remove reset_resume interface"
> 
> This patch should be reverted anyway, as it is breaking resume
> for some USB ehci/xhci drivers.
> 

Simply reverting this patch probably won't fix the problems.
You are right, we need resume() and reset_resume() interfaces.
After revert, reset_resume() will be resume() and this will
work on systems that maintain current to usb bus during suspend.
However, I think having the same code handling both cases will
fail on systems that don't maintain power to usb bus. i.e
when the bus goes through reset, driver has to do more than a
simple resume.

Coupled with that there are drivers like xc5000 that release
firmware right after load which are a problem for resume
because they wait for firmware to be available. So these drivers
need to be fixed to cache firmware.

So the right fix would be to reset_resume() handle the reset
case. This is one of the reasons why I am interested finding
if these two patches help fix the entire problem.

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

  reply	other threads:[~2014-09-25 15:07 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 12:53 em28xx breaks after hibernate Johannes Stezenbach
2014-09-25 13:45 ` Shuah Khan
2014-09-25 14:10   ` Mauro Carvalho Chehab
2014-09-25 15:07     ` Shuah Khan [this message]
2014-09-25 16:01   ` Johannes Stezenbach
2014-09-25 17:36     ` Johannes Stezenbach
2014-09-25 18:01       ` Shuah Khan
2014-09-25 17:40     ` Shuah Khan
2014-09-25 18:17       ` Johannes Stezenbach
2014-09-25 18:45         ` Shuah Khan
2014-09-25 19:03           ` Shuah Khan
2014-09-26  7:41             ` Johannes Stezenbach
2014-09-26  8:00           ` Johannes Stezenbach
2014-09-26  8:08             ` Johannes Stezenbach
2014-09-26 10:14               ` Mauro Carvalho Chehab
2014-09-26 11:07                 ` Johannes Stezenbach
2014-09-26 11:42                   ` Mauro Carvalho Chehab
2014-09-26 12:02                     ` Johannes Stezenbach
2014-09-26 12:11                       ` Mauro Carvalho Chehab
2014-09-26 12:03                     ` Mauro Carvalho Chehab
2014-09-26 12:27                       ` Johannes Stezenbach
2014-09-26 13:12                         ` Mauro Carvalho Chehab
2014-09-26 13:25                           ` Johannes Stezenbach
2014-09-26 14:25                             ` Shuah Khan
2014-09-26 14:25                             ` Johannes Stezenbach
2014-09-26 14:30                               ` Shuah Khan
2014-09-26 15:06                                 ` Johannes Stezenbach
2014-09-26 15:22                                   ` Johannes Stezenbach
2014-09-26 15:43                                     ` Mauro Carvalho Chehab
2014-09-28 10:55                                       ` Johannes Stezenbach
2014-09-28 11:12                                         ` Mauro Carvalho Chehab
2014-09-28 11:54                                           ` Johannes Stezenbach
2014-09-28 12:35                                             ` Mauro Carvalho Chehab
2014-09-28 12:57                                             ` Mauro Carvalho Chehab
2014-09-29  2:38                                             ` Mauro Carvalho Chehab
2014-09-26 15:22                                   ` Shuah Khan
2014-09-26 15:35                                     ` Mauro Carvalho Chehab
2014-09-26 15:40                                     ` Mauro Carvalho Chehab
2014-09-26 15:42                                     ` Johannes Stezenbach
2014-09-26 15:48                                       ` Mauro Carvalho Chehab

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=54242FC3.7090801@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=js@linuxtv.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=shuah.kh@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).