* [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
@ 2020-05-30 7:35 Christophe JAILLET
2020-05-30 9:43 ` Russell King - ARM Linux admin
2020-06-25 20:47 ` Christophe JAILLET
0 siblings, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-05-30 7:35 UTC (permalink / raw)
To: linux, jejb, martin.petersen
Cc: Christophe JAILLET, kernel-janitors, linux-scsi,
linux-arm-kernel, linux-kernel
The dev_id used in 'request_irq()' and 'free_irq()' should match.
So use 'host' in both cases.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/scsi/arm/cumana_2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 65691c21f133..3a3bf53fa925 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -426,7 +426,7 @@ static int cumanascsi2_probe(struct expansion_card *ec,
goto out_free;
ret = request_irq(ec->irq, cumanascsi_2_intr,
- 0, "cumanascsi2", info);
+ 0, "cumanascsi2", host);
if (ret) {
printk("scsi%d: IRQ%d not free: %d\n",
host->host_no, ec->irq, ret);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
2020-05-30 7:35 [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()' Christophe JAILLET
@ 2020-05-30 9:43 ` Russell King - ARM Linux admin
2020-05-30 10:41 ` Marion & Christophe JAILLET
2020-06-25 20:47 ` Christophe JAILLET
1 sibling, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2020-05-30 9:43 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-scsi, martin.petersen, jejb, kernel-janitors, linux-kernel,
linux-arm-kernel
On Sat, May 30, 2020 at 09:35:55AM +0200, Christophe JAILLET wrote:
> The dev_id used in 'request_irq()' and 'free_irq()' should match.
> So use 'host' in both cases.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
This is itself wrong. cumanascsi_2_intr() requires "info" as the devid.
Either cumanascsi_2_intr() needs changing to use shost_priv(host) along
with this change, or free_irq() needs changing to use "info".
Likely the same for the other patches, I haven't looked.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 424kbps up
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
2020-05-30 9:43 ` Russell King - ARM Linux admin
@ 2020-05-30 10:41 ` Marion & Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Marion & Christophe JAILLET @ 2020-05-30 10:41 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: linux-scsi, martin.petersen, jejb, kernel-janitors, linux-kernel,
linux-arm-kernel
Le 30/05/2020 à 11:43, Russell King - ARM Linux admin a écrit :
> On Sat, May 30, 2020 at 09:35:55AM +0200, Christophe JAILLET wrote:
>> The dev_id used in 'request_irq()' and 'free_irq()' should match.
>> So use 'host' in both cases.
>>
>> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> This is itself wrong. cumanascsi_2_intr() requires "info" as the devid.
> Either cumanascsi_2_intr() needs changing to use shost_priv(host) along
> with this change, or free_irq() needs changing to use "info".
My bad.
I've only looked at the difference of the dev_id for the 2 functions,
not at the usage of it with the function registered by 'request_irq'.
This one is obviously correct, or the driver would have some problems
somewhere.
I don't know why have chosen to change request_irq and not free_irq.
So obvious. I'm a little embarrassed and will send a v2.
Thx for the quick reply and review.
All the 3 patches being in "/drivers/scsi/arm/", do you prefer only 1
patch for the 3, or separated as I've done so far?
CJ
> Likely the same for the other patches, I haven't looked.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
2020-05-30 7:35 [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()' Christophe JAILLET
2020-05-30 9:43 ` Russell King - ARM Linux admin
@ 2020-06-25 20:47 ` Christophe JAILLET
2020-06-25 23:10 ` Russell King - ARM Linux admin
2020-06-27 3:09 ` Martin K. Petersen
1 sibling, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-06-25 20:47 UTC (permalink / raw)
To: linux, jejb, martin.petersen
Cc: Christophe JAILLET, kernel-janitors, linux-scsi,
linux-arm-kernel, linux-kernel
The dev_id used in 'request_irq()' and 'free_irq()' should match.
Use 'info' in both cases.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
V2: update free_irq instead of request_irq in order not to obviously break
code
---
drivers/scsi/arm/cumana_2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 65691c21f133..29294f0ef8a9 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -450,7 +450,7 @@ static int cumanascsi2_probe(struct expansion_card *ec,
if (info->info.scsi.dma != NO_DMA)
free_dma(info->info.scsi.dma);
- free_irq(ec->irq, host);
+ free_irq(ec->irq, info);
out_release:
fas216_release(host);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
2020-06-25 20:47 ` Christophe JAILLET
@ 2020-06-25 23:10 ` Russell King - ARM Linux admin
2020-06-27 3:09 ` Martin K. Petersen
1 sibling, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2020-06-25 23:10 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-scsi, martin.petersen, jejb, kernel-janitors, linux-kernel,
linux-arm-kernel
On Thu, Jun 25, 2020 at 10:47:30PM +0200, Christophe JAILLET wrote:
> The dev_id used in 'request_irq()' and 'free_irq()' should match.
> Use 'info' in both cases.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Thanks Christophe.
> ---
> V2: update free_irq instead of request_irq in order not to obviously break
> code
> ---
> drivers/scsi/arm/cumana_2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
> index 65691c21f133..29294f0ef8a9 100644
> --- a/drivers/scsi/arm/cumana_2.c
> +++ b/drivers/scsi/arm/cumana_2.c
> @@ -450,7 +450,7 @@ static int cumanascsi2_probe(struct expansion_card *ec,
>
> if (info->info.scsi.dma != NO_DMA)
> free_dma(info->info.scsi.dma);
> - free_irq(ec->irq, host);
> + free_irq(ec->irq, info);
>
> out_release:
> fas216_release(host);
> --
> 2.25.1
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()'
2020-06-25 20:47 ` Christophe JAILLET
2020-06-25 23:10 ` Russell King - ARM Linux admin
@ 2020-06-27 3:09 ` Martin K. Petersen
1 sibling, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2020-06-27 3:09 UTC (permalink / raw)
To: jejb, Christophe JAILLET, linux
Cc: linux-arm-kernel, kernel-janitors, linux-scsi,
Martin K . Petersen, linux-kernel
On Thu, 25 Jun 2020 22:47:30 +0200, Christophe JAILLET wrote:
> The dev_id used in 'request_irq()' and 'free_irq()' should match.
> Use 'info' in both cases.
Applied to 5.9/scsi-queue, thanks!
[1/1] scsi: cumana_2: Fix different dev_id between request_irq() and free_irq()
https://git.kernel.org/mkp/scsi/c/040ab9c4fd00
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-27 3:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 7:35 [PATCH] scsi: cumana_2: Fix different dev_id between 'request_irq()' and 'free_irq()' Christophe JAILLET
2020-05-30 9:43 ` Russell King - ARM Linux admin
2020-05-30 10:41 ` Marion & Christophe JAILLET
2020-06-25 20:47 ` Christophe JAILLET
2020-06-25 23:10 ` Russell King - ARM Linux admin
2020-06-27 3:09 ` Martin K. Petersen
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).