* [PATCH] libata-sff: PCI IRQ handling fix
@ 2008-01-03 17:22 Alan Cox
2008-01-09 2:38 ` Tejun Heo
2008-01-10 21:54 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Alan Cox @ 2008-01-03 17:22 UTC (permalink / raw)
To: akpm, jeff, linux-ide
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) {
if (!ata_port_is_dummy(host->ports[0])) {
rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
pi->port_ops->irq_handler,
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] libata-sff: PCI IRQ handling fix
2008-01-03 17:22 [PATCH] libata-sff: PCI IRQ handling fix Alan Cox
@ 2008-01-09 2:38 ` Tejun Heo
2008-01-10 21:54 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2008-01-09 2:38 UTC (permalink / raw)
To: Alan Cox; +Cc: akpm, jeff, linux-ide
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] libata-sff: PCI IRQ handling fix
2008-01-03 17:22 [PATCH] libata-sff: PCI IRQ handling fix Alan Cox
2008-01-09 2:38 ` Tejun Heo
@ 2008-01-10 21:54 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-01-10 21:54 UTC (permalink / raw)
To: Alan Cox; +Cc: akpm, linux-ide
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>
applied #upstream-fixes (2.6.24)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-10 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 17:22 [PATCH] libata-sff: PCI IRQ handling fix Alan Cox
2008-01-09 2:38 ` Tejun Heo
2008-01-10 21:54 ` Jeff Garzik
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).