Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/pci Pull up revisions 1.49, 1.51 (via patch, req...



details:   https://anonhg.NetBSD.org/src/rev/17a64fccc037
branches:  netbsd-1-5
changeset: 492945:17a64fccc037
user:      he <he%NetBSD.org@localhost>
date:      Sat Mar 09 16:52:53 2002 +0000

description:
Pull up revisions 1.49,1.51 (via patch, requested by christos):
  Make sure ifp->sc_softc is initialized before we set the media
  callbacks, and correct argument error in invocation of tl_init().

diffstat:

 sys/dev/pci/if_tl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 9b40f8721b64 -r 17a64fccc037 sys/dev/pci/if_tl.c
--- a/sys/dev/pci/if_tl.c       Sat Mar 09 16:47:20 2002 +0000
+++ b/sys/dev/pci/if_tl.c       Sat Mar 09 16:52:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tl.c,v 1.32.4.1 2001/11/13 21:41:58 he Exp $        */
+/*     $NetBSD: if_tl.c,v 1.32.4.2 2002/03/09 16:52:53 he Exp $        */
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -397,6 +397,7 @@
                return;
        }
        intrstr = pci_intr_string(pa->pa_pc, intrhandle);
+       sc->tl_if.if_softc = sc;
        sc->tl_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_NET,
            tl_intr, sc);
        if (sc->tl_ih == NULL) {
@@ -440,7 +441,6 @@
                ifmedia_set(&sc->tl_mii.mii_media, IFM_ETHER|IFM_AUTO);
 
        bcopy(sc->sc_dev.dv_xname, sc->tl_if.if_xname, IFNAMSIZ);
-       sc->tl_if.if_softc = sc;
        ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST;
        ifp->if_ioctl = tl_ifioctl;
        ifp->if_start = tl_ifstart;
@@ -1416,7 +1416,7 @@
 {
 
        if (ifp->if_flags & IFF_UP)
-               tl_init(ifp->if_softc);
+               tl_init(ifp);
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index