Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 1999 12:06:46 -0700 (PDT)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/pci if_ax.c if_dm.c if_fxp.c if_mx.c if_pn.c if_rl.c if_sf.c if_sis.c if_sk.c if_ste.c if_ti.c if_tl.c if_vr.c if_wb.c if_xl.c
Message-ID:  <199909201906.MAA39306@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       1999/09/20 12:06:46 PDT

  Modified files:
    sys/pci              if_ax.c if_dm.c if_fxp.c if_mx.c if_pn.c 
                         if_rl.c if_sf.c if_sis.c if_sk.c if_ste.c 
                         if_ti.c if_tl.c if_vr.c if_wb.c if_xl.c 
  Log:
  Un-do the changes to the DRIVER_MODULE() declarations in these drivers.
  This whole idea isn't going to work until somebody makes the bus/kld
  code smarter. The idea here is to change the module's internal name
  from "foo" to "if_foo" so that ifconfig can tell a network driver from
  a non-network one. However doing this doesn't work correctly no matter
  how you slice it. For everything to work, you have to change the name
  in both the driver_t struct and the DRIVER_MODULE() declaration. The
  problems are:
  
  - If you change the name in both places, then the kernel thinks that
    the device's name is now "if_foo", so you get things like:
  
  if_foo0: <FOO ethernet> irq foo at device foo on pcifoo
  if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo
  
    This is bogus. Now the device name doesn't agree with the logical
    interface name. There's no reason for this, and it violates the
    principle of least astonishment.
  
  - If you leave the name in the driver_t struct as "foo" and only
    change the names in the DRIVER_MODULE() declaration to "if_foo" then
    attaching drivers to child devices doesn't work because the names don't
    agree. This breaks miibus: drivers that need to have miibuses and PHY
    drivers attached never get them.
  
  In other words: damned if you do, damned if you don't.
  
  This needs to be thought through some more. Since the drivers that
  use miibus are broken, I have to change these all back in order to
  make them work again. Yes this will stop ifconfig from being able
  to demand load driver modules. On the whole, I'd rather have that
  than having the drivers not work at all.
  
  Revision  Changes    Path
  1.17      +3 -3      src/sys/pci/if_ax.c
  1.12      +4 -4      src/sys/pci/if_dm.c
  1.74      +2 -2      src/sys/pci/if_fxp.c
  1.27      +3 -3      src/sys/pci/if_mx.c
  1.31      +3 -3      src/sys/pci/if_pn.c
  1.31      +4 -4      src/sys/pci/if_rl.c
  1.12      +4 -4      src/sys/pci/if_sf.c
  1.10      +4 -4      src/sys/pci/if_sis.c
  1.16      +3 -3      src/sys/pci/if_sk.c
  1.11      +4 -4      src/sys/pci/if_ste.c
  1.22      +3 -3      src/sys/pci/if_ti.c
  1.47      +4 -4      src/sys/pci/if_tl.c
  1.23      +4 -4      src/sys/pci/if_vr.c
  1.23      +4 -4      src/sys/pci/if_wb.c
  1.63      +4 -4      src/sys/pci/if_xl.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909201906.MAA39306>