From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, linux-ide@vger.kernel.org
Cc: liml@rtr.ca
Subject: [PATCHSET #upstream-fixes] libata: fix a bunch of PMP related problems
Date: Mon, 19 May 2008 01:15:04 +0900 [thread overview]
Message-ID: <12111273141039-git-send-email-htejun@gmail.com> (raw)
Hello,
This patchset is started from investigating sil24 - mv4140 PMP
detection / NCQ problems. It soon turned out there are quite a number
of issues lurking in the current PMP implementation.
* We still have a hole during reset where hotplug can go unnoticed.
* PMP r/w timeout is too short. It's currently 250ms. This is from
SIMG PMPs and was mainly to avoid longish sequential multiple
timeouts when access PMP regs via polled commands which is not the
case anymore and mv 4140 and SIMG4726 needs more time occasionally.
* SDB Notify is not masked during fan-out port resets if PMP hasn't
been reset in that pass. This causes PMP register access failure
because SDB Notify is received while PMP register write is in
progress for fan-out reset. I missed this because most of my
testing was before PMP register access was converted to IRQ driven.
* ata_lpm_schedule() is called during probe right after SCSI scan is
complete which schedules EH immediately, reliably triggering above
two on certain hardware combinations. This by itself should be okay
but makes other problems more painful.
* sil3124/32 and mv4140 combination for some reason can't do NCQ
reliably. I don't know why. I'll blacklist it for the time being
and contact both companies about this.
* recovered errors shouldn't trigger resets.
* SIMG4726 config device still is a real pain in the ass.
This patchset contains ten patches addressing all the above issues.
Although this patchset is rather large, it's basically bug fixes.
The patchset fixes all hotplug problems I can reproduce including the
hotplug problems on inic162x and JMB ahcis. The only remaining issue
is that sometimes device detection gets delayed by 30sec IDENTIFY
timeout. I'll prep a patchset to make EH command timeouts more
intelligent (for #upstream).
The sad part is that with PMP in the mix and the current host
controller designs, we have inherent race condition during reset (no
reliable way to wait for the initial D2H FIS after hardresetting
fan-out port, so SRST races with D2H FIS) and this seems to lead to
problems during or after reset sometimes. We have to resort to
intelligently timed retries to make it work bearably.
Thanks.
drivers/ata/libata-core.c | 40 ++++----
drivers/ata/libata-eh.c | 207 +++++++++++++++++++++++++---------------------
drivers/ata/libata-pmp.c | 44 ++++-----
drivers/ata/libata-scsi.c | 6 -
drivers/ata/sata_sil24.c | 11 ++
include/linux/libata.h | 4
6 files changed, 170 insertions(+), 142 deletions(-)
--
tejun
next reply other threads:[~2008-05-18 16:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-18 16:15 Tejun Heo [this message]
2008-05-18 16:15 ` [PATCH 01/10] libata: fix sata_link_hardreset() @online out parameter handling Tejun Heo
2008-05-19 21:53 ` Jeff Garzik
2008-05-18 16:15 ` [PATCH 02/10] libata: reorganize ata_eh_reset() no reset method path Tejun Heo
2008-05-18 16:15 ` [PATCH 03/10] libata: move reset freeze/thaw handling into ata_eh_reset() Tejun Heo
2008-05-18 16:15 ` [PATCH 04/10] libata: kill hotplug related race condition Tejun Heo
2008-05-18 16:15 ` [PATCH 05/10] libata: ignore recovered PHY errors Tejun Heo
2008-05-19 21:50 ` Jeff Garzik
2008-05-18 16:15 ` [PATCH 06/10] libata: increase PMP register access timeout to 3s Tejun Heo
2008-05-18 16:15 ` [PATCH 07/10] libata: make sure PMP notification is turned off during recovery Tejun Heo
2008-05-18 16:15 ` [PATCH 08/10] libata: don't schedule LPM action seperately during probing Tejun Heo
2008-05-18 16:15 ` [PATCH 09/10] sata_sil24: don't use NCQ if marvell 4140 PMP is attached Tejun Heo
2008-05-18 21:14 ` Mark Lord
2008-05-18 16:15 ` [PATCH 10/10] libata: ignore SIMG4726 config pseudo device Tejun Heo
2008-05-18 16:29 ` [PATCHSET #upstream-fixes] git tree available Tejun Heo
2008-05-20 1:35 ` Brian & Chamaigne Scamman
2008-05-20 2:58 ` Mark Lord
2008-05-20 4:28 ` Tejun Heo
2008-05-20 4:43 ` Tejun Heo
2008-05-21 1:32 ` Brian & Chamaigne Scamman
2008-05-21 4:59 ` Tejun Heo
2008-05-21 11:14 ` Brian & Chamaigne Scamman
2008-05-21 19:42 ` Brian & Chamaigne Scamman
2008-05-22 0:40 ` Tejun Heo
2008-05-23 0:49 ` Brian & Chamaigne Scamman
2008-05-23 1:04 ` Tejun Heo
2008-05-29 3:06 ` Tejun Heo
2008-05-29 3:11 ` Brian & Chamaigne Scamman
2008-05-20 12:08 ` Brian & Chamaigne Scamman
2008-05-20 14:50 ` 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=12111273141039-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-ide@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).