[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] emaclite on petalinux.



Hi, John:

I have noticed (I'm using 2.4 uClinux) that my card using emaclite
doesn't response to ARPs, pings, etc... until I initiate some transmit
from uClinux shell (say, try to ping somebody).

Investigations showed that driver doesn't see any receive whatsoever
before this moment.

I figured out that it can be fixed by flushing receive in probe()
function in adapter.c right before set mac address:

   	if (XEmacLite_Initialize(&lp->EmacLite, cfg->DeviceId) !=
XST_SUCCESS) {
   		printk(KERN_ERR "%s: Could not initialize device.\n",
   		       dev->name);
   		remove_head_dev();
   		return -ENODEV;
   	}
   
-> 	/* Flush Recieve */
-> 	XEmacLite_FlushReceive(&lp->EmacLite);
-> 	/* Copy MAC address in from descriptor table */
-> 	memcpy(dev->dev_addr, ether_table[index].macaddr,6);
-> 
   	/* Copy MAC address in from descriptor table */
   	XEmacLite_SetMacAddress(&lp->EmacLite,
ether_table[index].macaddr);

Memcopy I have also added fixes wrong ifconfig output which otherwise
shows interface HW address to be all zeroes.

Thanks,

Leonid.

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/