From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, jeff@garzik.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-sff: PCI IRQ handling fix
Date: Wed, 09 Jan 2008 11:38:22 +0900 [thread overview]
Message-ID: <4784339E.2090604@gmail.com> (raw)
In-Reply-To: <20080103172228.0e091daf@lxorguk.ukuu.org.uk>
Alan Cox wrote:
> It is legitimate (although annoying and silly) for a PCI IDE controller
> not to be assigned an interrupt and to be polled. The libata-sff code
> should therefore not try and request IRQ 0 in this case.
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/drivers/ata/libata-sff.c linux-2.6.24-rc6-mm1/drivers/ata/libata-sff.c
> --- linux.vanilla-2.6.24-rc6-mm1/drivers/ata/libata-sff.c 2008-01-02 16:04:19.000000000 +0000
> +++ linux-2.6.24-rc6-mm1/drivers/ata/libata-sff.c 2008-01-02 16:12:39.000000000 +0000
> @@ -808,7 +808,10 @@
> if (rc)
> goto err_out;
>
> - if (!legacy_mode) {
> + if (!legacy_mode && pdev->irq) {
> + /* We may have no IRQ assigned in which case we can poll. This
> + shouldn't happen on a sane system but robustness is cheap
> + in this case */
> rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler,
> IRQF_SHARED, DRV_NAME, host);
> if (rc)
> @@ -816,7 +819,7 @@
>
> ata_port_desc(host->ports[0], "irq %d", pdev->irq);
> ata_port_desc(host->ports[1], "irq %d", pdev->irq);
> - } else {
> + } else if (legacy_mode) {
I would prefer to put if (pdev->irq) inside if (!legacy_mode) but that's
nothing major.
Acked-by: Tejun Heo <htejun@gmail.com>
--
tejun
next prev parent reply other threads:[~2008-01-09 2:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 17:22 [PATCH] libata-sff: PCI IRQ handling fix Alan Cox
2008-01-09 2:38 ` Tejun Heo [this message]
2008-01-10 21:54 ` Jeff Garzik
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=4784339E.2090604@gmail.com \
--to=htejun@gmail.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.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 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).