From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Carlos Pardo <Carlos.Pardo@siliconimage.com>
Subject: Re: [PATCH] libata error handling fixes (ATAPI)
Date: Tue, 15 Nov 2005 22:43:19 +0900 [thread overview]
Message-ID: <4379E5F7.6000107@gmail.com> (raw)
In-Reply-To: <4379AA5B.1060900@pobox.com>
Jeff Garzik wrote:
>
> TUR fails for me, too. It triggers the EH code, which is why I wound up
> needing to fix it :)
>
> Have you dumped the D2H FIS returned by the drive, when the TUR fails?
> What does it look like? What does the D2H FIS look like after REQUEST
> SENSE?
>
> I bet there is some "clear error" actions we need to take on sil24,
> before it work there.
>
Okay, I finally got my SATA dvd writer working and successfully mounted
a debian cdrom (with some number of gloss hacks). I had to do the
following to get this thing to work.
* prb->fis doesn't contain proper signature after phy reset. I just
forced DEV_ATAPI as a temporary measure. In the original sii driver
where SRST is used instead of PHY RESET, my ATAPI drive registered
correct signature but my harddisk's signature didn't show up.
* As all commands hang after failed TUR, which BTW fails rightfully with
06h (UNIT ATTENTION due to prior reset) and then 02h's (NOT READY), I
avoided TUR failures by issuing REQUEST SENSE first, which returns NO
SENSE but does clear UA condition, and then waiting for more than 10secs
to give the drive time to become ready.
* With above two changes, no command fails and I can mount the cdrom.
------------------
And here are things that I've found out so far....
* ATAPI commands without data (TEST_UNIT_READY, ALLOW_MEDIUM_REMOVAL...)
work happily with any prb->ctrl flag (no flag, PRB_CTRL_PACKET_READ or
PRB_CTRL_PACKET_WRITE).
* Currently, sil24_reset_controller() is called on every error interrupt
to make sure the controller is ready for further operation.
Unfortunately, the current reset_controller() seems to reset PHY too.
The drive becomes NOT READY after reset_controller(). So, when TUR
fails, it falls into TUR, fail with NOT READY, reset which makes the
drive NOT READY again cycle.
* Wihtout sil24_reset_controller(), no further command can be issued.
The controller doesn't seem to be operating normally after DEV_ERR.
--------------------
So, what we need to know to make sil24 work happily with ATAPI devices.
* How to get device signature on initialization.
* How to make the controller operational again after a DEV_ERR without
affecting the attached device.
--
tejun
next prev parent reply other threads:[~2005-11-15 13:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 19:57 [PATCH] libata error handling fixes (ATAPI) Jeff Garzik
2005-11-15 7:41 ` Tejun Heo
2005-11-15 9:28 ` Jeff Garzik
2005-11-15 10:03 ` Tejun Heo
2005-11-15 11:02 ` Jeff Garzik
2005-11-15 12:00 ` Jens Axboe
2005-11-15 18:25 ` Mike Christie
2005-11-15 18:41 ` Jens Axboe
2005-11-16 12:40 ` Jens Axboe
2005-11-16 12:56 ` Jeff Garzik
2005-11-16 13:13 ` Jens Axboe
2005-11-16 13:23 ` Jeff Garzik
2005-11-16 13:31 ` Jeff Garzik
2005-11-16 13:47 ` Jens Axboe
2005-11-16 15:04 ` Bartlomiej Zolnierkiewicz
2005-11-16 15:31 ` Jens Axboe
2005-11-16 16:06 ` Bartlomiej Zolnierkiewicz
2005-11-16 17:10 ` Jens Axboe
2005-11-16 19:11 ` Bartlomiej Zolnierkiewicz
2005-11-16 19:22 ` Jens Axboe
2005-11-16 19:45 ` Jens Axboe
2005-11-16 19:46 ` Bartlomiej Zolnierkiewicz
2005-11-16 19:55 ` Bartlomiej Zolnierkiewicz
2005-11-16 20:02 ` Jens Axboe
2005-11-16 20:23 ` Bartlomiej Zolnierkiewicz
2005-11-16 20:40 ` Jens Axboe
2005-11-19 10:55 ` Christoph Hellwig
2005-11-19 13:27 ` Jens Axboe
2005-11-15 13:43 ` Tejun Heo [this message]
2005-11-15 14:11 ` Jeff Garzik
2005-11-16 3:04 ` Tejun Heo
2005-11-16 3:18 ` Jeff Garzik
2005-11-16 3:48 ` Mark Lord
2005-11-16 3:58 ` Jeff Garzik
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=4379E5F7.6000107@gmail.com \
--to=htejun@gmail.com \
--cc=Carlos.Pardo@siliconimage.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).