linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: htejun@gmail.com, kurt@roeckx.be, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.25-rc6] sata_promise: fix hardreset hotplug events, take 2
Date: Mon, 24 Mar 2008 22:31:55 -0400	[thread overview]
Message-ID: <47E8641B.3030309@garzik.org> (raw)
In-Reply-To: <18406.38445.717175.664615@harpo.it.uu.se>

Mikael Pettersson wrote:
> A Promise SATA controller will signal hotplug events when a hard
> reset (COMRESET) is done on a port. These events aren't masked by
> the driver, and the unexpected interrupts will cause a sequence
> of failed reset attempts util libata's EH finally gives up.
> 
> This has not been a common problem so far, but the pending libata
> hardreset-by-default changes makes it a critical issue.
> 
> The solution is to disable hotplug events before a reset, and to
> reenable them afterwards. (Promise's driver does this too.)
> 
> This patch adds SATA-specific versions of ->freeze() and ->thaw()
> that also disable and enable hotplug events. PATA ports continue
> to use the old versions of ->freeze() and ->thaw().
> 
> Accesses to the hotplug register must be serialised via host->lock.
> We rely on ap->lock == &ap->host->lock and that libata takes this
> lock before ->freeze() and ->thaw(). Document this requirement.
> The interrupt handler is adjusted so its hotplug register accesses
> are inside the region protected by host->lock.
> 
> Tested on various chips (SATA300TX4, SATA300TX2plus, SATAII150TX4,
> FastTrack TX4000) with various combinations of SATA and PATA disks,
> with and without the pending hardreset-by-default changes.
> 
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
> ---
> Changes since previous version:
> - rephrase the problem description to avoid calling it a HW quirk,
>   the behaviour is apparently standard
> - fix double locking bug found by Tejun, now tested with SMP kernel
> - document locking rules for the global hotplug register
> - inline the hotplug enable/disable code in freeze/thaw
> 
>  drivers/ata/sata_promise.c |  109 ++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 88 insertions(+), 21 deletions(-)

applied



  parent reply	other threads:[~2008-03-25  2:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22 14:21 [PATCH 2.6.25-rc6] sata_promise: fix hardreset hotplug quirk Mikael Pettersson
2008-03-23  3:21 ` Tejun Heo
2008-03-23 10:30   ` Mikael Pettersson
2008-03-23 12:07     ` Tejun Heo
2008-03-23 17:41 ` [PATCH 2.6.25-rc6] sata_promise: fix hardreset hotplug events, take 2 Mikael Pettersson
2008-03-24  2:19   ` Tejun Heo
2008-03-25  2:32     ` Jeff Garzik
2008-03-25  2:37       ` Tejun Heo
2008-03-25  3:32         ` Tejun Heo
2008-03-25  3:53           ` Jeff Garzik
2008-03-25  2:31   ` Jeff Garzik [this message]
2008-04-11 21:11   ` Kurt Roeckx

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=47E8641B.3030309@garzik.org \
    --to=jeff@garzik.org \
    --cc=htejun@gmail.com \
    --cc=kurt@roeckx.be \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /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).