在vmware 4.5.2中不能使用pxe引导freebsd4.1x的bug修订

发表于:2007-06-09来源:作者:点击数: 标签:
问题描述: 远程引导开始后,lnc0不能被正常检测到,但是lnc1或lnc2可以正常检测。同样的问题: http://lists.freebsd.org/pipermail/freebsd-stable/2004-October/008971.html 原因:检测前芯片没有复位 这个驱动好久没有更新过了,而且奇怪的是,程序中明
问题描述:
远程引导开始后,lnc0不能被正常检测到,但是lnc1或lnc2可以正常检测。同样的问题:
http://lists.freebsd.org/pipermail/freebsd-stable/2004-October/008971.html

原因:检测前芯片没有复位
这个驱动好久没有更新过了,而且奇怪的是,程序中明确说不需要复位。
增加复位后,一切ok.

-- i386/isa/if_lnc.c.orig   Wed Feb 13 08:43:10 2002
+++ i386/isa/if_lnc.c Wed Feb 23 17:15:41 2005
@@ -114,6 +114,7 @@
int rap;
int rdp;
int bdp;
+ int reset;
#ifdef DEBUG
int lnc_debug;
#endif
@@ -1120,13 +1121,20 @@
{
u_long chip_id;
int type;
-
- /*
+ int reset_val;
+
+ /*
* The PCnet family don't reset the RAP register on reset so we'll
* have to write during the probe :-) It does have an ID register
* though so the probe is just a matter of reading it.
+ *
+ * THAT can NOT work in vmware 4.5.2(79C970A) while using PXE.
+ * The lnc0 can not be detected, but lnc1 or/and lnc2 can be.
+ * So it's better to reset first.
+ * -- Paul Meng
*/
-
+ reset_val = inw(sc->reset);
+ outw(reset_val, sc->reset);
if ((type = lance_probe(sc))) {
chip_id = read_csr(sc, CSR89);
chip_id <<= 16;
@@ -1293,6 +1301,7 @@
sc->rap = iobase + PCNET_RAP;
sc->rdp = iobase + PCNET_RDP;
sc->bdp = iobase + PCNET_BDP;
+ sc->reset = iobase + PCNET_RESET;

sc->nic.ic = pcnet_probe(sc);
if (sc->nic.ic >= PCnet_32) {

原文转自:http://www.ltesting.net