hddtemp hangs usb-storage for 66 seconds
From: Meelis Roos
Date: Sat Feb 05 2005 - 15:19:30 EST
I have a Chronos 6-in-1 card reader with USB interface. Currently the
slots are empty and running hddtemp /dev/sda (fist slot, CF) puts
hddtemp and usb-storage processes into D state. I thought they were
stuck but while writing this message it became unstuck.
Hardware is 3 different x86 PC-s with both UHCI and OHCI host
controllers, 2.6.9..2.6.11-rc3 tested, card reader is identified by
lsusb as
Bus 001 Device 002: ID 0dda:0102 Integrated Circuit Solution, Inc.
First it logs 5 times the message
program hddtemp is using a deprecated SCSI ioctl, please convert it to SG_IO
and then usb-storage remains in D state in usb_stor_msg_common and
hddtemp is in D state in blk_execute_rq and then hddtemp exits after 66
seconds with error message
/dev/sda: log sense failed : Invalid argument
Can something be done with usb-storage to give the result quicker? For
me the problem happens at boot, the workarounds are removing removing
the card readed during boot or fiddling with hddtemp conf everytime I
rearrange storage devices (both are bad but not unbearable).
strace fragment of hddtemp:
20211 open("/dev/sda", O_RDONLY|O_NONBLOCK) = 3 <0.078510>
20211 ioctl(0x3, 0x30d, 0x80538a0) = -1 (errno 22) <0.000094>
20211 ioctl(0x3, 0x5386, 0xbffffd34) = 0 <0.000063>
20211 ioctl(0x3, 0x1, 0xbffffc10) = 0 <0.007336>
20211 ioctl(0x3, 0x1, 0xbffff650) = 0 <0.007175>
20211 ioctl(0x3, 0x1, 0xbffff650) = 0 <0.007258>
20211 ioctl(0x3, 0x1, 0xbffff650) = 0 <0.007242>
20211 ioctl(0x3, 0x1, 0xbffff4a0) = 0x2 <66.020693>
20211 close(3) = 0 <0.000177>
20211 write(2, "/dev/sda: log sense failed : Invalid argument\n", 46) = 46 <0.001035>
So it seems it's 7th SCSI_IOCTL_SEND_COMMAND ioctl that takes so long.
At the first glance it seems to be SCSI_IOCTL_SEND_COMMAND with
LOG_SENSE command (and the error message confirms this).
hddtemp is debian's 0.3-beta12-9.
--
Meelis Roos (mroos@xxxxxxxx)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/