From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Kernel development list <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: 2.a.30-rc7: fat filesystem misdetected as amiga
Date: Tue, 26 May 2009 19:03:43 +0300 [thread overview]
Message-ID: <20090526160343.GA9842@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0905260958400.3584-100000@iolanthe.rowland.org>
On Tue, May 26, 2009 at 10:04:01AM -0400, Alan Stern wrote:
> On Tue, 26 May 2009, Michael S. Tsirkin wrote:
>
> > On Mon, May 25, 2009 at 05:08:12PM -0400, Alan Stern wrote:
> > > On Mon, 25 May 2009, Michael S. Tsirkin wrote:
> > >
> > > > > So apparently this is a bug in the device; it doesn't respond correctly
> > > > > to the first READ command. But since it does respond correctly to
> > > > > later commands, everything works okay thereafter. You ought to be able
> > > > > to recover from the error by running
> > > > >
> > > > > blockdev --rereadpt /dev/sdb
> > > > >
> > > > > manually.
> > > >
> > > > Yes, this helps.
> > > > Would it make sense for kernel to retry automatically?
> > > > Why doesn't it?
> > >
> > > I don't know the details in this case. Most likely the error code
> > > (Logical Block Address Out of Range) is interpreted as a fatal
> > > non-retryable error. For other sorts of errors, the kernel does retry.
> >
> > Who would know? The scsi crowd?
>
> They would know. But it's easy enough to find out. (Looks through
> the SCSI code...) Here we go. scsi_io_completion() contains this:
>
> case ILLEGAL_REQUEST:
> /* If we had an ILLEGAL REQUEST returned, then
> * we may have performed an unsupported
> * command. The only thing this should be
> * would be a ten byte read where only a six
> * byte read was supported. Also, on a system
> * where READ CAPACITY failed, we may have
> * read past the end of the disk.
> */
> if ((cmd->device->use_10_for_rw &&
> sshdr.asc == 0x20 && sshdr.ascq == 0x00) &&
> (cmd->cmnd[0] == READ_10 ||
> cmd->cmnd[0] == WRITE_10)) {
> /* This will issue a new 6-byte command. */
> cmd->device->use_10_for_rw = 0;
> action = ACTION_REPREP;
> } else if (sshdr.asc == 0x10) /* DIX */ {
> description = "Host Data Integrity Failure";
> action = ACTION_FAIL;
> error = -EILSEQ;
> } else
> action = ACTION_FAIL;
> break;
Which kernel version is this? I see different code in 2.6.30-rc7.
> Since the Sense Key value was ILLEGAL_REQUEST and the ASC value wasn't
> 0x10 or 0x20, action gets set to ACTION_FAIL. Hence the command is not
> retried.
>
> In the end, there's a limit to how far the kernel should go in
> compensating for buggy devices. Your device may well have passed that
> limit.
>
> Alan Stern
Let's see, hope to find a workaround that isn't too ugly to be included.
--
MST
next prev parent reply other threads:[~2009-05-26 16:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 12:57 2.a.30-rc7: fat filesystem misdetected as amiga Michael S. Tsirkin
2009-05-25 14:00 ` OGAWA Hirofumi
2009-05-25 15:32 ` Alan Stern
2009-05-25 18:48 ` Michael S. Tsirkin
2009-05-25 19:32 ` Kay Sievers
2009-05-25 19:50 ` Michael S. Tsirkin
2009-05-25 20:00 ` Kay Sievers
2009-05-25 20:25 ` Michael S. Tsirkin
2009-05-25 20:37 ` Alan Stern
2009-05-25 20:41 ` Kay Sievers
2009-05-25 20:54 ` Michael S. Tsirkin
2009-05-25 20:53 ` Michael S. Tsirkin
2009-05-25 21:08 ` Alan Stern
2009-05-25 21:23 ` Michael S. Tsirkin
2009-05-26 14:04 ` Alan Stern
2009-05-26 16:03 ` Michael S. Tsirkin [this message]
2009-05-26 16:07 ` Michael S. Tsirkin
2009-05-26 16:51 ` Alan Stern
2009-05-26 16:52 ` Michael S. Tsirkin
2009-05-25 21:47 ` Michael S. Tsirkin
2009-05-25 22:31 ` Andries E. Brouwer
2009-05-25 23:05 ` Kay Sievers
2009-05-26 2:26 ` Ming Lei
2009-05-26 6:17 ` Michael S. Tsirkin
2009-05-26 6:22 ` Michael S. Tsirkin
2009-05-25 23:17 ` Oliver Neukum
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=20090526160343.GA9842@redhat.com \
--to=mst@redhat.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.