From: Bart Hartgers <bart@etpmod.phys.tue.nl>
To: linux-kernel@vger.kernel.org
Cc: Kurt Garloff <garloff@etpmod.phys.tue.nl>
Subject: hwscan hangs on USB2 disk - SCSI_IOCTL_SEND_COMMAND
Date: Tue, 29 Jun 2004 11:37:36 +0200 (CEST) [thread overview]
Message-ID: <20040629093739.40243364C@etpmod.phys.tue.nl> (raw)
My apologies if this is not really a kernel issue, but
I've recently upgraded to SUSE9.1, and now I am having trouble with
automatically hotplugging my USB2 harddisk. This is because the
userspace hotplug magic runs a prog called hwscan. If I disable the
userspace stuff, everything works fine. Also my USB1 pendrive works fine
with the userspace hotplug.
The problem is that both hwscan and usb-storage get stuck in the 'D"
state until I unplug the harddisk.
A strace of hwscan shows:
21141 open("/dev/sda", O_RDONLY|O_NONBLOCK) = 3
21141 ioctl(3, 0x301, 0xbfffeba0) = 0
21141 ioctl(3, BLKSSZGET, 0xbfffeb9c) = 0
21141 ioctl(3, 0x80041272, 0xbfffeb90) = 0
21141 ioctl(3, FIBMAP, 0xbfffec40) = 0 <--- hwscan gets stuck here
The last ioctl corresponds to this bit of code in
hwinfo-8.38/src/hd/block.c:
#ifndef SCSI_IOCTL_SEND_COMMAND
#define SCSI_IOCTL_SEND_COMMAND 1
#endif
...
memset(scsi_cmd_buf, 0, sizeof scsi_cmd_buf);
// ###### FIXME: smaller!
*((unsigned *) (scsi_cmd_buf + 4)) = sizeof scsi_cmd_buf - 0x100;
scsi_cmd_buf[8 + 0] = 0x12;
scsi_cmd_buf[8 + 1] = 0x01;
scsi_cmd_buf[8 + 2] = 0x80;
scsi_cmd_buf[8 + 4] = 0xff;
k = ioctl(fd, SCSI_IOCTL_SEND_COMMAND, scsi_cmd_buf);
So it appears that the driver hangs because of a SCSI command. Is this
kernel bug, and if so, where do I fix it?
TIA,
Bart
--
Bart Hartgers - TUE Eindhoven
http://plasimo.phys.tue.nl/bart/contact.html
next reply other threads:[~2004-06-29 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 9:37 Bart Hartgers [this message]
2004-06-29 9:45 ` Kurt Garloff
2004-06-29 10:53 ` Steffen Winterfeldt
2004-06-29 11:45 ` Kurt Garloff
2004-06-30 9:37 ` hwscan hangs on USB2 disk - SCSI_IOCTL_SEND_COMMAND - SOLVED Bart Hartgers
2004-06-29 9:52 ` hwscan hangs on USB2 disk - SCSI_IOCTL_SEND_COMMAND Bart Hartgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040629093739.40243364C@etpmod.phys.tue.nl \
--to=bart@etpmod.phys.tue.nl \
--cc=garloff@etpmod.phys.tue.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®