rtl8139 pci mem freeze (more info)

Donald Becker becker@tidalwave.net
Thu Sep 30 01:08:42 1999


On Wed, 29 Sep 1999, Daniel Kobras wrote:
> insmod'ed and ifconfig'ed manually. Using a skript where insmod was
> immediatly followed by an ifconfig would hang the computer at least after
> some tries, until I inserted _both_ the outl_f's back in when setting the
> MAC and Multicast addresses. 
...

> -	for (i = 0; i < 6; i++)
> -		outb(dev->dev_addr[i], ioaddr + MAC0 + i);
> +
> +	outl_f(dev->dev_addr[0], ioaddr + MAC0);
> +	outl(dev->dev_addr[4], ioaddr + MAC0 + 4);

This is incorrect -- you are only writing one byte of the station address.
I think that the proper code is
	outl(cpu_to_le32(*(u32*)(dev->dev_addr + 0)), ioaddr + MAC0 + 0);
	outl(cpu_to_le32(*(u32*)(dev->dev_addr + 4)), ioaddr + MAC0 + 4);

>  		cur_rx = (cur_rx + rx_size + 4 + 3) & ~3;
> -		outw(cur_rx - 16, ioaddr + RxBufPtr);
> +		outw_f(cur_rx - 16, ioaddr + RxBufPtr);

This is very curious.  It makes me suspicious about what the motherboard
chipset is doing to the writes if this doesn't work correctly.


 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.