Discussion:
[PATCH] USB: isp116x: Fix EtherNAT if !CONFIG_ATARI_ROM_ISA
Geert Uytterhoeven
2014-09-14 09:39:20 UTC
Permalink
Commit eece8a651c96a2a3 ("USB: isp116x: isa_rom_*() calls should depend
on CONFIG_ATARI_ROM_ISA") broke USB on EtherNAT if CONFIG_ATARI_ROM_ISA
is not set, as USB on EtherNAT requires byte-swapped I/O accessors.

Add a separate #elif section for Atari without ROM port ISA to fix this.

Signed-off-by: Geert Uytterhoeven <***@linux-m68k.org>
---
To be folded into "m68k/atari: USB - add ISP1160 USB host controller
support"
---
drivers/usb/host/isp116x.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/usb/host/isp116x.h b/drivers/usb/host/isp116x.h
index 634258df159b..adebe0251574 100644
--- a/drivers/usb/host/isp116x.h
+++ b/drivers/usb/host/isp116x.h
@@ -369,6 +369,14 @@ struct isp116x_ep {
#define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
#define isp_raw_readw(p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_readw(__pa(p)) : readw((p)))
#define isp_raw_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew((v), __pa(p)) : writew((v), (p)))
+#elif defined(CONFIG_ATARI)
+ /*
+ * 16 bit data bus byte swapped in hardware on EtherNAT only.
+ */
+#define isp_readw __raw_readw
+#define isp_writew __raw_writew
+#define isp_raw_readw readw
+#define isp_raw_writew writew
#else
/* sane hardware */
#define isp_readw readw
--
1.9.1
Geert Uytterhoeven
2014-09-28 09:39:14 UTC
Permalink
On Sun, Sep 14, 2014 at 11:39 AM, Geert Uytterhoeven
Post by Geert Uytterhoeven
Commit eece8a651c96a2a3 ("USB: isp116x: isa_rom_*() calls should depend
on CONFIG_ATARI_ROM_ISA") broke USB on EtherNAT if CONFIG_ATARI_ROM_ISA
is not set, as USB on EtherNAT requires byte-swapped I/O accessors.
Add a separate #elif section for Atari without ROM port ISA to fix this.
---
To be folded into "m68k/atari: USB - add ISP1160 USB host controller
support"
Applied to master, folded on m68k-queue.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ***@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
Michael Schmitz
2014-09-29 12:08:47 UTC
Permalink
HI Geert,
Post by Geert Uytterhoeven
On Sun, Sep 14, 2014 at 11:39 AM, Geert Uytterhoeven
Post by Geert Uytterhoeven
Commit eece8a651c96a2a3 ("USB: isp116x: isa_rom_*() calls should depend
on CONFIG_ATARI_ROM_ISA") broke USB on EtherNAT if CONFIG_ATARI_ROM_ISA
is not set, as USB on EtherNAT requires byte-swapped I/O accessors.
Add a separate #elif section for Atari without ROM port ISA to fix this.
---
To be folded into "m68k/atari: USB - add ISP1160 USB host controller
support"
Applied to master, folded on m68k-queue.
Thanks, I'll get the EtherNAT driver tested in a month ot two hopefully,
so this can finally be all merged upstream.

Cheers,

Michael
Post by Geert Uytterhoeven
Gr{oetje,eeting}s,
Geert
--
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
Loading...