From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org, robbat2@gentoo.org
Subject: Re: [PATCH 2/2] [PATCH] ahci: honor PORTS_IMPL on ICH8s
Date: Fri, 06 Oct 2006 00:12:34 +0900 [thread overview]
Message-ID: <452520E2.9000802@gmail.com> (raw)
In-Reply-To: <4524EB91.1020303@pobox.com>
Jeff Garzik wrote:
> Tejun Heo wrote:
>> Some ICH8s use non-linear port mapping. ahci driver didn't use to
>> honor PORTS_IMPL and this made ports after hole nonfunctional. This
>> patch implements port mapping table and use it to handle non-linear
>> port mapping.
>>
>> As it's unknown whether other AHCIs implement PORTS_IMPL register
>> properly, new board id board_ahci_pi is added and selectively applied
>> to ICH8s. All other AHCIs continue to use linear mapping regardless
>> of PORTS_IMPL value.
>>
>> Signed-off-by: Tejun Heo <htejun@gmail.com>
>> Cc: Robin H. Johnson <robbat2@gentoo.org>
>
> I still disagree with the port mapping table. I want to preserve the
> direct index properties, and would rather see code fixed up such that
> assumptions where n_ports implies all lower ports are fixed.
I understand your concern but if you think about it, if you have
non-linear port mapping and wanna keep direct index property,
something's gotta give. There are three places to deal with the
mismatch - in LLD, libata or userland.
* LLD: this is what the current patch does and my favorite. It's
isolated, not too complex and easy to spot when something goes wrong.
* libata: we can implement non-linear mapping facility in core layer but
I'm doubtful it's worth the effort and complexity. Not many LLDs use
non-linear mapping and ones that do are likely to have peculiar properties.
* userland: this is how we currently handle busy legacy ports. Mark
them dummy and let the userland see that some ports aren't implemented.
This makes sense for legacy ports because they have fixed resources
and port numbers are bound to those resources. However, for ahci's
case, I think it will cause confusion as the port numbers don't have any
specific meaning and the BIOS and other OSes show them as contiguous ports.
So, my place of choice is in LLD. What do you think?
Thanks.
--
tejun
next prev parent reply other threads:[~2006-10-05 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-30 12:21 [PATCH 1/2] ahci: preserve PORTS_IMPL over host resets Tejun Heo
2006-09-30 12:22 ` [PATCH 2/2] [PATCH] ahci: honor PORTS_IMPL on ICH8s Tejun Heo
2006-09-30 16:13 ` Robin H. Johnson
2006-10-05 11:25 ` Jeff Garzik
2006-10-05 15:12 ` Tejun Heo [this message]
2006-10-05 11:27 ` [PATCH 1/2] ahci: preserve PORTS_IMPL over host resets Jeff Garzik
2006-10-05 15:02 ` 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=452520E2.9000802@gmail.com \
--to=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=robbat2@gentoo.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).