patch-2.4.20 linux-2.4.20/drivers/net/smc-ultra.c

Next file: linux-2.4.20/drivers/net/smc-ultra32.c
Previous file: linux-2.4.20/drivers/net/slip.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/net/smc-ultra.c linux-2.4.20/drivers/net/smc-ultra.c
@@ -383,9 +383,11 @@
 	unsigned long hdr_start = dev->mem_start + ((ring_page - START_PG)<<8);
 
 	outb(ULTRA_MEMENB, dev->base_addr - ULTRA_NIC_OFFSET);	/* shmem on */
-#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)