Bug 616172

Summary: pl2303 changes port for USB to serial adapter after suspend/resume
Product: [Fedora] Fedora Reporter: Philip Sherman <p.sherman>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: anton, dougsland, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, michael
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-29 13:16:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Philip Sherman 2010-07-19 19:17:08 UTC
Description of problem:
pl2303 apparently has no support for suspend/resume. Suspend/resume causes serial device to be disconnected then reconnected as an available device with a new /dev/ttyUSBx address. This occurs only when the device was connected to an application when the system was suspended.

The application is still using the port after resume which makes the port unavailable for pl2303 to reattach the device to the same port.

Version-Release number of selected component (if applicable):
Kernel: 2.6.33.6-147.fc13.x86_64

How reproducible:
every time.


Steps to Reproduce:
1. connect USB to serial adapter
2. Start application that connects to the serial device (ie apcupsd)
2. Suspend the system (to memory) 
3. Resume the system
  
Actual results:
USB to serial converter detached then connected to first available ttyUSB device

Expected results:
USB to serial converter restarted on same ttyUSB device

Additional info:  clipped from dmesg output - multiple cycles
-----------------------------------------------------------------------
system booted, device attached, apcupsd started and connected to device
-----------------------------------------------------------------------

-----  first suspend/resume cycle  ------
usb 1-1.2: reset full speed USB device using ehci_hcd and address 3
pl2303 1-1.2:1.0: no reset_resume for driver pl2303?
pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
pl2303 1-1.2:1.0: device disconnected
PM: resume of devices complete after 2366.257 msecs
pl2303 1-1.2:1.0: pl2303 converter detected
usb 1-1.2: pl2303 converter now attached to ttyUSB1
PM: Finishing wakeup.
Restarting tasks ... done.

-----   second suspend/resume cycle -------
usb 1-1.2: reset full speed USB device using ehci_hcd and address 3
pl2303 1-1.2:1.0: no reset_resume for driver pl2303?
pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
pl2303 1-1.2:1.0: device disconnected
PM: resume of devices complete after 2417.279 msecs
pl2303 1-1.2:1.0: pl2303 converter detected
usb 1-1.2: pl2303 converter now attached to ttyUSB1
PM: Finishing wakeup.
Restarting tasks ... done.

-----   third suspend/resume cycle  ----------
usb 1-1.2: reset full speed USB device using ehci_hcd and address 3
pl2303 1-1.2:1.0: no reset_resume for driver pl2303?
pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
pl2303 1-1.2:1.0: device disconnected
PM: resume of devices complete after 2417.279 msecs
pl2303 1-1.2:1.0: pl2303 converter detected
usb 1-1.2: pl2303 converter now attached to ttyUSB1
PM: Finishing wakeup.
Restarting tasks ... done.


------------------------------------------------------------------------
Stopped apcupsd, reconfigured to use /dev/ttyUSB1 then restarted apcupsd
------------------------------------------------------------------------

----- fourth suspend/resume cycle -------
usb 1-1.2: reset full speed USB device using ehci_hcd and address 3
pl2303 1-1.2:1.0: no reset_resume for driver pl2303?
pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
pl2303 1-1.2:1.0: device disconnected
PM: resume of devices complete after 2400.255 msecs
pl2303 1-1.2:1.0: pl2303 converter detected
usb 1-1.2: pl2303 converter now attached to ttyUSB0
PM: Finishing wakeup.
Restarting tasks ... done.

-----  fifth suspend/resume cycle ----------
usb 1-1.2: reset full speed USB device using ehci_hcd and address 3
pl2303 1-1.2:1.0: no reset_resume for driver pl2303?
pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
pl2303 1-1.2:1.0: device disconnected
PM: resume of devices complete after 2410.325 msecs
pl2303 1-1.2:1.0: pl2303 converter detected
usb 1-1.2: pl2303 converter now attached to ttyUSB0
PM: Finishing wakeup.
Restarting tasks ... done.

Comment 1 Michael Abmayer 2010-08-25 19:35:01 UTC
I had this problem today with my Debian Lenny too. As a quick fix/workaround I wrote the following script. Maybe the location where to put this script differs in Fedora.

/etc/pm/sleep.d/apcupsd
--------------------------------------------
#!/bin/sh

case "$1" in
	suspend|suspend_hybrid|hibernate)
		/etc/init.d/apcupsd stop
		;;

	resume|thaw)
		/etc/init.d/apcupsd start
		;;

	*)
		echo "Usage: $0 {suspend|suspend_hybrid|hibernate|resume|thaw|help}" >&2
		exit 1
		;;
esac

exit 0
-------------------------------------------

Comment 2 Bug Zapper 2011-06-01 13:26:01 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2011-06-29 13:16:27 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.