From: Tilman Schmidt <tilman@imap.cc>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-usb-devel@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Greg KH <gregkh@suse.de>,
Hansjoerg Lipp <hjlipp@web.de>, Karsten Keil <kkeil@suse.de>,
i4ldeveloper@listserv.isdn4linux.de
Subject: Re: [linux-usb-devel] [PATCH 1/2] usb_gigaset: suspend support
Date: Thu, 01 Nov 2007 21:17:22 +0100 [thread overview]
Message-ID: <472A3452.9060003@imap.cc> (raw)
In-Reply-To: <200710300952.44232.oliver@neukum.org>
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
Am 30.10.2007 09:52 schrieb Oliver Neukum:
> Am Montag 29 Oktober 2007 schrieb Tilman Schmidt:
>> --- a/drivers/isdn/gigaset/usb-gigaset.c 2007-10-23 01:48:12.000000000 +0200
>> +++ b/drivers/isdn/gigaset/usb-gigaset.c 2007-10-24 00:47:32.000000000 +0200
>> @@ -847,6 +859,63 @@ static void gigaset_disconnect(struct us
>> gigaset_unassign(cs);
>> }
>>
>> +/* gigaset_suspend
>> + * This function is called before the USB connection is suspended or reset.
>> + */
>> +static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
>> +{
>> + struct cardstate *cs;
>> + struct usb_cardstate *ucs;
>> + int rc;
>> +
>> + if ((cs = usb_get_intfdata(intf)) == NULL ||
>> + (ucs = cs->hw.usb) == NULL) {
>> + err("%s: no cardstate", __func__);
>> + return -EFAULT;
>> + }
>> +
>> + //FIXME stop common module activities? ISDN_STAT_STOP? block open()?
>> +
>> + /* stop submitting bulk URBs */
>> + tasklet_disable(&cs->write_tasklet);
>> +
>> + /* kill pending read URB */
>> + usb_kill_urb(ucs->read_urb);
>
> no pending write URB?
There shouldn't be. A read URB is always posted in case the device
sends anything, even while the device is idle, but a write URB is
only submitted if there's actual activity. But you're right, it's
safer to add a "usb_kill_urb(ucs->bulk_out_urb);" here just in case.
Thanks,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
next prev parent reply other threads:[~2007-11-01 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071029185311.4C955FC04C@xenon.ts.pxnet.com>
2007-10-29 19:10 ` [linux-usb-devel] [PATCH 1/2] usb_gigaset: suspend support Alan Stern
2007-10-29 21:20 ` Tilman Schmidt
2007-10-30 8:52 ` Oliver Neukum
2007-11-01 20:17 ` Tilman Schmidt [this message]
[not found] ` <20071029214131.70EABFC043@xenon.ts.pxnet.com>
2007-10-30 21:01 ` [PATCH 1/2] usb_gigaset: suspend support [v2] Andrew Morton
2007-11-01 18:20 ` Tilman Schmidt
2007-11-01 18:45 ` Andrew Morton
2007-11-01 19:47 ` [linux-usb-devel] " Alan Stern
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=472A3452.9060003@imap.cc \
--to=tilman@imap.cc \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=hjlipp@web.de \
--cc=i4ldeveloper@listserv.isdn4linux.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=oliver@neukum.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.