Another Seagate FreeAgent needs allow_restart quirk

Bug #193154 reported by John Dong
84
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Gutsy by Jonathan Rascher
linux-source-2.6.22 (Ubuntu)
Fix Released
Undecided
Colin Ian King
Nominated for Gutsy by Jonathan Rascher

Bug Description

I've noticed that one of my Seagate externals still suffers from the drive-dies-after-it-suspends bug in Gutsy (I'm fairly certain it also happens in Hardy but I cannot verify easily at the moment)

This is the lsusb output for the drive:
Bus 005 Device 023: ID 0bc2:3000 Seagate RSS LLC
  idVendor 0x0bc2 Seagate RSS LLC

If any other information is required from me, please let me know.

Revision history for this message
John Dong (jdong) wrote :

Oops never mind, I just verified behavior is correct on Hardy, likely because of http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commit;h=f09e495df27d80ae77005ddb2e93df18ec24d04a, which IMO should be backported to Gutsy's kernel

Changed in linux:
status: New → Fix Released
Revision history for this message
Jonathan Rascher (bcat) wrote :

While I agree that this is a serious and very annoying bug, I don't think a kernel backport is necessary to fix it. A simple udev rule is all that's needed to make sure the allow_restart flag is always set. Here's how to fix it on Gutsy:

1) Open a terminal.

2) Type [ sudo nano /etc/udev/rules.d/98-local.rules ]

3) Paste the following text into the file:

# Set the allow_restart flag for all USB mass storage devices
ACTION=="add", \
SUBSYSTEM=="scsi", DRIVER=="sd" \
SUBSYSTEMS=="usb", DRIVERS=="usb-storage", \
RUN+="/bin/sh -c 'echo 1 >/sys/class/scsi_disk/%k/allow_restart'"

4) Save the file.

5) Type [ sudo /etc/init.d/udev restart ]

Revision history for this message
Jonathan Rascher (bcat) wrote :

Oops, I typo'd the udev rule in my last comment. It is missing a comma. Oddly enough, udev appears to parse it just fine, but I doubt you'll want to rely on that.

Here's the correct version:

# Set the allow_restart flag for all USB mass storage devices
ACTION=="add", \
SUBSYSTEM=="scsi", DRIVER=="sd", \
SUBSYSTEMS=="usb", DRIVERS=="usb-storage", \
RUN+="/bin/sh -c 'echo 1 >/sys/class/scsi_disk/%k/allow_restart'"

Revision history for this message
Jonathan Rascher (bcat) wrote :

Double oops. It turns out that the last udev rule I posted doesn't always work. I can't figure out why that is, but here's a simpler rule that seems to work all of the time.

# Set the allow_restart flag for all SCSI disks.
ACTION=="add", \
SUBSYSTEM=="scsi_disk", \
ATTR{allow_restart}="1"

(Note that this sets allow_restart for all scsi_disk devices, not just those created by the usb-storage driver. I don't think that's a problem, though.)

Revision history for this message
John Dong (jdong) wrote :

A hack is a hack, and that's exactly what the above solution is. I'm not asking for a kernel backport solely to address this bug, I'm merely asking for it to be considered for bundling with the next kernel update -- bugfix updates are routinely bundled in this fashion AFAIK.

I know how to perform this udev hack locally to work around my drive's problem, but that does nothing for the less knowledgeable Ubuntu users who might have no idea what's going on except files are becoming corrupted randomly on their external drives.

Revision history for this message
Jonathan Rascher (bcat) wrote :

Ah, I think you may have misunderstood me. I agree 100% that we shouldn't expect users to work around this problem on their own. That would be extremely lame.

All I was trying to suggest is that instead of waiting until the next kernel update to fix this, Ubuntu could just release an update to the default udev rules. It just seemed like that might be an easier solution.

(Then again, it's quite possible that I have no idea what I'm talking about. After all, I have a whopping one bug report to my name. :D)

Revision history for this message
John Dong (jdong) wrote :

Ah I see. Well, most Ubuntu developers would like to live under the motto "fix it right over fix it fast" (I hope), and the allow_restart kernel based quirk has been adopted in Hardy already, so from a QA standpoint it's better to backport the Hardy fix

Changed in linux-source-2.6.22:
assignee: nobody → colin-king
Revision history for this message
Colin Ian King (colin-king) wrote :

SRU justification:

Impact: Seagate FreeAgent external drive still suffers from the
drive-dies-after-it-suspends bug in Gutsy.

Patch: (see attached) this small patch is backported from upstream
and is verified to work on Hardy.

Testcase: Suspend and resume with external Seagate FreeAgent drive.

Changed in linux-source-2.6.22:
status: New → Fix Committed
Revision history for this message
arkmundi (rkerver) wrote :

Have an Inspiron 1525N with Dell installed Ubuntu 7.10 and a Seagate Freeagent external USB drive, so also this problem. Under Dell purchased Canonical support agreement, I've opened a case. FYI, I needed a working external for backup prior to upgrading to 8.04. Consider me a test case.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-source-2.6.22 - 2.6.22-15.54

---------------
linux-source-2.6.22 (2.6.22-15.54) gutsy-security; urgency=low

  [Colin Ian King]

  * usb-storage: always set the allow_restart flag
    - LP: #193154

  [Upstream Kernel Changes]

  * [IA64] Fix unaligned handler for floating point instructions with base
    update
  * CVE-2007-6694: [POWERPC] CHRP: Fix possible NULL pointer dereference
  * vm audit: add VM_DONTEXPAND to mmap for drivers that need it
    (CVE-2008-0007)
  * fix SMP ordering hole in fcntl_setlk() (CVE-2008-1669)
  * Fix dnotify/close race (CVE-2008-1375)
  * [TCP]: secure_tcp_sequence_number() should not use a too fast clock
  * hrtimer: check relative timeouts for overflow
  * netdrvr: natsemi: Fix device removal bug

 -- Ben Collins <email address hidden> Mon, 19 May 2008 23:03:41 +0000

Changed in linux-source-2.6.22:
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.