On Sun 2000-08-06 (13:28), Archie Cobbs wrote:
> > > No interface should be attached twice, Ethernet or other, right?
> > > So try this patch and find out which driver is broken.
> > 
> > I think the concern was because the semantics to attach devices changed,
> > meaning that drivers from before no longer work.
> 
> Hmm.. my understanding was that it was never OK to attach the
> same interface twice (without detaching in between). So if this
> behavior worked before then it was just "luck".
> 
> In any case, IMHO in the future it doesn't make sense to allow
> an interface to attach twice... what would that mean anyway?
> 
> Admittedly there may be a backward compatibility problem, but
> it seems like the origin of the problem is in the driver, not
> the ether_attach() routine.

Using dev/awi/awi.c as an example:

            sc->sc_dev.dv_xname,
            sc->sc_mib_phy.IEEE_PHY_Type == AWI_PHY_TYPE_FH ? "FH" : "DS",
            sc->sc_tx_rate / 10, ether_sprintf(sc->sc_mib_addr.aMAC_Address));
-       if_attach(ifp);
 #ifdef __FreeBSD__
-       ether_ifattach(ifp);
-#if NBPFILTER > 0
-       bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
+       ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
 #else
+       if_attach(ifp);
        ether_ifattach(ifp, sc->sc_mib_addr.aMAC_Address);
 #if NBPFILTER > 0
        bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));

In other words - if_attach is no more.  But, older drivers still use
if_attach, and thus when ether_ifattach occurs, that's the second time
that happens.

Of course, I have no idea how the ether_ifattach argument change affects
things - I'm just guessing as to why Dennis may be asking.

Neil
-- 
Neil Blakey-Milner
Sunesi Clinical Systems
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to