[PATCH 0/1] [RFC] Commodore's Gayle pcmcia driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is a second attempt to get the PCMCIA side of Gayle's to work: it merges my
previous attempt[1], some historical (e.g. v2.6.10 era) work from Kars de
Jong[2](the set_io_map() and set_mem_map() are a blatant cut&paste), and it
follows the NetBSD code[3] (when it made sense) - credit goes where credit is due.

The good news first:

if you have a pcnet_cs or fmvj18x_cs PCMCIA eth card, chances are
it will work (i've 3 of them working here).

And now the bad one:

1) 3c589_cs (3COM Etherlink III): card is detected, it receives incoming packets
(eth0 counter increases) but TX fails

2) axnet_cs: card is detected, but as soon as i try to up it, it errors out
("axnet_cs 0.0 eth0: Hw. address read/write mismap X")

3) pata_pcmcia (no name CF to PCMCIA adapter): it's recognized, but fails to
attach ("pata_pcmcia 0.0: probe with driver pata_pcmcia failed with error
-12") - looking a bit closer, it fails in pcmcia_init_one() when:

 io_addr = devm_ioport_map(&pdev->dev, io_base, 8);

just notice that devm_ioport_unmap() is not implemented if CONFIG_HAS_IOPORT_MAP
is not set (and M68K doesn't implement it).

And, finally, the extremly sad part:

1) i've forced the word and long I/O helpers to be little endian, and this is
clearly a big no (see io_mm.h).

2) for the love of me, i couldn't figure out the proper way of acking an incoming
interrupt on IRQ_AMIGA_PORTS at Gayle's level (and subsequenlty call all
PCMCIA's card handlers registered), so i resorted to an ugly hack: i registered
a dummy hanlder on IRQ_AMIGA_PORTS, checked for GAYLE_IRQ_IRQ, cleared the
interrupt at Gayle's level, and then returned IRQ_NONE so the remaining handlers
registered on IRQ_AMIGA_PORTS could be invoked - see gayle_irq_dummy().

3) the get_status() and set_socket() are pretty barebone, but that is
intentional since, so far, i couldn't find a case where implementing all SS
states made any difference.

If you want to see what's going on under the hood, stick a:

ccflags-y += -DDEBUG

in drivers/pcmcia/Makefile and rebuild your kernel.

Let me know what you think.

1: https://www.spinics.net/lists/linux-m68k/msg25982.html
2: https://dpaste.com//GYSLEKLLM and https://dpaste.com//EQE56PPSU
3: https://github.com/NetBSD/src/blob/trunk/sys/arch/amiga/dev/gayle_pcmcia.c

Paolo Pisati (1):
  pcmcia: socket driver for Commodore's Gayle

 arch/m68k/amiga/pcmcia.c          |  59 ++++++
 arch/m68k/amiga/platform.c        |  29 +++
 arch/m68k/include/asm/amipcmcia.h |  20 ++
 arch/m68k/include/asm/io_mm.h     |  20 +-
 drivers/pcmcia/Kconfig            |   9 +
 drivers/pcmcia/Makefile           |   1 +
 drivers/pcmcia/gayle.c            | 303 ++++++++++++++++++++++++++++++
 7 files changed, 437 insertions(+), 4 deletions(-)
 create mode 100644 drivers/pcmcia/gayle.c

-- 
2.34.1





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux