[PATCH] Endianness bug in ne.c

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

 




Probably no one uses ne.c on big endian machines, except for the m68k Q40/Q60
folks :-)

Big-endian only drivers like ariadne2.c and daynaport.c do an explicit
wordswap, ne2k-pci.c uses le16_to_cpus(&hdr->count) as well.

--- linux-2.4.0-prerelease-ac6/drivers/net/ne.c.orig	Thu Jan  4 23:16:23 2001
+++ linux-2.4.0-prerelease-ac6/drivers/net/ne.c	Thu Jan  4 23:30:28 2001
@@ -546,6 +546,8 @@
 
 	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
 	ei_status.dmaing &= ~0x01;
+
+	le16_to_cpus(&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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux