From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: albertl@mail.com, Erik Mouw <erik@harddisk-recovery.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-ide@vger.kernel.org, rene.herman@keyaccess.nl,
Unicorn Chang <uchang@tw.ibm.com>, Doug Maxey <dwm@maxeymade.com>,
Tejun Heo <htejun@gmail.com>
Subject: Re: [PATCH/RFC 0/2] libata: legacy mode fixes
Date: Tue, 30 May 2006 11:36:33 +0800 [thread overview]
Message-ID: <447BBDC1.8070300@tw.ibm.com> (raw)
In-Reply-To: <44779702.5070407@pobox.com>
Jeff Garzik wrote:
> Albert Lee wrote:
>
>> Dear all,
>>
>> Description:
>> This is the revised patch by Unicorn and I for legacy mode fix.
>>
>> patch 1/2: make both legacy ports share one host_set.
>> patch 2/2: remove the unused ap->hard_port_no.
>
>
> Unfortunately, NAK.
>
> While it would be nice to eventually share one host_set, your patch
> demonstrates the hacks that must be added to the hot path, to deal with
> two separate interrupt handlers trying to share the same host_set.
>
> Additionally, neither this email nor the two patches describes the
> problem you are trying to fix, and how these changes fix that problem.
Sorry for not describing the problem properly. There are two problems
related to "each legacy port has its own host_set":
1. When the LLDD module with legacy ports is unloaded, only
irq 15 is freed while irq 14 is not. So, when the LLDD module
is reloaded, it cannot get irq 14 non-shared and fails to load.
2. For simplex device in legacy mode, both primary and secondary
legacy port will get the DMA engine because the ATA_HOST_SIMPLEX
flag is available in the host_sets of each legacy port.
The patch tries to fix the probems by
1. Let both legacy ports share the same host_set (fix for problem 2).
2. Add per port irq to ata_ioports for legacy irq 14/15 since
host_set is shared now.
3. Add irq handler hack to support both per-port legacy irq and
per adapter shared irq cases.
>
> The correct solution, long term, is
> 1) move the irq registration (request_irq, free_irq) out of
> ata_device_add(). The current design was convenient initially, but I
> have known since I wrote the code that it was insufficient, long term.
>
> The best solution is to give each LLDD the ability to register an
> interrupt handler in a manner best suited to the hardware. Consider,
> for example, how poorly the current design will work on PCI MSI-X hardware.
Hmm, you're right.
>
> 2) For legacy mode hardware, one should pass struct ata_port* to
> request_irq(), rather then struct ata_host_set*. Thus in the legacy ATA
> interrupt handler, obtain the host_set via ap->host_set.
>
Thanks for the advice. Will revise the patch accordingly.
--
albert
prev parent reply other threads:[~2006-05-30 3:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 16:50 2.6.17-rc4 + libata-pata Oops while reloading pata_amd module Erik Mouw
2006-05-26 5:39 ` Albert Lee
2006-05-26 5:58 ` [PATCH/RFC 0/2] libata: legacy mode fixes Albert Lee
2006-05-26 6:28 ` [PATCH/RFC 1/2] libata: make both legacy ports share one host_set Albert Lee
2006-05-26 6:33 ` [PATCH/RFC 2/2] libata: replace ap->hard_port_no with ap->port_no Albert Lee
2006-05-27 0:02 ` [PATCH/RFC 0/2] libata: legacy mode fixes Jeff Garzik
2006-05-30 3:36 ` Albert Lee [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=447BBDC1.8070300@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertl@mail.com \
--cc=dwm@maxeymade.com \
--cc=erik@harddisk-recovery.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=rene.herman@keyaccess.nl \
--cc=uchang@tw.ibm.com \
/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.