LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Tejun Heo <htejun@gmail.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
alan@redhat.com, jeff@garzik.org,
Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Subject: Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system
Date: Mon, 11 Feb 2008 20:16:38 +0900 [thread overview]
Message-ID: <47B02E96.4050900@gmail.com> (raw)
In-Reply-To: <20080211100446.GA4646@homac.suse.de>
Hello,
Holger Macht wrote:
>> In the above example, even the reset sequence itself can cause hang if
>> the hardware is implemented slightly differently. The reason why
>> set_piomode() locks up but reset sequence doesn't is simple dumb luck.
>> I think the proper fix is to tell libata to detach the cdrom before
>> undocking.
>
> Wouldn't the proper fix be to call ata_acpi_handle_hotplug _somewhere_?
> (which is currently called nowhere AFAICS)
It should be called via ata_acpi_{ap|dev}_notify() callbacks installed
via acpi_install_notify_handler(). Can you add dump_stack() in the
function and verify that it actually is being called? It could be that
the method is called too late or libata takes too long to actually
unplug the device. Hmmm... It seems what ata_acpi_handle_hotplug() does
isn't enough for undock. It probably should request detaching the
device instead of just notifying hotplug event. Anyways, please lemme
know whether and when the function is called.
> Anyway, kernel hackers keep telling me that the kernel should just do the
> right thing. Shouldn't userspace never be able to freeze the system?
Yeah, I think most things should be done automatically but it's true
that somethings are a bit awkward to handle in kernel. Also, if you're
root, you can almost always crash the machine from userland.
> It's completely ok for me to handle this from userspace, if that's the
> position of the libata developers.
Let's see whether we can fix the ACPI handler first.
> In this case, we should change the dock driver to default to
> immediate_undock=false, because otherwise it's far too risky to freeze the
> system.
I'm not too familiar with how docks work. Can you please explain
briefly what immediate_undock is?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-02-11 11:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 19:55 Holger Macht
2008-02-11 2:37 ` Tejun Heo
2008-02-11 10:04 ` Holger Macht
2008-02-11 11:16 ` Tejun Heo [this message]
2008-02-11 11:28 ` Holger Macht
2008-02-11 13:11 ` Tejun Heo
2008-02-11 14:06 ` Holger Macht
2008-02-11 23:31 ` Tejun Heo
2008-02-14 12:42 ` Holger Macht
2008-02-11 11:25 ` Alan Cox
2008-02-11 10:29 ` Holger Macht
2008-02-11 10:49 ` Tejun Heo
2008-02-11 11:32 ` Alan Cox
2008-02-11 11:50 ` Alan Cox
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=47B02E96.4050900@gmail.com \
--to=htejun@gmail.com \
--cc=alan@redhat.com \
--cc=jeff@garzik.org \
--cc=kristen.c.accardi@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system' \
/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
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).