From owner-freebsd-drivers@FreeBSD.ORG Sun Oct 27 10:16:52 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 663FFC2 for ; Sun, 27 Oct 2013 10:16:52 +0000 (UTC) (envelope-from noname.esst@yahoo.com) Received: from nm33-vm5.bullet.mail.bf1.yahoo.com (nm33-vm5.bullet.mail.bf1.yahoo.com [72.30.239.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05BAE2148 for ; Sun, 27 Oct 2013 10:16:51 +0000 (UTC) Received: from [98.139.212.148] by nm33.bullet.mail.bf1.yahoo.com with NNFMP; 27 Oct 2013 10:16:43 -0000 Received: from [98.139.212.224] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 27 Oct 2013 10:16:43 -0000 Received: from [127.0.0.1] by omp1033.mail.bf1.yahoo.com with NNFMP; 27 Oct 2013 10:16:43 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 886000.68341.bm@omp1033.mail.bf1.yahoo.com Received: (qmail 11521 invoked by uid 60001); 27 Oct 2013 10:16:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1382869003; bh=GoDh75spPzoL8Lr6Ujq8MQU7C/nMHY0UDxbt7GLkL/c=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=JsVb1uDU/MbXyPXUKpYsQOUGzTk00CRWDWBYmmeIyV8Q8n+Bn31lFVOMMQnAGnyP6NyAxdocJ0qRQGSazQpBp8uS/ufRs0tF+tFdwAFcE9PyTAO7gvoi2O+V3Q3kJTtpqq99+SLu8DWD5CXOwGGO45JrbgBxFA0DMIyZZIjaWZM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=35/V3rzayaN282CuSj9qvohj5PVrOryk8jVxpYjQRKIzOw4XHECNd6m9i30whp2iRv8jaHIb9sydEB3S7BDtLkCxjPZPIpjOmz7moItlSb+VBsDsyaKJHNH5g7AE5HogTeTvvRTYGbZvSiNeY5VxilC5JgIk/6sYrHA4cXpXlZw=; X-YMail-OSG: gevydX8VM1lLhYSkXl1Pz7uemQuquRo.KyWOr3e4WDikA.Q Mc9Y6Vc5CCKCjEr6opcB2SyjtUspCAcTNYzFbNhA3G7F9CyJFEtDzsEbITMI Y76prdGzeYU9_n80edCaZIlapOlaa6vAh74nzHhsGmwKpG59danidWGCihsN FLYtCRBlnjoIe_o1jORVX1YjvRaMj5NEBPUDKIlJR_tKjorhGLKhm2m66_Fi w1sfczt63fsh17YY175BFDPKdgbhBlZlesl4JgukjV7vljwiDWkCFI9s_6lX KkxyhTqSUZN.yVFsf0rKye.LsoKq.fkvaITPyGLZ0upJ20fGVTXyc_dW1Hhp JpctsKxKo2ikY9SaAWM0kBD4_r0g3Fi0MeuAhLbeS7MsYa6fYMtYdt94aZ9B 3R2N26sGP_6d54NGtb.8xLFbxR9Z6GLyW1t_.RhtLtLzVvVshKS8sLtChVWB OFVDa9vd6njoVpKeuXjxTREmOSb_dOdXkuJ0b8wwV0vTdpSSNaH8uZGkoWnp h4_ft0S9Ua5Z_l5QppQw- Received: from [89.165.120.140] by web162706.mail.bf1.yahoo.com via HTTP; Sun, 27 Oct 2013 03:16:43 PDT X-Rocket-MIMEInfo: 002.001, SGkgbGlzdA0KSSdtIG5ldyBoZXJlIGFuZCBJIHdhbnQgeW91IHRvIGV4Y3VzZSBtZSBmb3IgbmV3aXNoIHF1ZXN0aW9ucy4NCldlIGhhdmUgdG8gdHlwZXMgb2YgaWdiIGNhcmRzKGZpYmVyIGFuZCBFdGhlcm5ldCkgb24gb3VyIHN5c3RlbXMuIEJvdGggb2YgdGhlc2UgY2FyZHMgYXJlIG5hbWUgaWdiIyBJIHdhbnQgdG8gY2hhbmdlIGZpYmVyIG9uZXMgdG8gZm9vLiBJIGhhdmUgdG9vayBsb29rIGF0IGlmX2lnYi5jIGZpbGUsIGhvdyBjYW4gSSBkZXRlY3QgdGhlIHR5cGUgb2YgY2FyZHMgYmVmb3JlIGZpbGwBMAEBAQE- X-Mailer: YahooMailClassic/361 YahooMailWebService/0.8.160.587 Message-ID: <1382869003.10661.YahooMailBasic@web162706.mail.bf1.yahoo.com> Date: Sun, 27 Oct 2013 03:16:43 -0700 (PDT) From: Nomad Esst Subject: Changing igb to foo in if_igb.c To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2013 10:16:52 -0000 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 .