hdparm and ata_id makes USB drive hang

Bug #428469 reported by Tormod Volden
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Invalid
Medium
hdparm (Ubuntu)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

I have installed Karmic on a USB drive. Because of bug #419231 I need to add ums_cypress to the initrd for this. During boot I noticed several long waits with no activity. Bootchart indicated it was hdparm hanging. When I run hdparm manually it hangs for 15 seconds:

$ time sudo hdparm /dev/sdb

/dev/sdb:
 HDIO_DRIVE_CMD(identify) failed: Invalid exchange
 readonly = 0 (off)
 readahead = 256 (on)
 geometry = 30401/255/63, sectors = 488397168, start = 0

real 0m15.979s
user 0m0.000s
sys 0m0.008s

It leaves this in dmesg:

[ 207.928097] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 215.928057] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 240.928054] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 248.928049] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 279.928054] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 287.928107] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 411.472048] ACPI: EC: missing confirmations, switch off interrupt mode.
[ 610.112052] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 618.112042] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 639.112168] usb 1-6: reset high speed USB device using ehci_hcd and address 2
[ 647.112049] usb 1-6: reset high speed USB device using ehci_hcd and address 2

Interesting enough the time stamps all end with the same millisecond part, like in bug #397096.

ProblemType: Bug
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: tormod 3094 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xc8000000 irq 16'
   Mixer name : 'Realtek ALC880'
   Components : 'HDA:10ec0880,08800000,00090500 HDA:11c13026,11c13026,00100600'
   Controls : 39
   Simple ctrls : 23
Date: Sat Sep 12 17:51:05 2009
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=d6223bfb-d64e-4243-96d5-5d5a22c7d50f
MachineType: Acer, inc. TravelMate 8100
Package: linux-image-2.6.31-10-generic 2.6.31-10.30
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-10-generic root=UUID=a2034346-c604-47aa-b10f-292a29ed94b4 ro
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-10.30-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-10-generic N/A
 linux-firmware 1.16
RfKill:

SourcePackage: linux
Uname: Linux 2.6.31-10-generic i686
dmi.bios.date: 01/20/06
dmi.bios.vendor: Acer
dmi.bios.version: 3C25
dmi.board.name: Kingfisher
dmi.board.vendor: Acer, Inc.
dmi.board.version: Not Applicable
dmi.chassis.type: 1
dmi.chassis.vendor: , Inc.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAcer:bvr3C25:bd01/20/06:svnAcer,inc.:pnTravelMate8100:pvrNotApplicable:rvnAcer,Inc.:rnKingfisher:rvrNotApplicable:cvn,Inc.:ct1:cvrN/A:
dmi.product.name: TravelMate 8100
dmi.product.version: Not Applicable
dmi.sys.vendor: Acer, inc.

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
Connor Imes (ckimes) wrote :

Hi Tormod, thanks for the detailed report. I think there is enough information here for a developer to have a look at it. Cheers.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I mentioned this in my upstream report for bug #419231, http://bugzilla.kernel.org/show_bug.cgi?id=14172

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Upstream (kernel) thinks this is normal, so I guess hdparm needs to be fixed, or we should not use hdparm blindly on all kind of hard drive controllers.

Changed in linux:
status: Unknown → Invalid
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Triaged a while ago but has not had any updated comments for quite some time. Please let us know if this issue remains in the current Ubuntu release, http://www.ubuntu.com/getubuntu/download . If the issue remains, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Yes, this is still the same in lucid with 2.6.32-16.25-generic.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux:
importance: Unknown → Medium
Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: hdparm makes USB drive hang

I wonder if hdparm issues similar scsi commands as ata_id, which makes this usb-ata bridge hang (see bug #982213).

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Yes, I could confirm this by adding some debug printing to the ums-cypress module:

Running scsi_id does nothing (no results, no errors, no atacb commands).

Running stock ata_id:
 creates atacb command 0xEC (ATA IDENTIFY DEVICE)
 hangs, usb reset after 30s
 HDIO_GET_IDENTITY failed for '/dev/sdb': Invalid argument

Running my own (patched, no v3 SG_IO) ata_id:
 HDIO_GET_IDENTITY failed for '/dev/sdb': Invalid argument
 (but no atacb commands translated by ums-cypress)

Running hdparm:
 creates atacb with command 0xEC (ATA IDENTIFY DEVICE)
 hangs, usb reset after 16s
 creates atacb with command 0xA1 (ATA IDENTIFY PACKET DEVICE)
 hangs, usb reset after 16s

In all cases of atacb commands above, the srb->result returned from usb_stor_transparent_scsi_command() in cypress_atacb.c is 50000.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Pretty much one year later, I looked at this again and found out that my USB-IDE bridge does not support the ATACB commands that were sent to it. This patch is now propagating into the kernel: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=671b4b2ba9266cbcfe7210a704e9ea487dcaa988

summary: - hdparm makes USB drive hang
+ hdparm and ata_id makes USB drive hang
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Someone with the right super powers please set the linux task to "Fix committed". The patch is in the main tree (for 3.10), and is also queued up for 3.0, 3.4, 3.5, 3.8 and 3.9 stable branches.

Changed in hdparm (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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