git: 9front

Download patch

ref: 4acf15a832d6516f25e01b7a6301f51754405924
parent: 724696463f55333ccc3f5af3bb71dac7106c66d0
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Wed Jul 24 18:17:13 EDT 2013

ether82563: work arround for 82579LM on Lenovo X230

dont reset the the phy on reset as this causes the link
to be stuck at 10mbps.

--- a/sys/src/9/pc/ether82563.c
+++ b/sys/src/9/pc/ether82563.c
@@ -1604,6 +1604,12 @@
 	r = csr32r(ctlr, Ctrl);
 	if(ctlr->type == i82566 || ctlr->type == i82579)
 		r |= Phyrst;
+	/*
+	 * hack: 82579LM on lenovo X230 is stuck at 10mbps after
+	 * reseting the phy, but works fine if we dont reset.
+	 */
+	if(ctlr->pcidev->did == 0x1502)
+		r &= ~Phyrst;
 	csr32w(ctlr, Ctrl, Devrst | r);
 	delay(1);
 	for(timeo = 0;; timeo++){
--