Re: [PATCH 2/2] [RFC] pl2303 autosuspend
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Dienstag 13 November 2007 schrieb Sarah Sharp: > A hibernate (or a suspend that causes the USB subsystem to lose power) > has issues. If you have the tty open when you hibernate, a new tty will > be created when the device re-enumerates during resume. Closing the old Yes, this is the desired default. Any loss of power is treated as disconnect. > tty will cause the serial driver's shutdown function to be called on a > device that doesn't exist anymore. Fortunately, that doesn't seem to > have any adverse effects on the functionality of the new tty. This is what would happen at a hot unplug, too. Do you see any problems therewith? > I've tried adding a tty hangup to the suspend function, but that doesn't > seem to have any effect on minicom. I'm not sure whether minicom > ignores hangups, or if it never gets the hangup. The tty layer > schedules the hangup; it isn't synchronous. As disconnect() is called, the generic USB serial layer will call hangup anyway from usb_serial_disconnect(). > This seems to be the only issue with adding autosuspend code to the > pl2303. A hibernate with the tty open didn't work before, so I'm > inclined to send an updated patch later today. > > Also, I found out the hard way that some types of pl2303 chips don't I feel your pain. > handle suspend correctly. The HX chip can handle suspend gracefully, > but the type_1 can't. When it resumes, the host controller detects it > as a low speed device; since it's actually a high speed device, this > fails. The initialization for the two chips are different (see the > FISH/SOUP mess in pl2303.c), but I haven't experimented to see if > different initialization would help. By then it would be too late. IMHO the failing devices need reset_resume() and a quirk entry. > Is there somewhere to record devices that handle autosuspend correctly? > I saw some mention that the HAL people will take care of it, but I > haven't heard anything specific. IIRC Kay Sievers is working on that. Regards Oliver ------------------------------------------------------------------------- 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