patch-2.4.20 linux-2.4.20/drivers/net/wd.c

Next file: linux-2.4.20/drivers/net/winbond-840.c
Previous file: linux-2.4.20/drivers/net/wavelan.p.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/net/wd.c linux-2.4.20/drivers/net/wd.c
@@ -365,9 +365,11 @@
 	if (ei_status.word16)
 		outb(ISA16 | ei_status.reg5, wd_cmdreg+WD_CMDREG5);
 
-#ifdef notdef
+#ifdef __BIG_ENDIAN
 	/* Officially this is what we are doing, but the readl() is faster */
+	/* unfortunately it isn't endian aware of the struct               */
 	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	hdr->count = le16_to_cpu(hdr->count);
 #else
 	((unsigned int*)hdr)[0] = isa_readl(hdr_start);
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)