From: Michael Schmitz <schmitzmic@googlemail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org, debian-68k@lists.debian.org
Subject: Re: [PATCH 1/5] m68k/atari: EtherNAT - change number of Atari interrupts to make room for EtherNAT interrupts
Date: Wed, 04 Apr 2012 09:15:44 +1200 [thread overview]
Message-ID: <4F7B6880.9050605@gmail.com> (raw)
In-Reply-To: <CAOmrzkJGonrmY4jztegh3JqZRW17H1sF7en765=Em+_G7SodXw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]
Hi Geert,
> The definition of NUM_ATARI_SOURCES will need to be changed again;
> we'd best hardcode it to 140:
> For one, allowing for 152 VME interrupts will exceed the boundaries of
> the allocated bitmap (i.e. trash other memory).
> We won't need the full 200 either (I seem to have got the EtherNAT
> source numbers wrong in my earlier patch).
>
>
See attached - the 3.3.0-ethernat patches implement switching over to
the mainstream 91Cx driver (card detected on my Falcon, link brought up
but not detected by the driver due to hardware problems). The
3.3.0-atari-cleanup-num-irqs.diff sets the number of interrupt sources
to 141 on Atari, setting the number of VME sources back to 16 so we
don't accidentially trash memory contiguous with the free_vme_irq bitmap.
For some reason, I have to set NUM_ATARI_SOURCES to 141 to actually get
interrupt source 140 to register. Off-by-one error somewhere in the
generic interrupt code I'd think, but I've not been able to spot it.
(Just increasing the number of interrupts that are registered by
atari_init_IRQ results in 'unexpected interrupt from 112' until the cows
come home. And yes, it happens in ARAnyM, too.)
That pretty much wraps it up for EtherNEC and EtherNAT - EtherNEC is
fully tested by me, EtherNAT needs testing on Christian's Falcon or by
someone else with fully functional hardware. Next project : SCSI, SCC
serial, or what?...
Cheers,
Michael
[-- Attachment #2: 3.3.0-atari-cleanup-num-irqs.diff --]
[-- Type: text/x-patch, Size: 1171 bytes --]
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h
index 4e82683..9229626 100644
--- a/arch/m68k/include/asm/atariints.h
+++ b/arch/m68k/include/asm/atariints.h
@@ -30,9 +30,9 @@
#define TTMFP_SOURCE_BASE 24
#define SCC_SOURCE_BASE 40
#define VME_SOURCE_BASE 56
-#define VME_MAX_SOURCES 152
+#define VME_MAX_SOURCES 16
-#define NUM_ATARI_SOURCES (VME_SOURCE_BASE+VME_MAX_SOURCES-STMFP_SOURCE_BASE)
+#define NUM_ATARI_SOURCES 141
/* convert vector number to int source number */
#define IRQ_VECTOR_TO_SOURCE(v) ((v) - ((v) < 0x20 ? 0x18 : (0x40-8)))
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index e905b3f..8bd9c7f 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -9,8 +9,10 @@
*/
#if defined(CONFIG_COLDFIRE)
#define NR_IRQS 256
-#elif defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X) || defined(CONFIG_ATARI)
+#elif defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)
#define NR_IRQS 200
+#elif defined(CONFIG_ATARI)
+#define NR_IRQS 141
#elif defined(CONFIG_MAC)
#define NR_IRQS 72
#elif defined(CONFIG_Q40)
[-- Attachment #3: 3.3.0-ethernat-fix-irqs.diff --]
[-- Type: text/x-patch, Size: 650 bytes --]
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index 6cff09f..af273d9 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -695,7 +695,7 @@ static struct platform_device *atari_ethernec_devices[] __initdata = {
#define ATARI_ETHERNAT_PHYS_ADDR 0x80000000
-#define ATARI_ETHERNAT_IRQ 196
+#define ATARI_ETHERNAT_IRQ 140
static struct resource smc91x_resources[] = {
[0] = {
@@ -721,7 +721,7 @@ static struct platform_device smc91x_device = {
#define ATARI_USB_PHYS_ADDR 0x80000010
-#define ATARI_USB_IRQ 195
+#define ATARI_USB_IRQ 139
static struct resource isp1160_resources[] = {
[0] = {
[-- Attachment #4: 3.3.0-ethernat-smc91x.diff --]
[-- Type: text/x-patch, Size: 2393 bytes --]
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index 01893aa..c34f5ac 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -29,6 +29,22 @@ config ATARI_ETHERNAT
CT/60 extension port. The driver works by polling instead of
interrupts, so it is quite slow.
+ To compile this driver as a module, choose M here. The module
+ will be called smc91x.
+
+config ATARI_ETHERNAT_OLD
+ tristate "Atari EtherNAT Ethernet support - obsolete driver"
+ select CRC32
+ select MII
+ depends on ATARI
+ help
+ Say Y to include support for the EtherNAT network adapter for the
+ CT/60 extension port. The driver works by polling instead of
+ interrupts, so it is quite slow.
+
+ To compile this driver as a module, choose M here. The module
+ will be called atari_91C111.
+
config SMC9194
tristate "SMC 9194 support"
depends on (ISA || MAC && BROKEN)
diff --git a/drivers/net/ethernet/smsc/Makefile b/drivers/net/ethernet/smsc/Makefile
index ef228db..ac30abb 100644
--- a/drivers/net/ethernet/smsc/Makefile
+++ b/drivers/net/ethernet/smsc/Makefile
@@ -2,7 +2,8 @@
# Makefile for the SMSC network device drivers.
#
-obj-$(CONFIG_ATARI_ETHERNAT) += atari_91C111.o
+obj-$(CONFIG_ATARI_ETHERNAT) += smc91x.o
+obj-$(CONFIG_ATARI_ETHERNAT_OLD) += atari_91C111.o
obj-$(CONFIG_SMC9194) += smc9194.o
obj-$(CONFIG_SMC91X) += smc91x.o
obj-$(CONFIG_PCMCIA_SMC91C92) += smc91c92_cs.o
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 987755c..36c17c1 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -231,7 +231,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
#include <unit/smc91111.h>
-#elif defined(CONFIG_ATARI_ETHERNAT) || defined(CONFIG_ATARI_ETHERNAT_MODULE)
+#elif IS_ENABLED(CONFIG_ATARI_ETHERNAT) || IS_ENABLED(CONFIG_ATARI_ETHERNAT_OLD)
#define SMC_CAN_USE_8BIT 1
#define SMC_CAN_USE_16BIT 1
@@ -1144,7 +1144,7 @@ static const char * chip_ids[ 16 ] = {
} \
} while (0)
-#if defined(CONFIG_ATARI_ETHERNAT) || defined(CONFIG_ATARI_ETHERNAT_MODULE)
+#if IS_ENABLED(CONFIG_ATARI_ETHERNAT) || IS_ENABLED(CONFIG_ATARI_ETHERNAT_OLD)
/*
* MSch: EtherNAT is 32 bit, so the misaligned data buffer hack applies.
* This appears to hurt quite a lot ... we actually need to byte swap the
next prev parent reply other threads:[~2012-04-03 21:15 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 18:57 [PATCH] m68k/atari: EtherNEC - Convert ETHER_ADDR_LEN uses to ETH_ALEN Geert Uytterhoeven
2012-02-27 7:07 ` [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c Michael Schmitz
2012-03-07 10:09 ` Geert Uytterhoeven
2012-03-07 18:42 ` Michael Schmitz
2012-04-01 3:02 ` [PATCH 3/5] m68k/atari: EtherNAT - register EtherNAT platform devices only when probed Michael Schmitz
2012-04-01 3:05 ` [PATCH 4/5] m68k/atari: EtherNAT - fix dumb compile error Michael Schmitz
2012-04-01 3:10 ` [PATCH 5/5] m68k/atari: EtherNAT - enable USB HCD config option on Atari Michael Schmitz
2012-04-01 4:57 ` [PATCH 6/5] m68k/atari: EtherNAT - use correct irq flag in atari_91C111 Michael Schmitz
2012-04-01 5:57 ` [PATCH 6/5] m68k/atari: set up timer D and register dummy handler if either EtherNEC or EtherNAT found Michael Schmitz
2012-03-09 3:11 ` [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c Paul Gortmaker
2012-03-09 4:58 ` Michael Schmitz
2012-03-09 6:35 ` Geert Uytterhoeven
2012-03-09 13:32 ` Paul Gortmaker
2012-03-11 6:31 ` Michael Schmitz
2012-04-01 8:49 ` [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c, take two Michael Schmitz
2012-04-03 22:52 ` David Miller
2012-04-04 20:46 ` Paul Gortmaker
2012-04-05 9:28 ` Geert Uytterhoeven
2012-04-05 13:24 ` Paul Gortmaker
2012-04-05 14:21 ` Geert Uytterhoeven
2012-04-05 22:10 ` Michael Schmitz
2012-04-06 8:28 ` Geert Uytterhoeven
2012-04-05 9:44 ` Michael Schmitz
2012-04-01 2:49 ` [PATCH 1/5] m68k/atari: EtherNAT - change number of Atari interrupts to make room for EtherNAT interrupts Michael Schmitz
2012-04-01 20:39 ` Geert Uytterhoeven
2012-04-01 22:44 ` Michael Schmitz
2012-04-02 7:35 ` Geert Uytterhoeven
2012-04-02 22:29 ` Michael Schmitz
2012-04-03 21:15 ` Michael Schmitz [this message]
2012-04-03 21:54 ` Thorsten Glaser
2012-04-03 22:21 ` Michael Schmitz
2012-04-03 22:31 ` Thorsten Glaser
2012-04-03 23:16 ` Michael Schmitz
2012-04-06 21:43 ` Michael Schmitz
2012-04-01 21:00 ` Andreas Schwab
2012-04-01 21:46 ` Thorsten Glaser
2012-04-01 22:27 ` Michael Schmitz
2012-04-02 1:15 ` [PATCH] m68k/atari: EtherNAT patch series - resent as attachments Michael Schmitz
2012-04-01 2:58 ` [PATCH 2/5] m68k/atari: EtherNAT - add ISP1160 platform data Michael Schmitz
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=4F7B6880.9050605@gmail.com \
--to=schmitzmic@googlemail.com \
--cc=debian-68k@lists.debian.org \
--cc=geert@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