2.6.7-mm1 PCNet Problems under VMWare 4.5.2

From: Keith Moore
Date: Wed Jun 23 2004 - 04:26:06 EST


I'm seeing problems running a 2.6.7-mm1 kernel with Fedora Core 2 running in a VMWare Workstation 4.5.2 VM. The kernel hangs trying to bring up the (dhcp-enabled) eth0 interface.

I dug through the -mm1 patch, and the problem seems to be the changes at the end of the pcnet32_interrupt() function (in drivers/net/pcnet32.c). The relevant patch fragment is:

- /* Clear any other interrupt, and set interrupt enable. */
- lp->a.write_csr (ioaddr, 0, 0x7940);
+ /* Set interrupt enable. */
+ lp->a.write_csr (ioaddr, 0, 0x0040);

Reverting this one section of the patch makes eth0 happy again.

I poked around with the values written to the csr register, and it appears the virtual PCNet-II adapter needs bit 0x0100 (initialzation done) set. So, writing 0x0140 instead of 0x0040 seems to work well.

I have no idea how accurate VMWare's emulation of this adapter is, or if this change may cause problems with other (physical) adapters.


KM


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/