out32 (EMAC_IAL + hw_p->hw_addr, reg);
switch (devnum) {
+#if defined(CONFIG_NET_MULTI)
case 1:
/* setup MAL tx & rx channel pointers */
/* For 405EP, the EMAC1 tx channel 0 is MAL tx channel 2 */
/* set RX buffer size */
mtdcr (malrcbs1, ENET_MAX_MTU_ALIGNED / 16);
break;
+#endif
case 0:
default:
/* setup MAL tx & rx channel pointers */
"Cannot allocate eth_device %d\n", eth_num);
return (-1);
}
+ memset(dev, 0, sizeof(*dev));
/* Allocate our private use data */
hw = (EMAC_405_HW_PST) malloc (sizeof (*hw));
if (hw == NULL) {
free (dev);
return (-1);
}
+ memset(hw, 0, sizeof(*hw));
switch (eth_num) {
case 0: