Bug 94861

Summary: After resume from hibernate/sleep USB-DVBT-adapter does not work
Product: Drivers Reporter: Walther Pelser (w.pelser)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.19x and higher Subsystem:
Regression: Yes Bisected commit-id:
Attachments: dmesg after resume from hib.
messages during resume
dvb-adaptercheck

Description Walther Pelser 2015-03-14 18:17:39 UTC
Created attachment 170621 [details]
dmesg after resume from hib.

After a normal booting everything is working fine. But after resume from hibernate or sleep allways: vlc cannot connect to freecom USB-DVBT-adapter.
My board is intel 945GTP, adapter is freecom USB-DVBT-stick.
Comment 1 Walther Pelser 2015-03-14 18:18:28 UTC
Created attachment 170631 [details]
messages during resume
Comment 2 Greg Kroah-Hartman 2015-03-14 19:28:14 UTC
On Sat, Mar 14, 2015 at 06:17:39PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=94861
> 
>             Bug ID: 94861
>            Summary: After resume from hibernate/sleep USB-DVBT-adapter
>                     does not work

Please send to the linux-media@vger.kernel.org mailing list.
Comment 3 Walther Pelser 2015-03-15 06:46:28 UTC
Addition to comment 1:
This is Bug 916577 from Novell's Bugzilla (= N.B.) too.

Takashi Iwai asked me, to try a modified Kernel from http://download.opensuse.org/repositories/home:/tiwai:/bnc916577/standard/ (N.B. comment 20). His conclusion  was 
" It's -ENODEV error, which means that the device file must exist but the kernel returns as if the corresponding device doesn't exist.  So, it must be the issue in the kernel inside." (N.B. comment 18)
So I put the bug on this side too.
Comment 4 Walther Pelser 2015-03-15 07:31:49 UTC
(In reply to Greg Kroah-Hartman from comment #2)
> On Sat, Mar 14, 2015 at 06:17:39PM +0000,
> bugzilla-daemon@bugzilla.kernel.org wrote:
> > https://bugzilla.kernel.org/show_bug.cgi?id=94861
> > 
> >             Bug ID: 94861
> >            Summary: After resume from hibernate/sleep USB-DVBT-adapter
> >                     does not work
> 
> Please send to the linux-media@vger.kernel.org mailing list.

Unable to send to the linux-media@vger.kernel.org mailing list. All mails rejected for security reasons.
Comment 5 Greg Kroah-Hartman 2015-03-15 09:06:09 UTC
On Sun, Mar 15, 2015 at 07:31:49AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=94861
> 
> --- Comment #4 from Walther Pelser <w.pelser@web.de> ---
> (In reply to Greg Kroah-Hartman from comment #2)
> > On Sat, Mar 14, 2015 at 06:17:39PM +0000,
> > bugzilla-daemon@bugzilla.kernel.org wrote:
> > > https://bugzilla.kernel.org/show_bug.cgi?id=94861
> > > 
> > >             Bug ID: 94861
> > >            Summary: After resume from hibernate/sleep USB-DVBT-adapter
> > >                     does not work
> > 
> > Please send to the linux-media@vger.kernel.org mailing list.
> 
> Unable to send to the linux-media@vger.kernel.org mailing list. All mails
> rejected for security reasons.

Don't send html email.
Comment 6 Walther Pelser 2015-03-15 10:42:10 UTC
Exactly, but I had to learn, where to choose it. Now I seemed to have success. Thanks!
Comment 7 Walther Pelser 2015-03-15 15:23:33 UTC
Am 15.03.2015 um 15:23 schrieb Antti Palosaari:
> On 03/15/2015 12:38 PM, W.Pelser wrote:
>> I filed a new bug and I got a comment from Greg Kroah-Hartman:
>>
>> On Sat, Mar 14, 2015 at 06:17:39PM +0000,
>> bugzilla-daemon@bugzilla.kernel.org wrote:
>>  > https://bugzilla.kernel.org/show_bug.cgi?id=94861
>>  >
>>  >             Bug ID: 94861
>>  >            Summary: After resume from hibernate/sleep USB-DVBT-adapter
>>  >                     does not work
>>
>> Please send to the linux-media@vger.kernel.org mailing list.
>>
>> I hope, this time I can pass the spam-filter.
>> <mailto:greg@kroah.com>
>
> These media drivers does not support hibernate/suspend/resume generally, only
> runtime PM. Almost all drivers will just fail when you try sleep during
> streaming (only few usb drivers I made are supporting it).
>
> In order to support hibernate driver needs to stop all (USB) communication on
> hibernate, which means in practice stopping remote controller polling and
> stopping possible data stream and on resume those should be restored.
>
> regards
> Antti

Thanks for your answer!
But in fact kernel-people did not understand my problem.
kernel 3.18.x (and all other kernels) works fine for me, after resume the USB-DVBT-Stick works in the same way as he does after a normal boot. Since kernel 3.19.x  this has changed, as I described above.  My OS is openSUSE tumlbeweed and so filed a bug to Novell's Bugzilla (916577). It was assigned to Takashi Iwai.

Takashi Iwai asked me, to try a modified Kernel from http://download.opensuse.org/repositories/home:/tiwai:/bnc916577/standard/ (N.B. comment 20). His conclusion  was
" It's -ENODEV error, which means that the device file must exist but the kernel returns as if the corresponding device doesn't exist.  So, it must be the issue in the kernel inside." (N.B. bug 916577) comment 18)
So I put the bug on this side too. But here no one seems to understand it really. During awakening or resume (not the same?) kernel does not find the adapter anymore! And it seems not to be a media-problem, but a problem of the kernel's behavior.
Maybe you can help to find the right man (or woman) for this bug????
Comment 8 Walther Pelser 2015-03-27 14:12:37 UTC
I have tried to check the adapter installation with my possibilities.
The result is:
usb (32736:-76524384 0:0) on PCI Domain:32736 Bus:-81114585 Device:0 Function:1700966438
        DEVICE:0 ADAPTER:0 ERROR: Open frontend0 failed

For details see attachment adaptercheck.txt
Comment 9 Walther Pelser 2015-03-27 14:14:12 UTC
Created attachment 172531 [details]
dvb-adaptercheck
Comment 10 Walther Pelser 2015-04-01 05:31:15 UTC
End of homework is:
After boot:
  strace -f -o /tmp/strace.out lsdvb .... :
    .
    .       
    2114  open("/dev/dvb/adapter0/frontend0", O_RDWR|O_NONBLOCK) = 6
    .
    .


After resume:
  strace -f -o /tmp/strace.out lsdvb .... :
     .
     .
    3848  open("/dev/dvb/adapter0/frontend0", O_RDWR|O_NONBLOCK) = -1 ENODEV (No  such device)
     .
     .


Is there any chance, to fix this bug in the nearby future?
I'm not very hopefully.
Comment 11 Walther Pelser 2015-06-25 06:41:17 UTC
with self-compiled kernel from 4.1.tar.xz, this bug seems to be solved.
MANY thanks to Alan Stern for his encouraging replay/advice in this case!