From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Bob Copeland <me@bobcopeland.com>,
linux-wireless@vger.kernel.org,
linux-pm@lists.linux-foundation.org,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [linux-pm] rtl8187 usb wifi adaptor causes suspend hang
Date: Tue, 30 Dec 2008 17:31:17 +0000 [thread overview]
Message-ID: <495A5AE5.1040902@tuffmail.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0812301220090.2386-100000@iolanthe.rowland.org>
Alan Stern wrote:
> On Tue, 30 Dec 2008, Bob Copeland wrote:
>
>
>> On Tue, Dec 30, 2008 at 10:45 AM, Alan Stern <stern@rowland.harvard.edu> wrote:
>>
>>>> Is it possible to fix this without suspend support in mac80211? If not,
>>>> I vote we change rtl8187 (and zd_usb) to prevent suspend. I.e. set USB
>>>> suspend callbacks which return an error.
>>>>
>> Alan J:
>>
>> Are you using 'echo -n mem > /sys/power/state' directly to do suspend,
>> or hitting the power button? I'm guessing we shouldn't be calling
>> disconnect() when suspending.
>>
>>
>>> It certainly should be possible to fix this. For instance, why
>>> unregister anything during suspend? If ieee80211_unregister_hw()
>>> weren't called then this problem would go away, right?
>>>
>> Yes, we shouldn't need to.
>>
>> But it's not the suspend() callback that's getting called (the driver
>> doesn't have one) but disconnect, which unregisters itself from the
>> upper layers. I just read the stuff in Documentation/usb but admit I
>> don't fully get the rules. AIUI, without suspend/resume callbacks,
>> disconnect will sometimes get called on resume? But the original
>> email is a hang at suspend time?
>>
>
> This explains the problem. Yes, drivers that don't have a suspend or
> resume method will have their disconnect method called when a system
> suspend occurs.
>
> An easy way to prevent this is to add empty suspend and resume methods
> (and a resume_reset method too).
>
That won't fix hibernation though. The disconnect method can still get
called in resume from hibernation, before the workqueue gets unfrozen.
To be honest, I'm far more interested in suspend-to-disk than
suspend-to-ram.
> Alternatively, you can allow the disconnect to occur. If the workqueue
> weren't freezable then the problem would be solved. Which leads to the
> question: Why have a freezable workqueue if there's no suspend/resume
> support in the driver?
>
next prev parent reply other threads:[~2008-12-30 17:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 10:51 rtl8187 usb wifi adaptor causes suspend hang Alan Jenkins
2008-12-30 13:10 ` Alan Jenkins
2008-12-30 15:45 ` [linux-pm] " Alan Stern
2008-12-30 16:45 ` Bob Copeland
2008-12-30 16:48 ` Alan Jenkins
2008-12-30 17:25 ` Alan Stern
2008-12-30 17:31 ` Alan Jenkins [this message]
2008-12-30 17:52 ` Larry Finger
2008-12-30 18:05 ` Hin-Tak Leung
2008-12-30 18:05 ` Oliver Neukum
2008-12-30 18:09 ` Larry Finger
2008-12-31 0:59 ` Hin-Tak Leung
2008-12-31 14:33 ` Alan Jenkins
2008-12-31 15:57 ` Bob Copeland
2008-12-31 17:10 ` Alan Jenkins
2008-12-31 17:16 ` Oliver Neukum
2008-12-31 19:33 ` Larry Finger
2008-12-31 23:00 ` Larry Finger
2008-12-31 23:26 ` Bob Copeland
2009-01-01 0:16 ` Alan Stern
2009-01-01 6:06 ` Hin-Tak Leung
2009-01-01 22:25 ` Alan Stern
2009-01-01 23:42 ` Hin-Tak Leung
2009-01-02 2:24 ` Alan Stern
2009-01-01 6:18 ` Hin-Tak Leung
2009-01-01 13:07 ` Alan Jenkins
2009-01-01 13:40 ` Stefanik Gábor
2009-01-01 14:39 ` Hin-Tak Leung
2009-01-01 16:38 ` Larry Finger
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=495A5AE5.1040902@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=stern@rowland.harvard.edu \
/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).