public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: linux-ide@vger.kernel.org
Cc: Ben Dooks <ben-linux@fluff.org>
Subject: [patch 1/1] LIBATA: Allow devices without IRQ specified to fall back
Date: Wed, 23 Jul 2008 15:42:27 +0100	[thread overview]
Message-ID: <20080723144227.253944199@fluff.org> (raw)
In-Reply-To: 20080723144226.807475493@fluff.org

[-- Attachment #1: simtec/simtec-libata-deal-with-unmapped-irqs.patch --]
[-- Type: text/plain, Size: 1292 bytes --]

The Simtec CATS board is an example of an ALI M5229 that
is not correclty supported by libata as the pdev->irq field
has no valid interrupt set. This is due to the legacy IRQ
check in ata_pci_sff_activate_host() only checking to see 
if the device class is legacy, not that the IRQ has been
setup.

Change ata_pci_sff_activate_host() to try the legacy IRQ
numbers (which works correctly) when the dev->irq has not
been set. The current check for !legacy_mode && dev->irq
does not deal with devices that are not in legacy mode
but do not have mapped interrupts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.26-quilt2/drivers/ata/libata-sff.c
===================================================================
--- linux-2.6.26-quilt2.orig/drivers/ata/libata-sff.c	2008-07-23 15:11:36.000000000 +0100
+++ linux-2.6.26-quilt2/drivers/ata/libata-sff.c	2008-07-23 15:11:48.000000000 +0100
@@ -2702,7 +2702,7 @@ int ata_pci_sff_activate_host(struct ata
 
 		ata_port_desc(host->ports[0], "irq %d", pdev->irq);
 		ata_port_desc(host->ports[1], "irq %d", pdev->irq);
-	} else if (legacy_mode) {
+	} else if (legacy_mode || !pdev->irq) {
 		if (!ata_port_is_dummy(host->ports[0])) {
 			rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
 					      irq_handler, IRQF_SHARED,

-- 

       reply	other threads:[~2008-07-23 15:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080723144226.807475493@fluff.org>
2008-07-23 14:42 ` Ben Dooks [this message]
2008-07-23 15:32   ` [patch 1/1] LIBATA: Allow devices without IRQ specified to fall back Alan Cox
2008-07-23 19:04     ` Ben Dooks
2008-07-23 19:13       ` Alan Cox
2008-07-24 11:26         ` Ben Dooks
2008-07-24 11:13           ` Alan Cox
2008-07-24 11:50             ` Ben Dooks
2008-07-24 11:59               ` Alan Cox
2008-07-24 13:50                 ` Ben Dooks
2008-07-24 13:52                   ` Alan Cox
2008-07-24 14:17                     ` Ben Dooks
2008-07-24 14:05                       ` Alan Cox
2008-07-24 16:12                       ` Bartlomiej Zolnierkiewicz
2008-07-24 16:06                         ` Alan Cox
2008-07-24 17:05                           ` Bartlomiej Zolnierkiewicz
2008-07-24 17:23                             ` Alan Cox
2008-07-24 11:14           ` Alan Cox
2008-07-24 11:50             ` Ben Dooks
2008-07-24 11:58               ` Alan Cox
2008-07-24 13:52                 ` Ben Dooks
2008-07-24 14:33                   ` Alan Cox
2008-07-24 15:24                     ` Ben Dooks
2008-07-24 15:26                       ` Alan Cox

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=20080723144227.253944199@fluff.org \
    --to=ben-linux@fluff.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