Re: [PATCH 1/2] usb_gigaset: suspend support
Tilman Schmidt <[email protected]>
| Newsgroups | gmane.linux.usb.devel,gmane.linux.kernel,gmane.linux.isdn.i4l.devel |
|---|---|
| Organization | me - organized?? |
| Message-ID | <[email protected]> |
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: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc
(application/pgp-signature, 253 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3rc1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHKjRZMdB4Whm86/kRAk6DAJkBAY32HDtFmi6Oq6o/OgFL8k+ccgCfbtYp qe1mmrWX6BjqSDDCaMHCESQ= =ssKX -----END PGP SIGNATURE-----