From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <tj@kernel.org>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
Mark Lord <liml@rtr.ca>, Elias Oltmanns <eo@nebensachen.de>
Subject: Re: [PATCH #upstream 1/3] libata: beef up iterators
Date: Tue, 11 Nov 2008 03:18:57 -0500 [thread overview]
Message-ID: <49193FF1.90708@garzik.org> (raw)
In-Reply-To: <490EDA75.5060703@kernel.org>
Tejun Heo wrote:
> There currently are the following looping constructs.
>
> * __ata_port_for_each_link() for all available links
> * ata_port_for_each_link() for edge links
> * ata_link_for_each_dev() for all devices
> * ata_link_for_each_dev_reverse() for all devices in reverse order
>
> Now there's a need for looping construct which is similar to
> __ata_port_for_each_link() but iterates over PMP links before the host
> link. Instead of adding another one with long name, do the following
> cleanup.
>
> * Implement and export ata_link_next() and ata_dev_next() which take
> @mode parameter and can be used to build custom loop.
> * Implement ata_for_each_link() and ata_for_each_dev() which take
> looping mode explicitly.
>
> The following iteration modes are implemented.
>
> * ATA_LITER_EDGE : loop over edge links
> * ATA_LITER_HOST_FIRST : loop over all links, host link first
> * ATA_LITER_PMP_FIRST : loop over all links, PMP links first
>
> * ATA_DITER_ENABLED : loop over enabled devices
> * ATA_DITER_ENABLED_REVERSE : loop over enabled devices in reverse order
> * ATA_DITER_ALL : loop over all devices
> * ATA_DITER_ALL_REVERSE : loop over all devices in reverse order
>
> This change removes exlicit device enabledness checks from many loops
> and makes it clear which ones are iterated over in which direction.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> Comments added and retargeted for #upstream.
>
> This patchset is on top of
>
> #upstream-fixes (9ce8e3073d9cfd6f859c22a25441db41b85cbf6e)
> + [1] patches-which-fell-off-the-crack-during-maintainership-handover patchset
> + [2] mask-off-DET-when-restoring-SControl-for-detach
>
> [1] http://thread.gmane.org/gmane.linux.ide/35783
> [2] http://article.gmane.org/gmane.linux.ide/35792
applied to newly created #upstream (on top of just-sent #upstream-fixes)
prev parent reply other threads:[~2008-11-11 8:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 11:03 [PATCH #upstream 1/3] libata: beef up iterators Tejun Heo
2008-11-03 11:03 ` [PATCH #upstream 2/3] libata: when restoring SControl during detach do the PMP links first Tejun Heo
2008-11-03 11:04 ` [PATCH #upstream 3/3] libata: perform port detach in EH Tejun Heo
2008-11-11 8:18 ` Jeff Garzik [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=49193FF1.90708@garzik.org \
--to=jeff@garzik.org \
--cc=eo@nebensachen.de \
--cc=liml@rtr.ca \
--cc=linux-ide@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).