diff mbox series

[v3,3/4] fix an IRQ0 interrupt issue in falcon pata driver

Message ID 20181106024239.7935-3-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. falcon 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_falcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartlomiej Zolnierkiewicz Nov. 6, 2018, 10:53 a.m. UTC | #1
Hi,

On 11/06/2018 03:42 AM, Chaohong guo wrote:
> Interrupt vector 0 is valid on some platform. falcon 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>

This patch should be folded into patch #1 (otherwise it breaks
bisectability).

There are also other libata drivers using polling mode that need
updating: pata_palmld.c and pata_platform.c.

> ---
>  drivers/ata/pata_falcon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/pata_falcon.c b/drivers/ata/pata_falcon.c
> index 41e0d6a6cd05..a991053aee87 100644
> --- a/drivers/ata/pata_falcon.c
> +++ b/drivers/ata/pata_falcon.c
> @@ -171,7 +171,7 @@ static int pata_falcon_init_one(void)
>  		      (unsigned long)base + ATA_HD_CONTROL);
>  
>  	/* activate */
> -	return ata_host_activate(host, 0, NULL, 0, &pata_falcon_sht);
> +	return ata_host_activate(host, -1, NULL, 0, &pata_falcon_sht);
>  }
>  
>  module_init(pata_falcon_init_one);

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Sergei Shtylyov Nov. 6, 2018, 3:04 p.m. UTC | #2
On 11/06/2018 01:53 PM, Bartlomiej Zolnierkiewicz wrote:

>> Interrupt vector 0 is valid on some platform. falcon 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>
> 
> This patch should be folded into patch #1 (otherwise it breaks
> bisectability).
> 
> There are also other libata drivers using polling mode that need
> updating: pata_palmld.c and pata_platform.c.

   Looks like there'd be a more subtle breaksage in sata_mv.c with the DT case --
we need to translate 0 returned from irq_of_parse_and_map() to a error code like
-EINVAL... else we'd register IRQ0 when there's no IRQ.

[...]
> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics

MBR, Sergei
Sergei Shtylyov Nov. 6, 2018, 3:06 p.m. UTC | #3
On 11/06/2018 05:42 AM, Chaohong guo wrote:

> Interrupt vector 0 is valid on some platform. falcon 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_falcon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/pata_falcon.c b/drivers/ata/pata_falcon.c
> index 41e0d6a6cd05..a991053aee87 100644
> --- a/drivers/ata/pata_falcon.c
> +++ b/drivers/ata/pata_falcon.c
> @@ -171,7 +171,7 @@ static int pata_falcon_init_one(void)
>  		      (unsigned long)base + ATA_HD_CONTROL);
>  
>  	/* activate */
> -	return ata_host_activate(host, 0, NULL, 0, &pata_falcon_sht);
> +	return ata_host_activate(host, -1, NULL, 0, &pata_falcon_sht);

   I'd prefer smth like -EINVAL to -1.

MBR, Sergei
Sergei Shtylyov Nov. 6, 2018, 3:08 p.m. UTC | #4
On 11/06/2018 05:42 AM, Chaohong guo wrote:

> Interrupt vector 0 is valid on some platform. falcon 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>

   Oops, Bart and I missed this -- there should be no spaces before the patch tags.

[...]

MBR, Sergei
Sergei Shtylyov Nov. 7, 2018, 4:29 p.m. UTC | #5
On 11/06/2018 06:04 PM, Sergei Shtylyov wrote:

>>> Interrupt vector 0 is valid on some platform. falcon 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>
>>
>> This patch should be folded into patch #1 (otherwise it breaks
>> bisectability).
>>
>> There are also other libata drivers using polling mode that need
>> updating: pata_palmld.c and pata_platform.c.
> 
>    Looks like there'd be a more subtle breaksage in sata_mv.c with the DT case --
> we need to translate 0 returned from irq_of_parse_and_map() to a error code like
> -EINVAL... else we'd register IRQ0 when there's no IRQ.

   pata_samsung_cf.c also needs fixing in the same patch #1...

> [...]
>> Best regards,
>> --
>> Bartlomiej Zolnierkiewicz
>> Samsung R&D Institute Poland
>> Samsung Electronics

MBR, Sergei
Sergei Shtylyov Nov. 7, 2018, 4:56 p.m. UTC | #6
On 11/07/2018 07:29 PM, Sergei Shtylyov wrote:

>>>> Interrupt vector 0 is valid on some platform. falcon 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>
>>>
>>> This patch should be folded into patch #1 (otherwise it breaks
>>> bisectability).
>>>
>>> There are also other libata drivers using polling mode that need
>>> updating: pata_palmld.c and pata_platform.c.
>>
>>    Looks like there'd be a more subtle breaksage in sata_mv.c with the DT case --
>> we need to translate 0 returned from irq_of_parse_and_map() to a error code like
>> -EINVAL... else we'd register IRQ0 when there's no IRQ.
> 
>    pata_samsung_cf.c also needs fixing in the same patch #1...

   And pata_octeon_cf.c too...

>> [...]
>>> Best regards,
>>> --
>>> Bartlomiej Zolnierkiewicz
>>> Samsung R&D Institute Poland
>>> Samsung Electronics

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/ata/pata_falcon.c b/drivers/ata/pata_falcon.c
index 41e0d6a6cd05..a991053aee87 100644
--- a/drivers/ata/pata_falcon.c
+++ b/drivers/ata/pata_falcon.c
@@ -171,7 +171,7 @@  static int pata_falcon_init_one(void)
 		      (unsigned long)base + ATA_HD_CONTROL);
 
 	/* activate */
-	return ata_host_activate(host, 0, NULL, 0, &pata_falcon_sht);
+	return ata_host_activate(host, -1, NULL, 0, &pata_falcon_sht);
 }
 
 module_init(pata_falcon_init_one);