Date: Sun, 27 Oct 2013 03:16:43 -0700 (PDT) From: Nomad Esst <noname.esst@yahoo.com> To: freebsd-drivers@freebsd.org Subject: Changing igb to foo in if_igb.c Message-ID: <1382869003.10661.YahooMailBasic@web162706.mail.bf1.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi list I'm new here and I want you to excuse me for newish questions. We have to types of igb cards(fiber and Ethernet) on our systems. Both of these cards are name igb# I want to change fiber ones to foo. I have took look at if_igb.c file, how can I detect the type of cards before filling driver_t structure out? e.g. If type=bar then filling with igb as name else if type=foo then filling with foo as name. static device_method_t igb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, igb_probe), DEVMETHOD(device_attach, igb_attach), DEVMETHOD(device_detach, igb_detach), DEVMETHOD(device_shutdown, igb_shutdown), DEVMETHOD(device_suspend, igb_suspend), DEVMETHOD(device_resume, igb_resume), {0, 0} }; static driver_t igb_driver = { "igb", igb_methods, sizeof(struct adapter), }; static devclass_t igb_devclass; DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0); MODULE_DEPEND(igb, pci, 1, 1, 1); MODULE_DEPEND(igb, ether, 1, 1, 1); Thanks in advance .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1382869003.10661.YahooMailBasic>