From: Andreas Mohr <andim2@users.sourceforge.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: andi@lisas.de, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andrew Morton <akpm@osdl.org>,
gregkh@suse.de, linux-kernel@vger.kernel.org,
hal@lists.freedesktop.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] USB/hal: USB open() broken? (USB CD burner underruns, USB HDD hard resets)
Date: Wed, 21 Jun 2006 11:33:48 +0200 [thread overview]
Message-ID: <20060621093348.GA13143@rhlx01.fht-esslingen.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0606201017030.6455-100000@iolanthe.rowland.org>
Hi,
On Tue, Jun 20, 2006 at 10:22:57AM -0400, Alan Stern wrote:
> On Tue, 20 Jun 2006, Andreas Mohr wrote:
>
> > But how would HAL safely determine whether a (IDE/USB) drive is busy?
> > As my test app demonstrates (without HAL running), the *very first* open()
> > happening during an ongoing burning operation will kill it instantly, in the
> > USB case.
> > Are there any options left for HAL at all? Still seems to strongly point
> > towards a kernel issue so far.
> >
> > One (rather less desireable) way I can make up might be to have HAL
> > keep the device open permanently and do an ioctl query on whether it's "busy"
> > and then quickly close the device again before the newly started
> > burning process gets disrupted (if this even properly works at all).
>
> The open() call is not in itself the problem.
>
> I would guess that the problem is sparked by the TEST UNIT READY command
> automatically sent when the device file is opened. Although a drive
> should have no difficulty handling this command while carrying out a burn,
> apparently yours aborts. In other words, this is likely to be a firmware
> problem in the CD drive.
OK, at http://lisas.de/~andi/temp_usb/ there are logs:
debug.log.gz: burning, then running my open() test app: test app started
at 22:43:49, disrupted burning process.
only_device_open.log.gz: device open() *only* (plus close()!),
no other USB activity such as burning happening (for comparison purposes, to see
what a usual open()/close() is like)
only_device_open.log.gz (and close()!) contains:
- TEST_UNIT_READY (failure?)
- TEST_UNIT_READY
- TEST_UNIT_READY
- READ_TOC (failure?)
- ALLOW_MEDIUM_REMOVAL
- (unknown command) !!!!!!!
- TEST_UNIT_READY
- READ_TOC (failure?)
- READ_TOC (failure?)
- READ_CAPACITY
- ALLOW_MEDIUM_REMOVAL
Hmm, multiple failures in there: might be cable issues??
debug.log.gz contains:
*** ongoing burning: ***
- lots of WRITE_10 (NO failure!)
- READ BUFFER CAPACITY
- lots of WRITE_10 (NO failure!)
- READ BUFFER CAPACITY
- a couple WRITE_10 (NO failure!)
*** [22:43:49] device open(): ***
- TEST_UNIT_READY (ok!)
- WRITE_10 (ok!!)
- TEST_UNIT_READY (ok!)
- WRITE_10 (ok!)
- READ_TOC (*** ERROR!! ***)
- WRITE_10 (ok!)
- ALLOW_MEDIUM_REMOVAL (ok!)
- WRITE_10 (*** FAILURE! ***)
- going downhill from here...
So what could be the problem here?
READ_TOC might be it, but then it might be fully ok to have it fail
(after all it's non-valid data content), so ALLOW_MEDIUM_REMOVAL would be the
problem then? (next WRITE_10 FAILS!).
I could be totally wrong, though, since I don't have much storage debugging
experience.
A good idea would be to further check whether it's the open() or the close()
which disrupts burning for me.
> I can't tell what's going on with the USB HDD since you haven't provided
> any information.
I'd like to, but can't since I don't have device access any more.
Oh, and that burner_switchoff_oops.jpg in the same directory
is an OOPS that happened when I tried to blank a CDRW,
then cancelled the operation (2x Ctrl-C on cdrecord),
but then had HAL device polling daemon and my test app block on I/O wait on the
device that continued blanking the CDRW. Since I then didn't want to wait
for the blanking to finish I had to switch off the device: immediate OOPS,
possibly due to mis-handling the two processes still waiting on a busy device
which then got switched off completely. Kernel 2.6.17-rc6-mm2.
Thanks!
Andreas Mohr
next prev parent reply other threads:[~2006-06-21 9:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 8:21 Andreas Mohr
2006-06-20 8:37 ` Andrew Morton
2006-06-20 8:47 ` Andreas Mohr
2006-06-20 8:56 ` Andrew Morton
2006-06-20 9:06 ` [linux-usb-devel] " Alan Cox
2006-06-20 9:05 ` Andreas Mohr
2006-06-20 10:18 ` Alan Cox
2006-06-20 14:22 ` Alan Stern
2006-06-21 9:33 ` Andreas Mohr [this message]
2006-06-21 16:15 ` Alan Stern
2006-06-21 16:44 ` Andreas Mohr
2006-06-21 19:06 ` Alan Stern
2006-06-21 20:52 ` Alan Cox
2006-06-21 20:08 ` Pete Zaitcev
2006-06-21 9:10 ` Andreas Mohr
[not found] <6pnj7-32Q-7@gated-at.bofh.it>
[not found] ` <6pJWg-34g-5@gated-at.bofh.it>
[not found] ` <6pKfL-3sx-29@gated-at.bofh.it>
[not found] ` <6pKpl-3Sx-23@gated-at.bofh.it>
[not found] ` <6pLll-5iq-15@gated-at.bofh.it>
2006-06-21 0:07 ` [linux-usb-devel] " Bodo Eggert
2006-06-21 10:53 ` Alan Cox
2006-06-21 16:16 ` Bodo Eggert
2006-06-21 16:34 ` Andreas Mohr
2006-06-21 19:02 ` Alan Stern
2006-06-21 19:16 ` Andreas Mohr
2006-06-21 19:56 ` Alan Stern
2006-06-21 20:38 ` Bodo Eggert
2006-06-21 20:37 ` Alan Cox
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=20060621093348.GA13143@rhlx01.fht-esslingen.de \
--to=andim2@users.sourceforge.net \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@lisas.de \
--cc=gregkh@suse.de \
--cc=hal@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=stern@rowland.harvard.edu \
/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®