public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/3] cdc-acm: fix incorrect runtime wakeup in acm_tty_write
@ 2015-05-27  4:13 Zhang, Yanmin
  2015-05-27  5:56 ` Zhang, Yanmin
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Yanmin @ 2015-05-27  4:13 UTC (permalink / raw)
  To: linux-kernel, xinhuix.pan, gregkh, alan

Resend as V1/V2 have email format issue. Sorry for bothering.

I use Thunderbird. It has no a button to enable LKML email simply. :)

V3: Change email config to resend.
	Add a space in comment.

 ---

There is a scenario about cdc-acm utilization.Application opens
n_gsm tty and cdc-acm tty. cdc-acm tty connects to xhci device.
The application configures cdc-adm tty to n_gsm tty as ldisc tty.

    n_gsm=>cdc-acm=>xhci driver

acm_tty_write can be called from n_gsm driver by ldisc connection,
and from application when application opens cdc-acm tty directly.
acm_tty_write wakes up the device by calling usb_autopm_get_interface_async,
which calls pm_runtime_get. However, pm_runtime_get can't wake up
the device before returning as it's an async wake up. Then, acm_tty_write
might access the device when it is off.

The patchset fixes it by:
1) add a new function usb_autopm_get_interface_upgrade to deal with
above 2 requirements;
2) wake up device in n_gsm driver if n_gsm drivers calls cdc-acm driver;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-27  5:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  4:13 [PATCH V3 0/3] cdc-acm: fix incorrect runtime wakeup in acm_tty_write Zhang, Yanmin
2015-05-27  5:56 ` Zhang, Yanmin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox