From: Tejun Heo <tj@kernel.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-ide@vger.kernel.org
Subject: Re: libata hotplug question
Date: Tue, 01 Dec 2009 08:46:43 +0900 [thread overview]
Message-ID: <4B145963.6080406@kernel.org> (raw)
In-Reply-To: <1259561052.2076.73.camel@pasglop>
Hello,
On 11/30/2009 03:04 PM, Benjamin Herrenschmidt wrote:
> Now, for libata, I haven't totally figured out what to do though.
>
> It seems like when the state "changes", I can do something like ahci and
> call ata_ehi_hotplugged() followed by something like ata_port_freeze()
> to kick the EH... at least that's my rough understanding.
Yeap, that should be enough.
> But I don't quite get how to inform libata that the part has or has not
> something plugged in it. I thought about playing with the probe_mask but
> it looks like ata_eh_link_autopsy() will reset that since I'm PATA, not
> SATA and thus have no sata_scr_read()...
No, it won't reset the mask. It will only reset if SCR read failed
with errors other than -EOPNOTSUPP. If your driver isn't implementing
SCR access, it will fail with -EOPNOTSUPP. Also, if SCR access fails,
autopsy dosen't clear probe_mask, it sets all bits there forcing
recovery part to full probing.
Anyways, setting probe_mask (if you don't know which is gone, setting
all bits works fine) and calling ata_port_freeze() is enough. The
actual hot plug/unlpug path is the same as boot probing path, so
there's nothing more to do there.
Thanks.
--
tejun
prev parent reply other threads:[~2009-11-30 23:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 6:04 libata hotplug question Benjamin Herrenschmidt
2009-11-30 23:44 ` Benjamin Herrenschmidt
2009-11-30 23:48 ` Tejun Heo
2009-12-01 0:05 ` Benjamin Herrenschmidt
2009-12-01 2:43 ` Benjamin Herrenschmidt
2009-12-01 4:51 ` Tejun Heo
2009-12-01 5:24 ` Benjamin Herrenschmidt
2009-12-01 5:17 ` Benjamin Herrenschmidt
2009-12-01 5:22 ` Tejun Heo
2009-12-01 5:30 ` Benjamin Herrenschmidt
2009-12-01 5:34 ` Tejun Heo
2009-12-01 5:39 ` Benjamin Herrenschmidt
2009-12-01 5:57 ` Benjamin Herrenschmidt
2009-12-01 5:35 ` Benjamin Herrenschmidt
2009-11-30 23:46 ` Tejun Heo [this message]
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=4B145963.6080406@kernel.org \
--to=tj@kernel.org \
--cc=benh@kernel.crashing.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.