linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers
@ 2024-10-03  3:29 Finn Thain
  2024-11-01 23:35 ` Daniel Palmer
  2024-11-05 11:30 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Finn Thain @ 2024-10-03  3:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Daniel Palmer, stable, linux-m68k, linux-kernel

From: Daniel Palmer <daniel@0x0f.com>

Sometime long ago the m68k IRQ code was refactored and the interrupt
numbers for SCSI controller on this board ended up wrong, and it hasn't
worked since.

The PCC adds 0x40 to the vector for its interrupts so they end up in
the user interrupt range. Hence, the kernel number should be the kernel
offset for user interrupt range + the PCC interrupt number.

Cc: Daniel Palmer <daniel@0x0f.com>
Cc: stable@kernel.org
Fixes: 200a3d352cd5 ("[PATCH] m68k: convert VME irq code")
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Reviewed-by: Finn Thain <fthain@linux-m68k.org>
---
 arch/m68k/include/asm/mvme147hw.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/include/asm/mvme147hw.h b/arch/m68k/include/asm/mvme147hw.h
index 2b147ab1d189..6ad93bac06f9 100644
--- a/arch/m68k/include/asm/mvme147hw.h
+++ b/arch/m68k/include/asm/mvme147hw.h
@@ -76,8 +76,8 @@ struct pcc_regs {
 #define M147_SCC_B_ADDR		0xfffe3000
 #define M147_SCC_PCLK		5000000
 
-#define MVME147_IRQ_SCSI_PORT	(IRQ_USER+0x45)
-#define MVME147_IRQ_SCSI_DMA	(IRQ_USER+0x46)
+#define MVME147_IRQ_SCSI_PORT	(IRQ_USER + 5)
+#define MVME147_IRQ_SCSI_DMA	(IRQ_USER + 6)
 
 /* SCC interrupts, for MVME147 */
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers
  2024-10-03  3:29 [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers Finn Thain
@ 2024-11-01 23:35 ` Daniel Palmer
  2024-11-05 11:30 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Palmer @ 2024-11-01 23:35 UTC (permalink / raw)
  To: Finn Thain; +Cc: Geert Uytterhoeven, stable, linux-m68k, linux-kernel

Hi all,

On Thu, 3 Oct 2024 at 12:32, Finn Thain <fthain@linux-m68k.org> wrote:
>
> From: Daniel Palmer <daniel@0x0f.com>
>
> Sometime long ago the m68k IRQ code was refactored and the interrupt
> numbers for SCSI controller on this board ended up wrong, and it hasn't
> worked since.
>
> The PCC adds 0x40 to the vector for its interrupts so they end up in
> the user interrupt range. Hence, the kernel number should be the kernel
> offset for user interrupt range + the PCC interrupt number.
>
> Cc: Daniel Palmer <daniel@0x0f.com>
> Cc: stable@kernel.org
> Fixes: 200a3d352cd5 ("[PATCH] m68k: convert VME irq code")
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> Reviewed-by: Finn Thain <fthain@linux-m68k.org>
> ---

The other part of this that fixes the SCSI driver itself is now merged
and backported to stable branches so it'd be nice to get this merged
too.

Thanks,

Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers
  2024-10-03  3:29 [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers Finn Thain
  2024-11-01 23:35 ` Daniel Palmer
@ 2024-11-05 11:30 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-11-05 11:30 UTC (permalink / raw)
  To: Finn Thain; +Cc: Daniel Palmer, stable, linux-m68k, linux-kernel

On Thu, Oct 3, 2024 at 5:32 AM Finn Thain <fthain@linux-m68k.org> wrote:
> From: Daniel Palmer <daniel@0x0f.com>
>
> Sometime long ago the m68k IRQ code was refactored and the interrupt
> numbers for SCSI controller on this board ended up wrong, and it hasn't
> worked since.
>
> The PCC adds 0x40 to the vector for its interrupts so they end up in
> the user interrupt range. Hence, the kernel number should be the kernel
> offset for user interrupt range + the PCC interrupt number.
>
> Cc: Daniel Palmer <daniel@0x0f.com>
> Cc: stable@kernel.org
> Fixes: 200a3d352cd5 ("[PATCH] m68k: convert VME irq code")
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> Reviewed-by: Finn Thain <fthain@linux-m68k.org>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k tree for v6.13.

> --- a/arch/m68k/include/asm/mvme147hw.h
> +++ b/arch/m68k/include/asm/mvme147hw.h
> @@ -76,8 +76,8 @@ struct pcc_regs {
>  #define M147_SCC_B_ADDR                0xfffe3000
>  #define M147_SCC_PCLK          5000000
>
> -#define MVME147_IRQ_SCSI_PORT  (IRQ_USER+0x45)
> -#define MVME147_IRQ_SCSI_DMA   (IRQ_USER+0x46)
> +#define MVME147_IRQ_SCSI_PORT  (IRQ_USER + 5)
> +#define MVME147_IRQ_SCSI_DMA   (IRQ_USER + 6)

Indeed, in all other locations where IRQ_USER was added, 0x40 was
subtracted, but these two were missed during the conversion.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-05 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03  3:29 [PATCH] m68k: mvme147: Fix SCSI controller IRQ numbers Finn Thain
2024-11-01 23:35 ` Daniel Palmer
2024-11-05 11:30 ` Geert Uytterhoeven

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).