Here are some endianness-related patches for NE2000: - Peter De Schrijver's new Hydra driver which uses the generic 8390 core needs to operate the 8390 in big-endian mode, so I added a flag for that. - Richard Zidlicky found a bug in ne.c on his Q40, running Linux/m68k. --- linux-2.4.0-test10/drivers/net/8390.c Tue Jul 18 14:07:11 2000 +++ linux-m68k-2.4.0-test10/drivers/net/8390.c Wed Nov 1 17:34:34 2000 @@ -1068,7 +1068,9 @@ long e8390_base = dev->base_addr; struct ei_device *ei_local = (struct ei_device *) dev->priv; int i; - int endcfg = ei_local->word16 ? (0x48 | ENDCFG_WTS) : 0x48; + int endcfg = ei_local->word16 + ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0)) + : 0x48; if(sizeof(struct e8390_pkt_hdr)!=4) panic("8390.c: header struct mispacked\n"); --- linux-2.4.0-test10/drivers/net/8390.h Wed Nov 1 16:57:58 2000 +++ linux-m68k-2.4.0-test10/drivers/net/8390.h Wed Nov 1 18:25:41 2000 @@ -67,6 +67,7 @@ unsigned char mcfilter[8]; unsigned open:1; unsigned word16:1; /* We have the 16-bit (vs 8-bit) version of the card. */ + unsigned bigendian:1; /* 16-bit big endian mode */ unsigned txing:1; /* Transmit Active */ unsigned irqlock:1; /* 8390's intrs disabled when '1'. */ unsigned dmaing:1; /* Remote DMA Active */ @@ -117,7 +118,8 @@ */ #if defined(CONFIG_MAC) || defined(CONFIG_AMIGA_PCMCIA) || \ - defined(CONFIG_ARIADNE2) || defined(CONFIG_ARIADNE2_MODULE) + defined(CONFIG_ARIADNE2) || defined(CONFIG_ARIADNE2_MODULE) || \ + defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE) #define EI_SHIFT(x) (ei_local->reg_offset[x]) #else #define EI_SHIFT(x) (x) @@ -165,6 +167,7 @@ /* Bits in EN0_DCFG - Data config register */ #define ENDCFG_WTS 0x01 /* word transfer mode selection */ +#define ENDCFG_BOS 0x02 /* byte order selection */ /* Page 1 register offsets. */ #define EN1_PHYS EI_SHIFT(0x01) /* This board's physical enet addr RD WR */ --- linux-2.4.0-test10/drivers/net/ne.c Wed Nov 1 16:58:02 2000 +++ linux-m68k-2.4.0-test10/drivers/net/ne.c Fri Nov 3 13:43:37 2000 @@ -612,6 +612,8 @@ outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ ei_status.dmaing &= ~0x01; + + hdr->count=le16_to_cpu(hdr->count); } /* Block input and output, similar to the Crynwr packet driver. If you 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 - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org