diff mbox series

[v3,2/4] fix an IRQ0 interrupt issue in arasan pata driver

Message ID 20181106024239.7935-2-chaohong.guo@intel.com
State Not Applicable
Delegated to: David Miller
Headers show
Series [v3,1/4] Allow system to allocate IRQ 0 to ATA devices | expand

Commit Message

Guo, Chaohong Nov. 6, 2018, 2:42 a.m. UTC
Interrupt vector 0 is valid on some platform. arasan driver wrongly
treated interrupt vector 0 as invalid. We fix it in libata, and fix it
in this driver as well.

Signed-off-by: Chaohong guo <chaohong.guo@intel.com>
---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sergei Shtylyov Nov. 6, 2018, 2:48 p.m. UTC | #1
Hello!

   The subject should rather be smth like "pata_arasan_cf: allow IRQ0".

On 11/06/2018 05:42 AM, Chaohong guo wrote:

> Interrupt vector 0 is valid on some platform. arasan driver wrongly
> treated interrupt vector 0 as invalid. We fix it in libata, and fix it
> in this driver as well.
> 
> Signed-off-by: Chaohong guo <chaohong.guo@intel.com>

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei
Sergei Shtylyov Nov. 7, 2018, 11:29 a.m. UTC | #2
On 11/06/2018 05:42 AM, Chaohong guo wrote:

> Interrupt vector 0 is valid on some platform. arasan driver wrongly
> treated interrupt vector 0 as invalid. We fix it in libata, and fix it

   Moreover, it treats error (acdev->irq < 0) as a valid IRQ. 

> in this driver as well.
> 
> Signed-off-by: Chaohong guo <chaohong.guo@intel.com>
[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index ebecab8c3f36..133c7466a875 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -817,9 +817,9 @@  static int arasan_cf_probe(struct platform_device *pdev)
 	else
 		quirk = CF_BROKEN_UDMA; /* as it is on spear1340 */
 
-	/* if irq is 0, support only PIO */
+	/* if irq < 0, support only PIO */
 	acdev->irq = platform_get_irq(pdev, 0);
-	if (acdev->irq)
+	if (acdev->irq >= 0)
 		irq_handler = arasan_cf_interrupt;
 	else
 		quirk |= CF_BROKEN_MWDMA | CF_BROKEN_UDMA;