From: "Conke Hu" <conke.hu@gmail.com>
To: "Tejun Heo" <htejun@gmail.com>
Cc: "Jeff Garzik" <jeff@garzik.org>, Alan <alan@lxorguk.ukuu.org.uk>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] ATAPI command TEST_UNIT_READY never succeeds!
Date: Fri, 9 Mar 2007 20:21:57 +0800 [thread overview]
Message-ID: <5767b9100703090421h27711ceeqda5648eefd428456@mail.gmail.com> (raw)
In-Reply-To: <45EEAFB4.3060306@gmail.com>
On 3/7/07, Tejun Heo <htejun@gmail.com> wrote:
> (snip)
> I've read your last posting about this, but forgot to follow up. TUR is
> supposed to fail if ATAPI device doesn't have media loaded. TUR fails
> and sense data returns device not ready - media not present. That's the
> normal operation. Does TUR fail even with media loaded or is sense data
> not properly fetched?
>
Thank you, Tejun! I did forget to load any media :(
When I load media and retry, TUR succeeds but there is still a
problem: when using ahci driver, TUR will not succeed unless it runs
twice, and the following loop always runs till retries==2
-------------------- code in sr.c, get_capabilities() -------------------------
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)));
------------------------------------- end code
-------------------------------------
this issue only occurs in ahci driver, and libata + pata driver is OK.
Conke
next prev parent reply other threads:[~2007-03-09 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 12:09 Conke Hu
2007-03-07 12:23 ` Conke Hu
2007-03-07 12:27 ` Tejun Heo
2007-03-09 12:21 ` Conke Hu [this message]
2007-03-09 12:59 ` Tejun Heo
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=5767b9100703090421h27711ceeqda5648eefd428456@mail.gmail.com \
--to=conke.hu@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--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®