LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Conke Hu" <conke.hu@gmail.com>
To: conke.hu@amd.com
Cc: "Jeff Garzik" <jeff@garzik.org>, Alan <alan@lxorguk.ukuu.org.uk>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [LIBATA BUG] sr.c: TEST_UNIT_READY error
Date: Tue, 13 Feb 2007 15:30:41 +0800	[thread overview]
Message-ID: <5767b9100702122330m21ecdb1dp69fc3a6a720b2a@mail.gmail.com> (raw)
In-Reply-To: <1170395286.4626.11.camel@localhost.localdomain>

On 2/2/07, Conke Hu <conke.hu@amd.com> wrote:
> On Wed, 2007-02-07 at 07:40 -0500, Jeff Garzik wrote:
> > Conke Hu wrote:
> > > Hi,
> > >    TEST_UNIT_READY in get_capabilities (drivers/scsi/sr.c line 743, or
> > > see below) always returns error.
> > >
> > >   ---------------- code begin -----------------------------
> > >     retries = 0;
> > >     do {
> > >         memset((void *)cmd, 0, MAX_COMMAND_SIZE);
> > >         cmd[0] = TEST_UNIT_READY;
> > >
> > >         the_result = scsi_execute_req (cd->device, cmd, DMA_NONE, NULL,
> > >                            0, &sshdr, SR_TIMEOUT,
> > >                            MAX_RETRIES);
> > >
> > >         retries++;
> > >     } while (retries < 5 &&
> > >          (!scsi_status_is_good(the_result) ||
> > >           (scsi_sense_valid(&sshdr) &&
> > >            sshdr.sense_key == UNIT_ATTENTION)));
> > >   ---------------- code end -----------------------------
> > >
> > >   I debugged all kernel versions from 2.6.17 to 2.6.20 on several AMD
> > > and other vendor's PATA/IDE controllers, and I get the_result==0x8000002
> > > and retries==5; on silicon image 3132, i get the_result=0x2eb.
> > >   Does 0x8000002 mean ((DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION)?
> > > what's wrong?
> >
> > What does the sense data returned in the sense buffer say is wrong?
> >
> >       Jeff
>
> I dump scsi_sense_hdr as follows:
> sshdr.response_code = 0x70
> sshdr.sense_key = 0x2
> sshdr.asc = 0x3a
> sshdr.ascq = 0x1
> sshdr.additional_length = 0x0
>
> the sense_key is 0x2 (NOT_READY), but the expected UNIT_ATTENTION :(
but "NOT" the expected UNIT_ATTENTION.

>
> BTW, I am sorry for a mistake, Sil3132 also returns 0x8000002, not 0x2eb
> as I said in the first mail. In a word, all cases return "the_result" as
> 0x8000002.
>


the bytes 0 ~ 13 in sense buffer are:
70 00 02 00 00 00 00 0a 00 00 00 00 3a
other bytes are all 0x00;

in fact this issue can be reproduced in any libata driver, either sata or pata.

Conke

  reply	other threads:[~2007-02-13  7:30 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  2:58 Linux 2.6.20-rc6 Linus Torvalds
2007-01-25 10:09 ` Sunil Naidu
2007-01-25 11:10 ` Linux 2.6.20-rc6 - build failure Eyal Lebedinsky
2007-01-26  2:22   ` Eyal Lebedinsky
2007-01-26 18:49     ` [2.6 patch] fix OCFS2 compile error Adrian Bunk
2007-01-26 19:47       ` Mark Fasheh
2007-01-26 19:53         ` Adrian Bunk
2007-01-26 18:46   ` Linux 2.6.20-rc6 - build failure Mark Fasheh
2007-01-25 17:50 ` Linux 2.6.20-rc6 Arkadiusz Patyk
2007-01-25 21:05 ` Michal Piotrowski
2007-01-25 21:12   ` David Miller
2007-01-26 16:52     ` Venkat Yekkirala
2007-01-26 18:10 ` 2.6.20-rc6: known unfixed regressions (part 1) Adrian Bunk
2007-01-26 18:11 ` 2.6.20-rc6: known unfixed regressions (part 2) Adrian Bunk
2007-01-26 18:16   ` Malte Schröder
2007-01-27 17:28     ` Adrian Bunk
2007-01-27 17:39       ` Adrian Bunk
2007-01-27 17:58       ` Linus Torvalds
2007-01-26 19:04   ` Michal Piotrowski
2007-01-26 19:08     ` Venkat Yekkirala
2007-01-26 18:18 ` 2.6.20-rc6: known regressions with patches Adrian Bunk
2007-01-29  8:45   ` Ingo Molnar
2007-01-29 12:58     ` Dave Jones
2007-01-27 17:32 ` 2.6.20-rc6: known unfixed regressions (v2) (part 1) Adrian Bunk
2007-01-27 17:42 ` 2.6.20-rc6: known unfixed regressions (v2) (part 2) Adrian Bunk
2007-01-28 13:33   ` Uwe Bugla
2007-01-29  6:26     ` Mike Galbraith
2007-01-29  6:48       ` Andrew Morton
2007-01-29  7:08         ` Mike Galbraith
2007-01-29  7:13           ` Linus Torvalds
2007-01-27 17:44 ` 2.6.20-rc6: known regressions with patches (v2) Adrian Bunk
2007-01-27 20:47 ` Linux 2.6.20-rc6 - supend lockdep warning Thomas Gleixner
2007-01-27 20:55 ` Linux 2.6.20-rc6 - sky2 resume breakage Thomas Gleixner
2007-01-29 19:31   ` Stephen Hemminger
2007-01-29 20:10     ` Thomas Gleixner
2007-01-29 21:38       ` Stephen Hemminger
2007-01-29 22:23         ` Thomas Gleixner
2007-01-29 22:23           ` Stephen Hemminger
2007-01-29 22:31             ` Thomas Gleixner
2007-01-29 22:37           ` Linus Torvalds
2007-01-29 22:40             ` Stephen Hemminger
2007-01-29 23:04               ` Linus Torvalds
2007-01-29 23:45                 ` Stephen Hemminger
2007-01-30  0:12                   ` Linus Torvalds
2007-01-30  0:16                     ` Stephen Hemminger
2007-01-30  0:25                       ` Linus Torvalds
2007-01-30  0:26                         ` Stephen Hemminger
2007-01-30  6:54                         ` Ingo Molnar
2007-01-30  7:39                           ` Jeff Garzik
2007-01-30  7:53                             ` Ingo Molnar
2007-01-30  8:02                               ` Jeff Garzik
2007-01-30  8:08                                 ` Ingo Molnar
2007-01-30  8:13                                   ` Ingo Molnar
2007-01-31 15:27                                   ` Jeff Garzik
2007-01-31 17:38                                     ` Ingo Molnar
2007-01-31 17:52                                       ` Jeff Garzik
2007-01-31 20:13                                         ` Thomas Gleixner
2007-01-30  8:03                             ` Ingo Molnar
2007-02-01  6:15                             ` [LIBATA BUG] sr.c: TEST_UNIT_READY error Conke Hu
2007-02-07 12:40                               ` Jeff Garzik
2007-02-02  5:48                                 ` Conke Hu
2007-02-13  7:30                                   ` Conke Hu [this message]
2007-02-15  6:30                                     ` Conke Hu
2007-01-30  8:57                     ` Linux 2.6.20-rc6 - sky2 resume breakage Len Brown
2007-01-30 16:01                       ` Rafael J. Wysocki
2007-01-30 21:28                         ` Nigel Cunningham
2007-02-01 12:49                       ` Pavel Machek
2007-01-29 23:42             ` [PATCH] sky2: fix MSI related " Thomas Gleixner
2007-01-29 22:38           ` Linux 2.6.20-rc6 - sky2 " Frédéric Riss
2007-01-29 22:45             ` Thomas Gleixner
2007-01-29 22:50               ` Frédéric Riss
2007-01-29 22:57                 ` Thomas Gleixner
2007-01-29 23:26                   ` Frédéric Riss
2007-01-29 23:37                     ` Thomas Gleixner
2007-01-29 23:50                       ` [PATCH] block MSI on Sony Stephen Hemminger
2007-01-30  0:22                         ` Thomas Gleixner
2007-01-30  0:21                           ` Stephen Hemminger
2007-01-30  0:31                             ` Thomas Gleixner
2007-01-30  0:31                               ` Stephen Hemminger
2007-01-30  0:26                           ` Thomas Gleixner
2007-01-27 22:11 ` Linux 2.6.20-rc6 - suspend / resume ata_piix Thomas Gleixner
2007-01-27 22:40   ` Jeff Garzik
2007-01-27 22:44     ` Thomas Gleixner
2007-01-28 22:05       ` Thomas Gleixner

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=5767b9100702122330m21ecdb1dp69fc3a6a720b2a@mail.gmail.com \
    --to=conke.hu@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=conke.hu@amd.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [LIBATA BUG] sr.c: TEST_UNIT_READY error' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).