Author: marius
Date: Sat Jun  2 19:16:09 2012
New Revision: 236484
URL: http://svn.freebsd.org/changeset/base/236484

Log:
  MFC: r236328
  
  Try to finally get the point in time at which bge_add_sysctls() is called
  right; it needs to be called before bge_can_use_msi() but in turn requires
  bge_flags to be properly set.
  
  Submitted by: yongari

Modified:
  stable/9/sys/dev/bge/if_bge.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/dev/bge/if_bge.c
==============================================================================
--- stable/9/sys/dev/bge/if_bge.c       Sat Jun  2 19:15:22 2012        
(r236483)
+++ stable/9/sys/dev/bge/if_bge.c       Sat Jun  2 19:16:09 2012        
(r236484)
@@ -2368,7 +2368,6 @@ bge_dma_free(struct bge_softc *sc)
        if (sc->bge_cdata.bge_tx_mtag)
                bus_dma_tag_destroy(sc->bge_cdata.bge_tx_mtag);
 
-
        /* Destroy standard RX ring. */
        if (sc->bge_cdata.bge_rx_std_ring_map)
                bus_dmamap_unload(sc->bge_cdata.bge_rx_std_ring_tag,
@@ -2894,8 +2893,6 @@ bge_attach(device_t dev)
        sc = device_get_softc(dev);
        sc->bge_dev = dev;
 
-       bge_add_sysctls(sc);
-
        TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc);
 
        /*
@@ -3041,6 +3038,9 @@ bge_attach(device_t dev)
                break;
        }
 
+       /* Add SYSCTLs, requires the chipset family to be set. */
+       bge_add_sysctls(sc);
+
        /* Set various PHY bug flags. */
        if (sc->bge_chipid == BGE_CHIPID_BCM5701_A0 ||
            sc->bge_chipid == BGE_CHIPID_BCM5701_B0)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to