Browse Source

Plan 9 from Bell Labs 2005-05-10

David du Colombier 19 years ago
parent
commit
251b463e5c
5 changed files with 36 additions and 17 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 20 11
      sys/src/9/pc/etherigbe.c
  5. 10 2
      sys/src/boot/pc/etherigbe.c

+ 2 - 2
dist/replica/_plan9.db

@@ -5869,7 +5869,7 @@ sys/src/9/pc/etherelnk3.c - 664 sys sys 1081706477 48724
 sys/src/9/pc/etherga620.c - 664 sys sys 1074785126 28754
 sys/src/9/pc/etherga620fw.h - 644 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1114632111 43779
+sys/src/9/pc/etherigbe.c - 664 sys sys 1115694068 43995
 sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
@@ -7012,7 +7012,7 @@ sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
 sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1107882190 1255
-sys/src/boot/pc/etherigbe.c - 664 sys sys 1114632096 40106
+sys/src/boot/pc/etherigbe.c - 664 sys sys 1115693946 40304
 sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403

+ 2 - 2
dist/replica/plan9.db

@@ -5869,7 +5869,7 @@ sys/src/9/pc/etherelnk3.c - 664 sys sys 1081706477 48724
 sys/src/9/pc/etherga620.c - 664 sys sys 1074785126 28754
 sys/src/9/pc/etherga620fw.h - 644 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1114632111 43779
+sys/src/9/pc/etherigbe.c - 664 sys sys 1115694068 43995
 sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
@@ -7012,7 +7012,7 @@ sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
 sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1107882190 1255
-sys/src/boot/pc/etherigbe.c - 664 sys sys 1114632096 40106
+sys/src/boot/pc/etherigbe.c - 664 sys sys 1115693946 40304
 sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403

+ 2 - 0
dist/replica/plan9.log

@@ -14888,3 +14888,5 @@
 1115566361 4 c sys/src/9/pc/l.s - 664 sys sys 1115566067 23833
 1115568160 0 c sys/src/9/pc/ether82557.c - 664 sys sys 1115566440 30076
 1115568160 1 c sys/src/boot/pc/ether82557.c - 664 sys sys 1115566440 18947
+1115694191 0 c sys/src/9/pc/etherigbe.c - 664 sys sys 1115694068 43995
+1115694191 1 c sys/src/boot/pc/etherigbe.c - 664 sys sys 1115693946 40304

+ 20 - 11
sys/src/9/pc/etherigbe.c

@@ -7,6 +7,7 @@
  *	82541GI
  *	82547GI
  *	82546GB
