ethernet issues

Robin Cutshaw (robin@intercore.com)
Thu, 27 Jul 1995 22:48:43 -0400 (EDT)


A couple of issues:

The de4x5 net driver does not support promiscuous mode in the same
manner as the other cards and therefor does not work properly with
programs like tcpdump. Here's a diff to fix it (against 1.3.12):

*** de4x5.c.ORIG Thu Jul 6 06:22:04 1995
--- de4x5.c Sat Jul 22 23:21:42 1995
***************
*** 1380,1387 ****
}
/*
** Set or clear the multicast filter for this adaptor.
! ** num_addrs == -1 Promiscuous mode, receive all packets - not supported.
! ** Use the ioctls.
** num_addrs == 0 Normal mode, clear multicast list
** num_addrs > 0 Multicast mode, receive normal and MC packets, and do
** best-effort filtering.
--- 1380,1387 ----
}
/*
** Set or clear the multicast filter for this adaptor.
! ** num_addrs == -1 Promiscuous mode, receive all packets - now supported.
! ** Can also use the ioctls.
** num_addrs == 0 Normal mode, clear multicast list
** num_addrs > 0 Multicast mode, receive normal and MC packets, and do
** best-effort filtering.
***************
*** 1409,1414 ****
--- 1409,1419 ----
lp->tx_new = (++lp->tx_new) % lp->txRingSize;
outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */
dev->trans_start = jiffies;
+ } else { /* set promiscuous mode */
+ u32 omr;
+ omr = inl(DE4X5_OMR);
+ omr |= OMR_PR;
+ outl(omr, DE4X5_OMR);
}
}

***************
*** 1472,1477 ****
--- 1477,1485 ----
}
}
}
+
+ if (num_addrs == 0)
+ omr &= ~OMR_PR;
outl(omr, DE4X5_OMR);

return;

The file drivers/net/Space.c only allows multiple cards of the same type,
you cannot have, for example, one SMC and one DE4X5 card. Is this a
design feature or flaw? This is due to the way the devices are probed.
If there isn't an overriding rationale, I'll provide diffs to fix this.

Thanks,
robin