From: Vincent Pelletier <plr.vincent@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org,
"Csaba Halász" <csaba.halasz@gmail.com>,
"Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>
Subject: Re: [PATCH] make ata_exec_internal_sg honor DMADIR
Date: Mon, 20 May 2013 12:51:20 +0200 [thread overview]
Message-ID: <201305201251.20920.plr.vincent@gmail.com> (raw)
In-Reply-To: <20130520073012.GA24222@mtj.dyndns.org>
Hello,
Le lundi 20 mai 2013 09:30:12, Tejun Heo a écrit :
> > Unplugging the drive would, in my understanding, loose the setting if
> > stored at the device level. Is there another way to trigger a new
> > initialisation attempt after changing the setting ?
> > Should I add a "rescan" device attribute ?
>
> But isn't that what we want? We don't really know to which side the
> bridge is attached but given SATA supports hotplug while PATA doesn't,
> it's natural to assume the bridge to be part of the device rather than
> bus and reset the state on device hotplug, no?
Semantically, I agree that the bridge is part of the device.
Putting the knob on the port is just a way I thought about to hold the
configuration before the drive is plugged into the system (because so far I
was focussed on host-side being hot-pluggable, I indeed didn't consider the
opposite situation) so it can be used before libata tries to access the
device.
So it would be something like:
- plug device (or boot up)
-> detection times out, device "half" configured (sysfs node present, drive
not usable)
- cd $DEVICE_IN_SYSFS
- echo 1 > atapi_dmadir
- echo 1 > (rescan|reinit|...)
If it's ok, I'll write a patch to add a rescan write-only file (will also be
independent from the 2 other patches).
I'll certainly need a few days to get it though: I feel I'll have some
difficulty finding the right function to call, and to call it correctly (I
feel interrupt handler & locking, which I'm not familiar with at kernel
level). Pointers welcome !
Regards,
--
Vincent Pelletier
next prev parent reply other threads:[~2013-05-20 10:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 18:17 [PATCH] make ata_exec_internal_sg honor DMADIR Csaba Halász
2013-05-12 10:13 ` Vincent Pelletier
2013-05-14 19:06 ` Tejun Heo
2013-05-17 17:20 ` Vincent Pelletier
2013-05-17 18:47 ` Tejun Heo
2013-05-19 13:31 ` Vincent Pelletier
2013-05-19 23:38 ` Tejun Heo
2013-05-20 6:20 ` Vincent Pelletier
2013-05-20 7:30 ` Tejun Heo
2013-05-20 10:51 ` Vincent Pelletier [this message]
2013-05-20 18:59 ` Tejun Heo
2013-05-20 20:43 ` Vincent Pelletier
2013-05-20 22:02 ` Tejun Heo
2013-05-21 20:37 ` Vincent Pelletier
2013-05-21 23:32 ` [PATCH 1/2] libata: " Tejun Heo
2013-05-21 23:35 ` [PATCH 2/2] libata: Add atapi_dmadir force flag 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=201305201251.20920.plr.vincent@gmail.com \
--to=plr.vincent@gmail.com \
--cc=csaba.halasz@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=tj@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