浏览代码

duplex setting added to natsemi.c

tags/v0.9.3
Udayan Kumar 18 年前
父节点
当前提交
11d246f3b5
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      src/drivers/net/natsemi.c

+ 6
- 4
src/drivers/net/natsemi.c 查看文件

401
 	 * Configure for standard, in-spec Ethernet. 
401
 	 * Configure for standard, in-spec Ethernet. 
402
 	 */
402
 	 */
403
 	if ( inl ( nat->ioaddr + ChipConfig ) & 0x20000000 ) {	/* Full duplex */
403
 	if ( inl ( nat->ioaddr + ChipConfig ) & 0x20000000 ) {	/* Full duplex */
404
-		tx_config = 0xD0801002;
405
-		rx_config = 0x10000020;
404
+		tx_config = 0xD0801002|0xC0000000;
405
+		DBG("Full duplex\n");
406
+		rx_config = 0x10000020|0x10000000;;
406
 	} else {
407
 	} else {
407
-		tx_config = 0x10801002;
408
-		rx_config = 0x0020;
408
+		tx_config = 0x10801002& ~0xC0000000;;
409
+		DBG("Half duplex\n");
410
+		rx_config = 0x0020& ~0x10000000;;;
409
 	}
411
 	}
410
 	outl ( tx_config, nat->ioaddr + TxConfig );
412
 	outl ( tx_config, nat->ioaddr + TxConfig );
411
 	outl ( rx_config, nat->ioaddr + RxConfig );
413
 	outl ( rx_config, nat->ioaddr + RxConfig );

正在加载...
取消
保存