Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Mobile
User Name
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site:


  Search this Thread
Old 05-14-2013, 05:21 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
USBserial suspend/resume issue


I have a ttyUSB connection problem in developing Android PAD mobile.

I'm using Android ICS(4.0.4)/Kernel(3.0.31) on TI OMAP4430 and 5 ttyUSB devices are shown when I connect UMTS modem module.


Since this device is not belong to any existing special drivers, by
default, kernel load generic usb-serial driver with the source code
under driver/usb/serial/generic.c. The basic communication works fine
except the suspend/resume feature.

The issue I have is:
If I start a program which open the port of /dev/ttyUSB2 and
/dev/ttyUSB3 and then suspend target system(TI OMAP4430) and resume, I would see

/dev/ttyUSB4 instead of /dev/ttyUSB2
/dev/ttyUSB5 instead of /dev/ttyUSB3

I didn't close /dev/ttyUSB1 and /dev/ttyUSB2 before the target system suspend and my
goal is NOT to close these ports before suspend and, of course, keep
the port communication work after resume.

I noticed drivers/usb/serial/generic.c doesn't have suspend and resume
function. so I added as below.
static struct usb_driver generic_driver = {
.name = "usbserial_generic",
.probe = generic_probe,
.disconnect = usb_serial_disconnect,
.id_table = generic_serial_ids,
.suspend = usb_serial_suspend, ==> call usb-serial.c's
.resume = usb_serial_resume, ==> call usb-serial.c's
.no_dynamic_id = 1,

But still didn't work.

So can somebody provide me more information about usbserial suspend/resume feature?
1. In the driver/usb/serial/usb-serial.c, are usb_serial_suspend and usb_serial_resume work well for other products?
2. If need to change the driver, what do you suggest to modify for the suspend/resume feature in usb-serial.c, generic.c or even core/driver.c, etc?
3. Is there a way that I can selectively not to suspend the ttyUSBX ports?

Old 08-07-2013, 03:33 AM   #2
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Maybe this?:
Old 08-07-2013, 03:35 AM   #3
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Or here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Automatically Resume from Suspend to Ram and Suspend to Disk to Save Battery in Linux LXer Syndicated Linux News 0 05-10-2013 03:40 AM
[SOLVED] Why do nVida drivers hose suspend/resume or hibernate/resume? taylorkh Linux - Hardware 3 06-23-2011 02:09 PM
usbserial enumeration issue after suspend zxz Linux - Kernel 0 01-25-2010 05:23 PM
can't resume after suspend newbiesforever Linux - General 1 08-26-2009 07:52 AM
Issue when resume from suspend in Slack 12.1 lordwolf Slackware 8 12-03-2008 08:24 AM > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration