shithub: riscv

Download patch

ref: 311a99e23b2f1adcf01a91db3e551dc1dda9f61a
parent: b506c6489bfcb2dcaa8a99b8f1f574688b3cffc5
author: cinap_lenrek <[email protected]>
date: Mon Jul 27 23:30:21 EDT 2015

ether79c970: set mbps for proper queue sizes, assume gigabit ethernet for vmware

--- a/sys/src/9/pc/ether79c970.c
+++ b/sys/src/9/pc/ether79c970.c
@@ -571,7 +571,10 @@
 	switch(x&0xFFFFFFF){
 	case 0x2420003:	/* PCnet/PCI 79C970 */
 	case 0x2621003:	/* PCnet/PCI II 79C970A */
+		ether->mbps = 10;
+		break;
 	case 0x2625003:	/* PCnet-FAST III 79C973 */
+		ether->mbps = 100;
 		break;
 	default:
 		print("#l%d: unknown PCnet card version 0x%.7ux\n",
@@ -612,6 +615,15 @@
 		x = ctlr->ior(ctlr, Aprom+4);
 		ether->ea[4] = x;
 		ether->ea[5] = x>>8;
+	}
+
+	/* VMware */
+	x = ether->ea[0]<<16 | ether->ea[1]<<8 | ether->ea[2];
+	switch(x){
+	case 0x0569:
+	case 0x0C29:
+	case 0x5056:
+		ether->mbps = 1000;
 	}
 
 	/*