From: Tejun Heo <tj@kernel.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux--ide-momail.e4ward.com-linux--ide-vger.kernel.org-CDD-6w99-4@reply.e4ward.com,
Jeff Garzik <jeff@garzik.org>, Robert Hancock <hancockr@shaw.ca>,
peter.klotz@aon.at, linux-ide@vger.kernel.org, m.nov4k@gmail.com,
lars21ce@gmx.de
Subject: Re: [PATCH #upstream-fixes] libata: implement and use HORKAGE_NOSETXFER
Date: Wed, 08 Jul 2009 20:16:06 +0900 [thread overview]
Message-ID: <4A547FF6.7010609@kernel.org> (raw)
In-Reply-To: <20090708111413.7bb25e1e@lxorguk.ukuu.org.uk>
Alan Cox wrote:
>> That isn't possible because the host machine state is unknown after a
>> timeout. The problem is not confined to TF based controllers and even
>> on TF based controllers, it's far too dangerous to continue as nothing
>> happened. That can easily lead to complete system lock up on quite a
>> few controllers due to fragile TF emulation layer.
>
> It works fine on old style taskfile controllers, and the old IDE layer
> has done it for years
Yeah, exactly. libata covers more diverse set of controllers and
nothing has ever been tested for issuing commands without full reset
after exceptions which can put HSM into unknown state. The whole EH
is designed and implemented that way. So, many reset methods reset
not only the ATA bus but also the HSM. This also coincides with
hardware design. So, if the problem is confined to TF based old IDE,
issuing commands after timeout could work fine but I don't think
that's a viable option here.
>> The drive is full SATA. SETXFER doesn't mean anything to it. Let's
>> just skip it.
>
> What if there is a bridge, what if the controller needs SETXFER for
> internal use (HPT PATA with on card SATA bridges) ?
The device is horridly broken. I don't think we can please everyone
here. Also, it being a slim oem dvd which gets shipped with laptops,
I don't think we need to worry too much about highly varied
configurations.
> I have a feeling this is one case where there isn't a generic solution
> for all devices
>
> For PATA we need SETXFER to be issued
> For SATA we can maybe avoid it sometimes but its getting into deeply
> undefined territory and will break the early HPT at least.
Sure, fully agreed. It's a trade off. There are three options.
1. Don't do anything. The device is broken everywhere.
2. Skip SETXFER. Any direct SATA connection to the device would work
fine.
2. Ignore SETXFER timeout. Probably would work for TF based
controllers but it's largely untested for sata controllers and the
behavior is likely undefined for more advanced controllers.
So, #2 seems like the logical choice here. If worst comes to worst
and some idiot decides to ship the drive with SATA bridge (but really
how many of those configurations do we see anymore?), we can blacklist
that particular machine using dmi or whatnot and craft workaround such
that timeout is ignored for that particular case if it works.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-07-08 11:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-21 21:18 PIONEER DVD-RW DVRTD08 is disabled if there is no disc present at boot time linux-ide
2008-12-22 0:22 ` Robert Hancock
2008-12-22 10:02 ` Tejun Heo
2008-12-22 12:13 ` linux-ide
2008-12-23 3:03 ` Tejun Heo
2008-12-24 13:40 ` linux-ide
2008-12-29 8:14 ` Tejun Heo
2008-12-29 21:32 ` linux-ide
2009-01-06 22:51 ` linux-ide
2009-01-07 2:01 ` [PATCH #upstream-fixes] libata: implement and use HORKAGE_NOSETXFER Tejun Heo
2009-01-07 9:40 ` Alan Cox
2009-01-07 10:27 ` Tejun Heo
2009-01-07 10:53 ` Alan Cox
2009-01-07 11:04 ` Tejun Heo
2009-05-25 3:10 ` Tejun Heo
2009-05-25 8:11 ` Alan Cox
2009-07-08 8:00 ` Tejun Heo
2009-07-08 10:14 ` Alan Cox
2009-07-08 11:16 ` Tejun Heo [this message]
2009-07-08 12:21 ` Alan Cox
2009-07-08 23:07 ` Tejun Heo
2009-07-08 14:53 ` Sergei Shtylyov
2009-07-08 15:06 ` Alan Cox
2008-12-29 22:11 ` PIONEER DVD-RW DVRTD08 is disabled if there is no disc present at boot time Peter Klotz
2008-12-22 11:57 ` linux-ide
-- strict thread matches above, loose matches on Subject: below --
2009-01-07 14:15 [PATCH #upstream-fixes] libata: implement and use HORKAGE_NOSETXFER Moritz Rigler
2009-01-07 14:23 ` Alan Cox
2009-01-09 0:11 ` Robert Hancock
2009-01-15 5:48 ` Tejun Heo
2009-01-15 9:45 ` Alan Cox
2009-01-15 10:06 ` Tejun Heo
2009-01-15 13:48 ` Tejun Heo
2009-01-07 14:18 Moritz Rigler
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=4A547FF6.7010609@kernel.org \
--to=tj@kernel.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hancockr@shaw.ca \
--cc=jeff@garzik.org \
--cc=lars21ce@gmx.de \
--cc=linux--ide-momail.e4ward.com-linux--ide-vger.kernel.org-CDD-6w99-4@reply.e4ward.com \
--cc=linux-ide@vger.kernel.org \
--cc=m.nov4k@gmail.com \
--cc=peter.klotz@aon.at \
/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).