Backport USB-PERSIST fix from upstream to Hardy

Bug #254783 reported by Stefan Bader
8
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Fix Released
Medium
Stefan Bader

Bug Description

This is a tracking bug report for backporting the following patch to Hardy:

commit 5e6effaed6da94e727cd45f945ad2489af8570b3
Author: Alan Stern <email address hidden>
Date: Mon Mar 3 15:15:51 2008 -0500

USB: make USB-PERSIST work after every system sleep

This patch (as1046) makes USB-PERSIST work more in accordance with
the documentation. Currently it takes effect only in cases where the
root hub has lost power or been reset, but it is supposed to operate
whenever a power session was dropped during a system sleep.

A new hub_restart() routine carries out the duties required during a
reset or a reset-resume. It checks to see whether occupied ports are
still enabled, and if they aren't then it clears the enable-change and
connect-change features (to prevent interference by khubd) and sets
the child device's reset_resume flag. It also checks ports that are
supposed to be unoccupied to verify that the firmware hasn't left the
port in an enabled state.

Revision history for this message
Stefan Bader (smb) wrote :

Upstream fix in 2.6.26-rc1

Changed in linux:
importance: Undecided → Medium
status: New → Fix Released
Stefan Bader (smb)
Changed in linux:
assignee: nobody → stefan-bader-canonical
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

SRU justification:

Impact: The USB-PERSIST feature (0458d5b4c9cc4ca0f62625d0144ddc4b4bc97a3c) lets USB mounted filesystems remain intact (the USB device not removed) during power loss. This is important for small machines that have their root fs on a USB device. However this did not work in all cases.

Fix: A patch (5e6effaed6da94e727cd45f945ad2489af8570b3) that followed later fixed the persist problem to work on all sleep states instead of supporting only those where the hub lost power.

Testcase: Suspend fails on the classmate PC without this patch.

Revision history for this message
Amit Kucheria (amitk) wrote :

Just nitpicking, but resume fails on the classmate w/o this patch

The patch works by _not_ re-enumerating USB devices that are set to 'persist' across a suspend/resume.

Revision history for this message
Oliver Grawert (ogra) wrote :

the classmate has an initscript to enable this feature with the following code:

         for file in $(/usr/bin/find /sys -name persist|grep usb1);do
             echo -n 1 >$file 2>>/var/log/syslog;
         done

if the respective sysfs flags are not set the patch wont have any effect.

Revision history for this message
Stefan Bader (smb) wrote :

Commited to Hardy tree as 6ca9208c22280928597bcc738bf4248de0ab359d.

Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

linux 2.6.24-21 copied to hardy-updates.

Changed in linux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.