Re: [PATCH 2/2] [RFC] pl2303 autosuspend

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Am Donnerstag 25 Oktober 2007 schrieb Sarah Sharp:

> For now, I didn't add a suspend and resume function to the usb_serial_driver
> structure in pl2303.c.  (Hence the need for the first patch to avoid the NULL
> pointer dereference.)  I did add the .supports_autosuspend flag to the
> usb_driver structure with pointers to usb-serial.c's suspend and resume
> functions.  AFAIK, this works with autosuspend in many cases.

It should work for all drivers that don't allocate buffers and URBs
themselves.

> However, I think it will break with kernel swsuspend (and writing "suspend" to
> the level sysfs file) if the tty is open.  I'm looking for suggestions on how to
> make it work, along with any other comments.  I was looking at taking some of
> the code out of the pl2303's close function and putting into a separate kill
> traffic function, but I think it would require some work to be able to be called
> in interrupt context (as I think would be the case with a swsuspend?).

Swsuspend will kill the power session.
You'd need to enable USB_PERSIST and implement reset_resume()

> The other gotcha is that the pl2303 claims to support remote wakeup.  I haven't
> found a good explanation on any datasheet I've seen about *when* remote wakeup
> is triggered.  One datasheet for the pl2303-HX [1] lists a register RW_MODE that
> if set to 0 "When engages remote wakeup, the device issues disconnect signal" or
> if set to 1 "When engages remote wakeup, the device issues resume signal".  If
> anyone can help me decode this, it would be appreciated.

IMHO experimentation will lead to a quicker answer. Enable it and see what happens.

	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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.