+ *	82546EB
  * To Do:
  *	finish autonegotiation code;
  *	integrate fiber stuff back in (this ONLY handles
@@ -28,15 +29,16 @@
 #include "ethermii.h"
 
 enum {
-	i82542     = (0x1000<<16)|0x8086,
-	i82543gc   = (0x1004<<16)|0x8086,
-	i82544ei   = (0x1008<<16)|0x8086,
-	i82547ei   = (0x1019<<16)|0x8086,
-	i82540em   = (0x100E<<16)|0x8086,
-	i82540eplp = (0x101E<<16)|0x8086,
-	i82547gi   = (0x1075<<16)|0x8086,
-	i82541gi   = (0x1076<<16)|0x8086,
-	i82546gb   = (0x1079<<16)|0x8086,
+	i82542     	= (0x1000<<16)|0x8086,
+	i82543gc   	= (0x1004<<16)|0x8086,
+	i82544ei   	= (0x1008<<16)|0x8086,
+	i82547ei   	= (0x1019<<16)|0x8086,
+	i82540em   	= (0x100E<<16)|0x8086,
+	i82540eplp 	= (0x101E<<16)|0x8086,
+	i82547gi   	= (0x1075<<16)|0x8086,
+	i82541gi   	= (0x1076<<16)|0x8086,
+	i82546gb   	= (0x1079<<16)|0x8086,
+	i82546eb	= (0x1010<<16)|0x8086,
 };
 
 enum {
@@ -876,6 +878,7 @@ igbetxinit(Ctlr* ctlr)
 	case i82540eplp:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 	case i82547gi:
 		r = 8;
 		break;
@@ -911,6 +914,7 @@ igbetxinit(Ctlr* ctlr)
 	case i82540eplp:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 	case i82541gi:
 		r = csr32r(ctlr, Txdctl);
 		r &= ~WthreshMASK;
@@ -1041,6 +1045,7 @@ igberxinit(Ctlr* ctlr)
 	case i82540eplp:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 	case i82547gi:
 		csr32w(ctlr, Radv, 64);
 		break;
@@ -1434,6 +1439,7 @@ igbemii(Ctlr* ctlr)
 	case i82547gi:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 		ctrl &= ~(Frcdplx|Frcspd);
 		csr32w(ctlr, Ctrl, ctrl);
 		ctlr->mii->mir = igbemiimir;
@@ -1459,7 +1465,7 @@ igbemii(Ctlr* ctlr)
 	 * Set appropriate values then reset the PHY to have
 	 * changes noted.
 	 */
-	if (ctlr->id != i82547gi && ctlr->id != i82541gi && ctlr->id != i82546gb) {
+	if (ctlr->id != i82547gi && ctlr->id != i82541gi && ctlr->id != i82546gb && ctlr->id != i82546eb) {
 		r = miimir(ctlr->mii, 16);
 		r |= 0x0800;			/* assert CRS on Tx */
 		r |= 0x0060;			/* auto-crossover all speeds */
@@ -1588,6 +1594,7 @@ at93c46r(Ctlr* ctlr)
 	case i82541gi:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 		areq = 1;
 		csr32w(ctlr, Eecd, eecd|Areq);
 		for(i = 0; i < 1000; i++){
@@ -1669,6 +1676,7 @@ igbedetach(Ctlr* ctlr)
 	case i82541gi:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 		r = csr32r(ctlr, Manc);
 		r &= ~Arpen;
 		csr32w(ctlr, Manc, r);
@@ -1716,7 +1724,7 @@ igbereset(Ctlr* ctlr)
 	 * There are 16 addresses. The first should be the MAC address.
 	 * The others are cleared and not marked valid (MS bit of Rah).
 	 */
-	if (ctlr->id == i82546gb && BUSFNO(ctlr->pcidev->tbdf) == 1)
+	if ((ctlr->id == i82546gb || ctlr->id == i82546eb) && BUSFNO(ctlr->pcidev->tbdf) == 1)
 		ctlr->eeprom[Ea+2] += 0x100;	// second interface
 	for(i = Ea; i < Eaddrlen/2; i++){
 		ctlr->ra[2*i] = ctlr->eeprom[i];
@@ -1836,6 +1844,7 @@ igbepci(void)
 		case i82547gi:
 		case i82541gi:
 		case i82546gb:
+		case i82546eb:
 			break;
 		}
 

+ 10 - 2
sys/src/boot/pc/etherigbe.c

@@ -40,6 +40,7 @@ enum {
 	i82547gi   = (0x1075<<16)|0x8086,
 	i82541gi   = (0x1076<<16)|0x8086,
 	i82546gb   = (0x1079<<16)|0x8086,
+	i82546eb   = (0x1010<<16)|0x8086,
 };
 
 /* compatibility with cpu kernels */
@@ -844,6 +845,7 @@ igbeinit(Ether* edev)
 	case i82540eplp:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 	case i82547gi:
 		csr32w(ctlr, Radv, 64);
 		break;
@@ -884,6 +886,7 @@ igbeinit(Ether* edev)
 	case i82540eplp:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 	case i82547gi:
 		r = 8;
 		break;
@@ -920,6 +923,7 @@ igbeinit(Ether* edev)
 	case i82540eplp:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 	case i82541gi:
 		r = csr32r(ctlr, Txdctl);
 		r &= ~WthreshMASK;
@@ -1150,6 +1154,7 @@ igbemii(Ctlr* ctlr)
 	case i82547gi:
 	case i82541gi:
 	case i82546gb:
+	case i82546eb:
 		ctrl &= ~(Frcdplx|Frcspd);
 		csr32w(ctlr, Ctrl, ctrl);
 		ctlr->mii->mir = igbemiimir;
@@ -1177,7 +1182,7 @@ igbemii(Ctlr* ctlr)
 	 * Set appropriate values then reset the PHY to have
 	 * changes noted.
 	 */
-	if (ctlr->id != i82547gi && ctlr->id != i82541gi && ctlr->id != i82546gb) {
+	if (ctlr->id != i82547gi && ctlr->id != i82541gi && ctlr->id != i82546gb && ctlr->id != i82546eb) {
 		r = miimir(ctlr->mii, 16);
 		r |= 0x0800;				/* assert CRS on Tx */
 		r |= 0x0060;			/* auto-crossover all speeds */
@@ -1306,6 +1311,7 @@ at93c46r(Ctlr* ctlr)
 	case i82541gi:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 		areq = 1;
 		csr32w(ctlr, Eecd, eecd|Areq);
 		for(i = 0; i < 1000; i++){
@@ -1378,6 +1384,7 @@ detach(Ctlr *ctlr)
 	case i82541gi:
 	case i82547gi:
 	case i82546gb:
+	case i82546eb:
 		r = csr32r(ctlr, Manc);
 		r &= ~Arpen;
 		csr32w(ctlr, Manc, r);
@@ -1426,7 +1433,7 @@ igbereset(Ctlr* ctlr)
 	 * There are 16 addresses. The first should be the MAC address.
 	 * The others are cleared and not marked valid (MS bit of Rah).
 	 */
-	if (ctlr->id == i82546gb && BUSFNO(ctlr->pcidev->tbdf) == 1)
+	if ((ctlr->id == i82546gb || ctlr->id == i82546eb) && BUSFNO(ctlr->pcidev->tbdf) == 1)
 		ctlr->eeprom[Ea+2] += 0x100;	// second interface
 	for(i = Ea; i < Eaddrlen/2; i++){
 		ctlr->ra[2*i] = ctlr->eeprom[i];
@@ -1562,6 +1569,7 @@ igbepci(void)
 		case i82547gi:
 		case i82541gi:
 		case i82546gb:
+		case i82546eb:
 			break;
 		}