From: Paolo Pisati <p.pisati@gmail.com>
To: linux-m68k <linux-m68k@vger.kernel.org>
Cc: Kars de Jong <jongk@linux-m68k.org>
Subject: [PATCH 0/1] [RFC] Commodore's Gayle pcmcia driver
Date: Sun, 12 Jan 2025 16:05:41 +0100 [thread overview]
Message-ID: <20250112150542.413179-1-p.pisati@gmail.com> (raw)
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
next reply other threads:[~2025-01-12 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-12 15:05 Paolo Pisati [this message]
2025-01-12 15:05 ` [PATCH 1/1] pcmcia: socket driver for Commodore's Gayle Paolo Pisati
2025-01-13 8:04 ` [PATCH 0/1] [RFC] Commodore's Gayle pcmcia driver Geert Uytterhoeven
2025-01-16 10:26 ` Paolo Pisati
2025-01-16 10:37 ` Geert Uytterhoeven
2025-01-16 16:37 ` Paolo Pisati
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250112150542.413179-1-p.pisati@gmail.com \
--to=p.pisati@gmail.com \
--cc=jongk@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox