linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Jeff Garzik <jeff@garzik.org>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-acpi@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] libata: Handle bay devices in dock stations
Date: Mon, 09 Jun 2008 13:56:21 +0900	[thread overview]
Message-ID: <484CB7F5.7060606@gmail.com> (raw)
In-Reply-To: <20080609014818.GA32083@srcf.ucam.org>

Matthew Garrett wrote:
> On Mon, Jun 09, 2008 at 10:44:01AM +0900, Tejun Heo wrote:
> 
>> TF-based ATA controllers are very sensitive to how the registers are 
>> accessed and sometimes lock up the whole machine when they are not happy 
>> by indefinitely holding the PCI bus.  This could have been the case if 
>> IOs were in flight when the dock event occurred.  Were they?
> 
> I'd stopped hal, so I can't imagine that userspace was causing any to be 
> generated at that point.

Ah... okay.  Stupid me.  libata EH always resets a frozen port to 
un-freeze it even if it's unoccupied to listen for hotplug events.  So, 
if dock notifies device removal after the actual device is gone && the 
port is frozen as a result, libata EH will try to reset the port after 
the device is gone and in this case the controller locks up the whole 
machine for that.  If schedule_eh is used, libata EH just removes the 
device and does nothing else and the controller is happy.

This isn't too safe tho.  There can be other things which can trigger 
port reset.  ie. hotplug request from userland, in-flight IOs at the 
time of dock removal, etc...  Maybe we need to implement a flag to 
indicate that the port is dead and shouldn't be accessed in any way.

Thanks.

-- 
tejun

  reply	other threads:[~2008-06-09  4:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 14:38 [PATCH] libata: Handle bay devices in dock stations Holger Macht
2008-05-28 14:39 ` Tejun Heo
2008-05-29  3:02 ` Andrew Morton
2008-05-29  3:08   ` Tejun Heo
2008-05-29 13:22 ` Matthew Garrett
2008-05-29 13:33   ` Holger Macht
2008-05-29 13:32     ` Matthew Garrett
2008-05-29 13:39       ` Holger Macht
2008-05-29 13:40         ` Matthew Garrett
2008-05-29 13:44   ` Tejun Heo
2008-05-29 14:02     ` Matthew Garrett
2008-05-29 14:14       ` Holger Macht
2008-05-29 14:35         ` Matthew Garrett
2008-05-29 14:37           ` Tejun Heo
2008-05-29 14:49             ` Matthew Garrett
2008-05-29 16:32               ` Holger Macht
2008-05-29 16:40                 ` Tejun Heo
2008-06-01 16:05                   ` Holger Macht
2008-05-29 16:46                 ` Holger Macht
2008-05-29 17:51                 ` Henrique de Moraes Holschuh
2008-05-30 11:07 ` tom
2008-06-01 16:06   ` Holger Macht
2008-06-03 18:07 ` Jeff Garzik
2008-06-03 18:13   ` Matthew Garrett
2008-06-03 18:23     ` Holger Macht
2008-06-09  1:44     ` Tejun Heo
2008-06-09  1:48       ` Matthew Garrett
2008-06-09  4:56         ` Tejun Heo [this message]
2008-06-03 18:27   ` Holger Macht
2008-06-03 18:29     ` Matthew Garrett
2008-06-03 18:54       ` Jeff Garzik
2008-06-04 10:29     ` 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=484CB7F5.7060606@gmail.com \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.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).