diffs   [plain text]


? diffs
? AppleGMACEthernet.xcodeproj/local.mode1
Index: UniNEnet.cpp
===================================================================
RCS file: /CVS/AppleGMACEthernet/UniNEnet.cpp,v
retrieving revision 1.72
diff -r1.72 UniNEnet.cpp
269a270,272
>     UInt32		rxOff = kMaxFrameSize_default * 2 / kPauseThresholds_Factor;
>     UInt32		rxOn  = kMaxFrameSize_default * 1 / kPauseThresholds_Factor;
> 
279a283,302
> 		/* Set receive flow control pause thresholds:									*/
> 		/* Pause OFF when 2 packets back up in the FIFO.								*/
> 		/* Pause  ON when the FIFO is down to one packet.								*/
> 		/* There are 2 reasons for the FIFO to back up:									*/
> 		/* The controller is vying for bandwidth on the PCI bus with another device or	*/
> 		/* the interrupt handler, driver, and network stack are not offloading			*/
> 		/* the Rx ring fast enough.														*/
> 		/* Bus contention should not happen in most machines. So setting the rxOff to	*/
> 		/* to cover 2 frames is more than adequate. As far as frames backing up in		*/
> 		/* the Rx ring, we want to rxOff as soon as possible to minimize dropped		*/
> 		/* frames.	The rxOn value must, of course, be less than rxOff value so it is	*/
> 		/* set to the value for one full size frame.									*/
> 		/* The pause time value shuold be set large enough to cover interrupt latency,	*/
> 		/* processing of a full Rx ring, and some time for Tx ring processing.			*/
> 		/* A high value is most often not a problem since the rxOn will override it.	*/
> 		/* However, if we don't process packets fast enough, they could back up in the	*/
> 		/* switch which may then drop them.												*/
> 
> 	fPauseThresholds	= (rxOff << kPauseThresholds_OFF_Threshold_Shift)
> 						| (rxOn	 << kPauseThresholds_ON_Threshold_Shift);
1368c1391
< 		return;
---
> 		return kIOReturnSuccess;
1495c1518
< 	IOMediumType	mType, mtyp;		// mtyp is mType without loopback and flow control bits
---
> 	IOMediumType	mType, mtyp;		// mtyp is mType without loopback
1500c1523
< 	mtyp	= mType & ~(kIOMediumOptionLoopback | kIOMediumOptionFlowControl);
---
> 	mtyp	= mType & ~(kIOMediumOptionLoopback);
1508c1531,1533
< 	anar &= ~(	MII_ANAR_100BASET4			/* turn off all speed/duplex bits	*/
---
> 	anar &= ~(	MII_ANAR_ASYM_PAUSE
> 			  | MII_ANAR_PAUSE
> 			  | MII_ANAR_100BASET4			/* turn off all speed/duplex bits	*/
1514,1515d1538
< 	anar |= MII_ANAR_PAUSE;					/* Advertise our Pause capability	*/
< 
1524c1547,1552
< 				  | MII_ANAR_10BASET );
---
> 				  | MII_ANAR_10BASET
> 				  | MII_ANAR_PAUSE );
> 		break;
> 
> 	case kIOMediumEthernet10BaseT | kIOMediumOptionHalfDuplex:	// 10/Half
> 		anar |= MII_ANAR_10BASET;
1527c1555
< 	case kIOMediumEthernet10BaseT | kIOMediumOptionFullDuplex:		// 10 Full
---
> 	case kIOMediumEthernet10BaseT | kIOMediumOptionFullDuplex:	// 10/Full
1529a1558,1561
> 																// 10/Full/Flow Control:
> 	case kIOMediumEthernet10BaseT | kIOMediumOptionFullDuplex | kIOMediumOptionFlowControl:
> 		anar |= MII_ANAR_10BASET_FD | MII_ANAR_PAUSE;
> 		break;
1531,1532c1563,1564
< 	case kIOMediumEthernet10BaseT | kIOMediumOptionHalfDuplex:		// 10 Half
< 		anar |= MII_ANAR_10BASET;
---
> 	case kIOMediumEthernet100BaseTX | kIOMediumOptionHalfDuplex:// 100/Half
> 		anar |= MII_ANAR_100BASETX;
1535c1567
< 	case kIOMediumEthernet100BaseTX | kIOMediumOptionFullDuplex:	// 100 Full
---
> 	case kIOMediumEthernet100BaseTX | kIOMediumOptionFullDuplex:// 100/Full
1538,1540c1570,1572
< 
< 	case kIOMediumEthernet100BaseTX | kIOMediumOptionHalfDuplex:	// 100 Half
< 		anar |= MII_ANAR_100BASETX;
---
> 																// 100/Full/Flow Control:
> 	case kIOMediumEthernet100BaseTX | kIOMediumOptionFullDuplex | kIOMediumOptionFlowControl:
> 		anar |= MII_ANAR_100BASETX_FD | MII_ANAR_PAUSE;
1541a1574,1577
> 																// gig/Full/Flow Control:
> 	case kIOMediumEthernet1000BaseT | kIOMediumOptionFullDuplex | kIOMediumOptionFlowControl:
> 		anar |= MII_ANAR_PAUSE;
> 		break;	//	gigabit is vendor specific - do it there
1543,1544c1579
< 	case kIOMediumEthernet1000BaseT | kIOMediumOptionFullDuplex:	// 1000 Full
< 	case kIOMediumEthernet1000BaseT | kIOMediumOptionHalfDuplex:	// 1000 Half
---
> 	case kIOMediumEthernet1000BaseT | kIOMediumOptionFullDuplex:// gig/Full
1547,1548c1582,1583
< 	default:		/* unknown	*/
< 		ELG( 0, 0, ' ?sd', "UniNEnet::negotiateSpeedDuplex - not 10 nor 100 combo." );
---
> 	default:		/* unknown - maybe NONE	*/
> 		ELG( 0, 0, ' ?sd', "UniNEnet::negotiateSpeedDuplex - unknown combo." );
1583c1618
< 			/* Turn on gig/Full or gig/Half as appropriate:	*/
---
> 			/* Optionally turn on gig/Full (we don't allow gig/half):	*/
1586c1621
< 		{					// gig/Full:
---
> 		{
1588a1624
> 		case kIOMediumEthernet1000BaseT | kIOMediumOptionFullDuplex | kIOMediumOptionFlowControl:
1591,1594d1626
< 							// gig/Half:
< 		case kIOMediumEthernet1000BaseT | kIOMediumOptionHalfDuplex:
< 			gigReg |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
< 			break;
1681c1713
< //	if ( mType & kIOMediumOptionFlowControl )	/// touch up the MAC
---
> 		// monitorLinkStatus will touch up the MAC wrt Pause flow control.
Index: UniNEnetPrivate.cpp
===================================================================
RCS file: /CVS/AppleGMACEthernet/UniNEnetPrivate.cpp,v
retrieving revision 1.64
diff -r1.64 UniNEnetPrivate.cpp
323,332c323,336
< 		{ kIOMediumEthernetNone                                  									,	0		},
< 		{ kIOMediumEthernetAuto                                  									,	0		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex									,	10		},
< 	//	{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex		| kIOMediumOptionLoopback	,	10		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex									,	10		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback	,	10		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex									,	100		},
< 	//	{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex		| kIOMediumOptionLoopback	,	100		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex									,	100		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback	,	100		}
---
> 		{ kIOMediumEthernetNone																	, 0		},
> 		{ kIOMediumEthernetAuto																	, 0		},
> 
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex								, 10	},
> 	//	{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex	| kIOMediumOptionLoopback	, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex								, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex	| kIOMediumOptionFlowControl, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex	| kIOMediumOptionLoopback	, 10	},
> 
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex								, 100	},
> 	//	{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex	| kIOMediumOptionLoopback	, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex								, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex	| kIOMediumOptionFlowControl, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex	| kIOMediumOptionLoopback	, 100	}
338,351c342,359
< 		{ kIOMediumEthernetNone                                  																	,	0		},
< 		{ kIOMediumEthernetAuto                                  																	,	0		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex																	,	10		},
< 	//	{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex		| kIOMediumOptionLoopback									,	10		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex																	,	10		},
< 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback									,	10		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex																	,	100		},
< 	//	{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex		| kIOMediumOptionLoopback									,	100		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex																	,	100		},
< 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback									,	100		},
< 		{ kIOMediumEthernet1000BaseT  	| kIOMediumOptionFullDuplex																	,	1000	},
< 		{ kIOMediumEthernet1000BaseT 	| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback									,	1000	},
< 		{ kIOMediumEthernet1000BaseT	| kIOMediumOptionFullDuplex									| kIOMediumOptionFlowControl	,	1000	},
< 		{ kIOMediumEthernet1000BaseT	| kIOMediumOptionFullDuplex		| kIOMediumOptionLoopback	| kIOMediumOptionFlowControl	,	1000	}
---
> 		{ kIOMediumEthernetNone																	, 0		},
> 		{ kIOMediumEthernetAuto																	, 0		},
> 
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex								, 10	},
> 	//	{ kIOMediumEthernet10BaseT		| kIOMediumOptionHalfDuplex	| kIOMediumOptionLoopback	, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex								, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex	| kIOMediumOptionFlowControl, 10	},
> 		{ kIOMediumEthernet10BaseT		| kIOMediumOptionFullDuplex	| kIOMediumOptionLoopback	, 10	},
> 
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex								, 100	},
> 	//	{ kIOMediumEthernet100BaseTX	| kIOMediumOptionHalfDuplex	| kIOMediumOptionLoopback	, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex								, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex	| kIOMediumOptionFlowControl, 100	},
> 		{ kIOMediumEthernet100BaseTX	| kIOMediumOptionFullDuplex	| kIOMediumOptionLoopback	, 100	},
> 
> 		{ kIOMediumEthernet1000BaseT  	| kIOMediumOptionFullDuplex								, 1000	},
> 		{ kIOMediumEthernet1000BaseT	| kIOMediumOptionFullDuplex	| kIOMediumOptionFlowControl, 1000	},
> 		{ kIOMediumEthernet1000BaseT 	| kIOMediumOptionFullDuplex	| kIOMediumOptionLoopback	, 1000	}
670,671d677
< //	UInt32          	rxFifoSize;
<     UInt32          	rxOff, rxOn;
789,812d794
< 		/* Set receive flow control pause thresholds and time:							*/
< 		/* Pause OFF when 2 packets back up in the FIFO.								*/
< 		/* Pause  ON when the FIFO is down to one packet.								*/
< 		/* There are 2 reasons for the FIFO to back up:									*/
< 		/* The controller is vying for bandwidth on the PCI bus with another device or	*/
< 		/* the interrupt handler, driver, and network stack are not offloading			*/
< 		/* the Rx ring fast enough.														*/
< 		/* Bus contention should not happen in most machines. So setting the rxOff to	*/
< 		/* to cover 2 frames is more than adequate. As far as frames backing up in		*/
< 		/* the Rx ring, we want to rxOff as soon as possible to minimize dropped		*/
< 		/* frames.	The rxOn value must, of course, be less than rxOff value so it is	*/
< 		/* set to the value for one full size frame.									*/
< 		/* The pause time value shuold be set large enough to cover interrupt latency,	*/
< 		/* processing of a full Rx ring, and some time for Tx ring processing.			*/
< 		/* A high value is most often not a problem since the rxOn will override it.	*/
< 		/* However, if we don't process packets fast enough, they could back up in the	*/
< 		/* switch which may then drop them.												*/
< 
< //	rxFifoSize	= READ_REGISTER( RxFIFOSize );	// 64-byte (kPauseThresholds_Factor) chunks
< 
< 	rxOff	= kMaxFrameSize_default * 2 / kPauseThresholds_Factor;
< 	rxOn	= kMaxFrameSize_default * 1 / kPauseThresholds_Factor;
< 	fPauseThresholds	= (rxOff << kPauseThresholds_OFF_Threshold_Shift)
< 						| (rxOn	 << kPauseThresholds_ON_Threshold_Shift);
1783a1766
> 			mediumType |= kIOMediumOptionFlowControl;
1876c1859
< 
---
> 	bool			clkEnable = fCellClockEnabled;
1879a1863,1865
> 	if ( !clkEnable )
> 		enableCellClock();
> 
1886a1873,1875
> 	if ( !clkEnable )
> 		disableCellClock();
> 
Index: AppleGMACEthernet.xcodeproj/project.pbxproj
===================================================================
RCS file: /CVS/AppleGMACEthernet/AppleGMACEthernet.xcodeproj/project.pbxproj,v
retrieving revision 1.3
diff -r1.3 project.pbxproj
56c56
< 	<string>1.5.6</string>
---
> 	<string>1.5.7</string>
60c60
< 	<string>1.5.6f1</string>
---
> 	<string>1.5.7f1</string>
319c319
< 				MODULE_VERSION = 1.5.6f1;
---
> 				MODULE_VERSION = 1.5.7f1;
350c350
< 				MODULE_VERSION = 1.5.6f1;
---
> 				MODULE_VERSION = 1.5.7f1;
378c378
< 				MODULE_VERSION = 1.5.6f1;
---
> 				MODULE_VERSION = 1.5.7f1;