From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 02:00:57 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF5A21065673 for ; Thu, 4 Jun 2009 02:00:57 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexch1.qlogic.com (avexch1.qlogic.com [198.70.193.115]) by mx1.freebsd.org (Postfix) with ESMTP id 957848FC1A for ; Thu, 4 Jun 2009 02:00:57 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexcashub1.qlogic.org ([10.1.4.112]) by avexch1.qlogic.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 3 Jun 2009 18:48:12 -0700 Received: from avexcashub2.qlogic.org (10.1.4.116) by avexcashub1.qlogic.org (10.1.4.161) with Microsoft SMTP Server (TLS) id 8.1.375.2; Wed, 3 Jun 2009 18:48:12 -0700 Received: from avexmb1.qlogic.org ([fe80::9526:ffe6:33fc:cbe3]) by avexcashub2.qlogic.org ([::1]) with mapi; Wed, 3 Jun 2009 18:48:12 -0700 From: David Somayajulu To: "freebsd-drivers@freebsd.org" Date: Wed, 3 Jun 2009 18:48:08 -0700 Thread-Topic: How do I pass configuration parameters to a FreeBSD Device Driver ? Thread-Index: AcnktoLTW7BurjWjSnmUikeeJA3giQ== Message-ID: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: vgI= AC6M AD3X BhZQ DcUw DlGO D9v7 EAWR ErOc FFlQ Fp8V GLK/ HqVu HvtX I9Wf KRrZ; 1; ZgByAGUAZQBiAHMAZAAtAGQAcgBpAHYAZQByAHMAQABmAHIAZQBlAGIAcwBkAC4AbwByAGcA; Sosha1_v1; 7; {BDFBD870-A00C-4780-B993-655248E60B91}; ZABhAHYAaQBkAC4AcwBvAG0AYQB5AGEAagB1AGwAdQBAAHEAbABvAGcAaQBjAC4AYwBvAG0A; Thu, 04 Jun 2009 01:48:08 GMT; SABvAHcAIABkAG8AIABJACAAcABhAHMAcwAgAGMAbwBuAGYAaQBnAHUAcgBhAHQAaQBvAG4AIABwAGEAcgBhAG0AZQB0AGUAcgBzACAAdABvACAAYQAgAEYAcgBlAGUAQgBTAEQAIABEAGUAdgBpAGMAZQAgAEQAcgBpAHYAZQByACAAPwA= x-cr-puzzleid: {BDFBD870-A00C-4780-B993-655248E60B91} acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jun 2009 01:48:12.0008 (UTC) FILETIME=[84CE8E80:01C9E4B6] Subject: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 02:00:58 -0000 Hi All, I would appreciate if you could let me know, how I can pass configuration p= arameters to a device driver, which can be processed during either probe() = or attach() ? Is there a way to read them from a conf file of some sort ? B= asically, I am interested in setting some tunable parameters during driver = initialization, without needing to recompile the driver every time. thanks david Somayajulu From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 02:18:41 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23CA8106566C for ; Thu, 4 Jun 2009 02:18:41 +0000 (UTC) (envelope-from larrypatrickmaloney@yahoo.com) Received: from n25.bullet.mail.mud.yahoo.com (n25.bullet.mail.mud.yahoo.com [68.142.206.220]) by mx1.freebsd.org (Postfix) with SMTP id AA6138FC15 for ; Thu, 4 Jun 2009 02:18:40 +0000 (UTC) (envelope-from larrypatrickmaloney@yahoo.com) Received: from [209.191.108.96] by n25.bullet.mail.mud.yahoo.com with NNFMP; 04 Jun 2009 02:05:45 -0000 Received: from [68.142.201.73] by t3.bullet.mud.yahoo.com with NNFMP; 04 Jun 2009 02:05:45 -0000 Received: from [127.0.0.1] by omp425.mail.mud.yahoo.com with NNFMP; 04 Jun 2009 02:05:45 -0000 X-Yahoo-Newman-Id: 905522.42311.bm@omp425.mail.mud.yahoo.com Received: (qmail 10696 invoked from network); 4 Jun 2009 02:05:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:Reply-To:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type; b=vGdOHO051Z7RhBRy+JgLNAhZRxn8SrMKo4I6P4tVAZ3xjhxqvIam5My8hSdpMyshg+MY7MrU0dISu68cLGy/qd3oLuj+1GbqBDQsWnRVlIBlVKvQvo9789pd8JvbIYr9gBJ9unXb3AW3mzL9SPTpH8mIAP0AWGAptn7Q3wg1gYs= ; Received: from unknown (HELO ?192.168.0.104?) (larrypatrickmaloney@98.248.38.199 with plain) by smtp128.plus.mail.sp1.yahoo.com with SMTP; 4 Jun 2009 02:05:45 -0000 X-Yahoo-SMTP: 7OqSfhCswBDs4S1kGTQLHIZnhJJuZcdkl1X32ZWTBJc- X-YMail-OSG: _UUg09oVM1lFOdNMMM00Z.fKxvL.c5jKttHlQBxAP8sC5BiXF1mgu5pijD7cEX66Kp5ZpPwVO5Ncwq_7inh__0SNquCcaNrX.l1dnreAlNWqY21k3F8Q0rhRoMy6FATD.YTdgK0cJIlPem4R0ojYgpRvhBBmb6G_xJjfg7OPEwZ8DTue.JLaLg1SD.tr_GmdvGexPBfyckXoSrs2reXm_LdeBlXcTz4qwUwlF9IlIWQLEKYm7BUU_8BY7qJjX1dY_6Hd6i1jdvr8jyIC3SXZXOENXtZ.fwPluLNYXYIDbSM3DQ9y007okWG5FiLn1uaKNp.8PQbH5mdZsnbnaJ1IjI89VTRiv7w0EB_C X-Yahoo-Newman-Property: ymail-3 Message-ID: <4A272BF7.8060604@yahoo.com> Date: Wed, 03 Jun 2009 19:05:43 -0700 From: Larry Maloney Organization: SoftNet Solutions User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15 MIME-Version: 1.0 To: David Somayajulu References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> In-Reply-To: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> Content-Type: multipart/mixed; boundary="------------010701040306000201030706" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-drivers@freebsd.org" Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: larrypatrickmaloney@yahoo.com List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 02:18:41 -0000 This is a multi-part message in MIME format. --------------010701040306000201030706 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David Somayajulu wrote: > Hi All, > I would appreciate if you could let me know, how I can pass configuration parameters to a device driver, which can be processed during either probe() or attach() ? Is there a way to read them from a conf file of some sort ? Basically, I am interested in setting some tunable parameters during driver initialization, without needing to recompile the driver every time. > > thanks > david Somayajulu > > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" > > Isn't that what the hints file is for? Larry -- ============================== Larry P. Maloney CEO/CTO SoftNet Solutions Phone: 650-961-2315 Web: www.softnetsolution.com --------------010701040306000201030706-- From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 02:28:11 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9785106566C for ; Thu, 4 Jun 2009 02:28:11 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexch1.qlogic.com (avexch1.qlogic.com [198.70.193.115]) by mx1.freebsd.org (Postfix) with ESMTP id B78468FC12 for ; Thu, 4 Jun 2009 02:28:11 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexcashub1.qlogic.org ([10.1.4.112]) by avexch1.qlogic.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 3 Jun 2009 19:27:26 -0700 Received: from avexmb1.qlogic.org ([fe80::9526:ffe6:33fc:cbe3]) by avexcashub1.qlogic.org ([::1]) with mapi; Wed, 3 Jun 2009 19:27:25 -0700 From: David Somayajulu To: "larrypatrickmaloney@yahoo.com" Date: Wed, 3 Jun 2009 19:27:25 -0700 Thread-Topic: How do I pass configuration parameters to a FreeBSD Device Driver ? Thread-Index: AcnkuOAplDQKxgFiSAeJ4s5UA/tC6AAAhICg Message-ID: <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> <4A272BF7.8060604@yahoo.com> In-Reply-To: <4A272BF7.8060604@yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jun 2009 02:27:26.0122 (UTC) FILETIME=[FFF7D8A0:01C9E4BB] Cc: "freebsd-drivers@freebsd.org" Subject: RE: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 02:28:12 -0000 Larry Maloney wrote: > David Somayajulu wrote: > > Hi All, > > I would appreciate if you could let me know, how I can pass > configuration parameters to a device driver, which can be processed > during either probe() or attach() ? Is there a way to read them from a > conf file of some sort ? Basically, I am interested in setting some > tunable parameters during driver initialization, without needing to > recompile the driver every time. > > > > thanks > > david Somayajulu > > > > _______________________________________________ > > freebsd-drivers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > > To unsubscribe, send any mail to "freebsd-drivers- > unsubscribe@freebsd.org" > > > > > Isn't that what the hints file is for? Sorry, I am sort of new to FreeBSD. From what I understand /boot/device.hin= ts gets read during boot time, the values cannot be changed by the user whi= le the kernel is running - am I correct ? I have a loadable driver module and would like to do the following: 1. Set some tunable parameters of the driver. 2. Load the driver. Run a few tests. 3. Unload the driver. 4. repeat steps 1 thru 3. >=20 > Larry >=20 > -- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > Larry P. Maloney > CEO/CTO SoftNet Solutions >=20 > Phone: 650-961-2315 > Web: www.softnetsolution.com From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 03:47:16 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E62CE106566C for ; Thu, 4 Jun 2009 03:47:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A954D8FC16 for ; Thu, 4 Jun 2009 03:47:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n543S5iK072785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2009 20:28:06 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4A273F45.8050700@freebsd.org> Date: Wed, 03 Jun 2009 20:28:05 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090411) MIME-Version: 1.0 To: David Somayajulu References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> <4A272BF7.8060604@yahoo.com> <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> In-Reply-To: <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: "freebsd-drivers@freebsd.org" Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 03:47:17 -0000 David Somayajulu wrote: > Larry Maloney wrote: > >> David Somayajulu wrote: >> >>> Hi All, >>> I would appreciate if you could let me know, how I can pass >>> >> configuration parameters to a device driver, which can be processed >> during either probe() or attach() ? Is there a way to read them from a >> conf file of some sort ? Basically, I am interested in setting some >> tunable parameters during driver initialization, without needing to >> recompile the driver every time. >> loader(8) allows you to set tunable parameters before boot; this is equivalent to linux-style module parameters (mostly). Unfortunately I don't see anything in the man pages that documents them; check sys/sys/kernel.h for the details and/or loader(8). Sam From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 04:12:56 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED6EE1065674 for ; Thu, 4 Jun 2009 04:12:56 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n73.bullet.mail.sp1.yahoo.com (n73.bullet.mail.sp1.yahoo.com [98.136.44.191]) by mx1.freebsd.org (Postfix) with SMTP id 555C28FC1B for ; Thu, 4 Jun 2009 04:12:56 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [216.252.122.219] by n73.bullet.mail.sp1.yahoo.com with NNFMP; 04 Jun 2009 03:59:48 -0000 Received: from [69.147.65.164] by t4.bullet.sp1.yahoo.com with NNFMP; 04 Jun 2009 03:59:45 -0000 Received: from [127.0.0.1] by omp409.mail.sp1.yahoo.com with NNFMP; 04 Jun 2009 03:59:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 994032.46237.bm@omp409.mail.sp1.yahoo.com Received: (qmail 42112 invoked by uid 60001); 4 Jun 2009 03:59:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1244087984; bh=OR/rsB85Trnhr0RZ5ag7L4fBY+nlqO/GaC8w01ZJNjg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Bf1e9a7gVNhgFz1Gzn09TVOHCA8sZQzhcaAKKgCxphrY4Fg7zKWxFgsHYykMqXlcnPdTS+O4LfAvFhBCFHKo57/aCEht9A8TcccxR/2o5KedX11yCH7BZjgSef+X5yGSSY8eYScJIOgKzMhFvKJPBU5U6l26+R9VKLxXF3YsLOY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=g8MyaKZib3vm2eD/gMjYg2cHIcvVaDYzQIxszS5ql504HsNVOPCBo3QuW7ze7MIm0nVuEYqOfrViNS/9FNsRMuE2KSJjDNDPePiLCEyp2FC92QpdeD+kJVEv3ERCOeGHo5VY9RbokbI360IHSJ612lVsgwcbm4jE1HMYK+JQ9z4=; Message-ID: <798432.42061.qm@web45803.mail.sp1.yahoo.com> X-YMail-OSG: jvaTfYIVM1kKcdRd18teuZbQQbjzE08fPoEp7o9uqaJuaj5I_ABx_F_CAR.98I9B7UvJ1wcSegfTxa2ATG5Rc9eMLyVBqFTWuCrjSJvLeVidTjD85KFYg62g6tpOt_l0PiZ5IjYJhOTtPtK0HGNfIdrrXH2AycsDMw4wMsYhkwGQnBAOkUpFRCqJuDm2YaiIn8v8BWpstaMi9QtUwvxyQQDUAHtHDhdhAbi2NlwsVXgfF6UWIsjLesEAN0JcAp_SsqJ1u9PgJWUp3c_J Received: from [58.71.34.137] by web45803.mail.sp1.yahoo.com via HTTP; Wed, 03 Jun 2009 20:59:44 PDT X-Mailer: YahooMailClassic/5.4.12 YahooMailWebService/0.7.289.10 Date: Wed, 3 Jun 2009 20:59:44 -0700 (PDT) From: Won De Erick To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: What driver/NIC is using cxgb feature/s? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 04:12:57 -0000 Hello, I am just curious what driver/NIC is using cxgb msi tunable. I don't have a Chelsio NIC installed on the box. # sysctl -a | grep msi hw.bce.msi_enable: 1 hw.cxgb.msi_allowed: 2 hw.pci.honor_msi_blacklist: 1 hw.pci.enable_msix: 1 hw.pci.enable_msi: 1 Some relevant info: # uname -msrp FreeBSD 7.1-RELEASE-p5 amd64 amd64 # ifconfig bge0: flags=8843 metric 0 mtu 1500 options=9b ether 00:08:9b:bb:02:ff inet6 fe80::208:9bff:febb:2ff%bge0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect (1000baseTX ) status: active bge1: flags=8843 metric 0 mtu 1500 options=9b ether 00:08:9b:bb:03:00 inet6 fe80::208:9bff:febb:300%bge1 prefixlen 64 scopeid 0x2 inet [removed] netmask 0xfffffff0 broadcast [removed] inet6 2001:418:5403:5000::1 prefixlen 52 inet [removed] netmask 0xffffffff broadcast [removed] media: Ethernet autoselect (1000baseTX ) status: active ste0: flags=8843 metric 0 mtu 1500 options=8 ether 00:05:5d:64:b0:0e inet6 fe80::205:5dff:fe64:b00e%ste0 prefixlen 64 scopeid 0x3 inet 10.2.62.62 netmask 0xfff00000 broadcast 10.15.255.255 inet6 2001:418:5403:2410:62:62:62:62 prefixlen 64 media: Ethernet autoselect (100baseTX ) status: active ste1: flags=8843 metric 0 mtu 1500 options=8 ether 00:05:5d:64:b0:0f inet6 fe80::205:5dff:fe64:b00f%ste1 prefixlen 64 scopeid 0x4 inet 10.255.255.1 netmask 0xffffff00 broadcast 10.255.255.255 media: Ethernet autoselect (100baseTX ) status: active ste2: flags=8802 metric 0 mtu 1500 options=8 ether 00:05:5d:64:b0:10 media: Ethernet autoselect (none) status: no carrier ste3: flags=8802 metric 0 mtu 1500 options=8 ether 00:05:5d:64:b0:11 media: Ethernet autoselect (none) status: no carrier pfsync0: flags=41 metric 0 mtu 1460 pfsync: syncdev: lo0 syncpeer: 224.0.0.240 maxupd: 128 pflog0: flags=100 metric 0 mtu 33160 lo0: flags=8049 metric 0 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 inet6 ::1 prefixlen 128 enc0: flags=0<> metric 0 mtu 1536 gif0: flags=8051 metric 0 mtu 1280 tunnel inet 124.107.255.62 --> 204.2.248.1 inet6 2001:418:5403::c --> 2001:418:5403::a prefixlen 128 inet6 fe80::208:9bff:febb:2ff%gif0 prefixlen 64 scopeid 0xc vlan3800: flags=8843 metric 0 mtu options=3 ether 00:08:9b:bb:02:ff inet6 fe80::208:9bff:febb:2ff%vlan3800 prefixlen 64 scopeid 0xb inet 124.107.255.62 netmask 0xfffffffc broadcast 124.107.255.63 media: Ethernet autoselect (1000baseTX ) status: active vlan: 3800 parent interface: bge0 Thanks! Won From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 06:58:02 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B58EF106570D for ; Thu, 4 Jun 2009 06:58:00 +0000 (UTC) (envelope-from prvs=14063a7d85=marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.freebsd.org (Postfix) with ESMTP id C82448FC14 for ; Thu, 4 Jun 2009 06:57:59 +0000 (UTC) (envelope-from prvs=14063a7d85=marc.loerner@hob.de) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id 5ABC252008B for ; Thu, 4 Jun 2009 08:25:37 +0200 (CEST) Received: from linux05.localnet (linux05.hob.de [172.22.0.196]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id 27C70FDA77 for ; Thu, 4 Jun 2009 08:25:37 +0200 (CEST) From: Marc Loerner To: freebsd-drivers@freebsd.org Date: Thu, 4 Jun 2009 08:22:40 +0200 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-server; KDE/4.1.4; x86_64; ; ) References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> <4A272BF7.8060604@yahoo.com> <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> In-Reply-To: <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906040822.41153.marc.loerner@hob.de> Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 06:58:03 -0000 Am Donnerstag 04 Juni 2009 04:27:25 schrieb David Somayajulu: > Larry Maloney wrote: > > David Somayajulu wrote: > > > Hi All, > > > I would appreciate if you could let me know, how I can pass > > > > configuration parameters to a device driver, which can be processed > > during either probe() or attach() ? Is there a way to read them from a > > conf file of some sort ? Basically, I am interested in setting some > > tunable parameters during driver initialization, without needing to > > recompile the driver every time. > > > > > thanks > > > david Somayajulu > > > > > > _______________________________________________ > > > freebsd-drivers@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > > > To unsubscribe, send any mail to "freebsd-drivers- > > > > unsubscribe@freebsd.org" > > > > > > Isn't that what the hints file is for? > > Sorry, I am sort of new to FreeBSD. From what I understand > /boot/device.hints gets read during boot time, the values cannot be changed > by the user while the kernel is running - am I correct ? > > I have a loadable driver module and would like to do the following: > 1. Set some tunable parameters of the driver. > 2. Load the driver. Run a few tests. > 3. Unload the driver. > 4. repeat steps 1 thru 3. > I think exactly what you search is sysctls. There you have tunables to change at runtime Regards, Marc > > Larry > > > > -- > > ============================== > > Larry P. Maloney > > CEO/CTO SoftNet Solutions > > > > Phone: 650-961-2315 > > Web: www.softnetsolution.com > > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 06:58:03 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C000B1065715 for ; Thu, 4 Jun 2009 06:58:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C3FAC8FC15 for ; Thu, 4 Jun 2009 06:58:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n546v9pn045102; Thu, 4 Jun 2009 00:57:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 04 Jun 2009 00:57:23 -0600 (MDT) Message-Id: <20090604.005723.1179135550.imp@bsdimp.com> To: david.somayajulu@qlogic.com From: "M. Warner Losh" In-Reply-To: <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> <4A272BF7.8060604@yahoo.com> <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-drivers@freebsd.org Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 06:58:03 -0000 In message: <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> David Somayajulu writes: : : : Larry Maloney wrote: : > David Somayajulu wrote: : > > Hi All, : > > I would appreciate if you could let me know, how I can pass : > configuration parameters to a device driver, which can be processed : > during either probe() or attach() ? Is there a way to read them from a : > conf file of some sort ? Basically, I am interested in setting some : > tunable parameters during driver initialization, without needing to : > recompile the driver every time. : > > : > > thanks : > > david Somayajulu : > > : > > _______________________________________________ : > > freebsd-drivers@freebsd.org mailing list : > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers : > > To unsubscribe, send any mail to "freebsd-drivers- : > unsubscribe@freebsd.org" : > > : > > : > Isn't that what the hints file is for? : : Sorry, I am sort of new to FreeBSD. From what I understand /boot/device.hints gets read during boot time, the values cannot be changed by the user while the kernel is running - am I correct ? : : I have a loadable driver module and would like to do the following: : 1. Set some tunable parameters of the driver. : 2. Load the driver. Run a few tests. : 3. Unload the driver. : 4. repeat steps 1 thru 3. kenv can set hints. Hints are properly retrieved with things like resource_int_value. prefer_iomap = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "prefer_iomap", &prefer_iomap); would look for the hint "hints...prefer_iomap" and return the value if it finds it. Warner From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 07:02:07 2009 Return-Path: Delivered-To: freebsd-drivers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39342106566B for ; Thu, 4 Jun 2009 07:02:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D79248FC13 for ; Thu, 4 Jun 2009 07:02:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n5470ATP045143; Thu, 4 Jun 2009 01:00:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 04 Jun 2009 01:00:24 -0600 (MDT) Message-Id: <20090604.010024.502288660.imp@bsdimp.com> To: won.derick@yahoo.com From: "M. Warner Losh" In-Reply-To: <798432.42061.qm@web45803.mail.sp1.yahoo.com> References: <798432.42061.qm@web45803.mail.sp1.yahoo.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-drivers@FreeBSD.org Subject: Re: What driver/NIC is using cxgb feature/s? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 07:02:07 -0000 In message: <798432.42061.qm@web45803.mail.sp1.yahoo.com> Won De Erick writes: : I am just curious what driver/NIC is using cxgb msi tunable. I don't have a Chelsio NIC installed on the box. cxgb is using it. : # sysctl -a | grep msi : hw.bce.msi_enable: 1 : hw.cxgb.msi_allowed: 2 : hw.pci.honor_msi_blacklist: 1 : hw.pci.enable_msix: 1 : hw.pci.enable_msi: 1 This just means that if you had a cxgb device, the hints are suggesting you use it. If you don't have one, then nothing will happen. You get this because you have cxgb compiled into the kernel, or loaded as a module. Warner From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 07:19:04 2009 Return-Path: Delivered-To: freebsd-drivers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2552F106566C for ; Thu, 4 Jun 2009 07:19:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9F9CE8FC16 for ; Thu, 4 Jun 2009 07:19:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n547HiM8045358; Thu, 4 Jun 2009 01:17:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 04 Jun 2009 01:17:58 -0600 (MDT) Message-Id: <20090604.011758.87764865.imp@bsdimp.com> To: marc.loerner@hob.de From: "M. Warner Losh" In-Reply-To: <200906040822.41153.marc.loerner@hob.de> References: <4A272BF7.8060604@yahoo.com> <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> <200906040822.41153.marc.loerner@hob.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-drivers@FreeBSD.org Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 07:19:04 -0000 In message: <200906040822.41153.marc.loerner@hob.de> Marc Loerner writes: : Am Donnerstag 04 Juni 2009 04:27:25 schrieb David Somayajulu: : > Larry Maloney wrote: : > > David Somayajulu wrote: : > > > Hi All, : > > > I would appreciate if you could let me know, how I can pass : > > : > > configuration parameters to a device driver, which can be processed : > > during either probe() or attach() ? Is there a way to read them from a : > > conf file of some sort ? Basically, I am interested in setting some : > > tunable parameters during driver initialization, without needing to : > > recompile the driver every time. : > > : > > > thanks : > > > david Somayajulu : > > > : > > > _______________________________________________ : > > > freebsd-drivers@freebsd.org mailing list : > > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers : > > > To unsubscribe, send any mail to "freebsd-drivers- : > > : > > unsubscribe@freebsd.org" : > > : > > : > > Isn't that what the hints file is for? : > : > Sorry, I am sort of new to FreeBSD. From what I understand : > /boot/device.hints gets read during boot time, the values cannot be changed : > by the user while the kernel is running - am I correct ? : > : > I have a loadable driver module and would like to do the following: : > 1. Set some tunable parameters of the driver. : > 2. Load the driver. Run a few tests. : > 3. Unload the driver. : > 4. repeat steps 1 thru 3. : > : : I think exactly what you search is sysctls. There you have tunables to change : at runtime It depends a lot on how the sysctl/tunable is used/set. If you are using pure hints, then you need to use the kenv method I talked about. If you are using a more general tunable (eg hw.DRIVERNAME.rx_buffers, say), then that can be set at runtime, and there's hooks into the driver that allow it to react to the new value. This can be a better choice than hints, but is a little harder to code up. But the different isn't that huge... Warner From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 11:35:34 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA951065672 for ; Thu, 4 Jun 2009 11:35:34 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id C83098FC1A for ; Thu, 4 Jun 2009 11:35:33 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7c3e.q.ppp-pool.de [89.53.124.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id 55BBE12884D for ; Thu, 4 Jun 2009 07:22:03 +0200 (CEST) Received: from [192.168.16.4] (dardanos.sz.vwsoft.com [192.168.16.4]) by mail.vtec.ipme.de (Postfix) with ESMTP id 9A22B33F91; Thu, 4 Jun 2009 07:21:21 +0200 (CEST) Message-ID: <4A2759F2.7070007@vwsoft.com> Date: Thu, 04 Jun 2009 07:21:54 +0200 From: Volker User-Agent: Thunderbird 2.0.0.21 (X11/20090417) MIME-Version: 1.0 To: David Somayajulu References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> In-Reply-To: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-MailScanner-ID: 9A22B33F91.70A21 X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com MailScanner-NULL-Check: 1244697687.05018@hhj+kBlOQh8PMiWruqvo7Q X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: "freebsd-drivers@freebsd.org" Subject: Re: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 11:35:34 -0000 On 06/04/09 03:48, David Somayajulu wrote: > Hi All, > I would appreciate if you could let me know, how I can pass configuration parameters to a device driver, which can be processed during either probe() or attach() ? Is there a way to read them from a conf file of some sort ? Basically, I am interested in setting some tunable parameters during driver initialization, without needing to recompile the driver every time. > David, you may want to look up the kernel sources for TUNEABLE_XXX() macros. Volker From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 19:13:43 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89AB1106564A for ; Thu, 4 Jun 2009 19:13:43 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexch1.qlogic.com (avexch1.qlogic.com [198.70.193.115]) by mx1.freebsd.org (Postfix) with ESMTP id 62DE38FC16 for ; Thu, 4 Jun 2009 19:13:43 +0000 (UTC) (envelope-from david.somayajulu@qlogic.com) Received: from avexcashub1.qlogic.org ([10.1.4.112]) by avexch1.qlogic.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 4 Jun 2009 12:12:56 -0700 Received: from avexmb1.qlogic.org ([fe80::9526:ffe6:33fc:cbe3]) by avexcashub1.qlogic.org ([::1]) with mapi; Thu, 4 Jun 2009 12:12:56 -0700 From: David Somayajulu To: "M. Warner Losh" Date: Thu, 4 Jun 2009 12:12:55 -0700 Thread-Topic: How do I pass configuration parameters to a FreeBSD Device Driver ? Thread-Index: Acnk4c8IOdH2htniSPiF4lw8LacXogAZlrjQ Message-ID: <75E1A2A7D185F841A975979B0906BBA65A4D0C663A@AVEXMB1.qlogic.org> References: <75E1A2A7D185F841A975979B0906BBA65A4D0C658A@AVEXMB1.qlogic.org> <4A272BF7.8060604@yahoo.com> <75E1A2A7D185F841A975979B0906BBA65A4D0C6595@AVEXMB1.qlogic.org> <20090604.005723.1179135550.imp@bsdimp.com> In-Reply-To: <20090604.005723.1179135550.imp@bsdimp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jun 2009 19:12:56.0943 (UTC) FILETIME=[77F08FF0:01C9E548] Cc: "freebsd-drivers@freebsd.org" Subject: RE: How do I pass configuration parameters to a FreeBSD Device Driver ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 19:13:43 -0000 M. Warner Losh wrote: > : I have a loadable driver module and would like to do the following: > : 1. Set some tunable parameters of the driver. > : 2. Load the driver. Run a few tests. > : 3. Unload the driver. > : 4. repeat steps 1 thru 3. >=20 > kenv can set hints. >=20 > Hints are properly retrieved with things like resource_int_value. >=20 > prefer_iomap =3D 0; > resource_int_value(device_get_name(dev), device_get_unit(dev), > "prefer_iomap", &prefer_iomap); >=20 > would look for the hint "hints...prefer_iomap" and > return the value if it finds it. >=20 > Warner Thanks a lot. This is exactly what I need. Appreciate everyone's responses. thanks david S. From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 19:24:09 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77C8D106566B for ; Thu, 4 Jun 2009 19:24:09 +0000 (UTC) (envelope-from aric.shipley@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 364BC8FC19 for ; Thu, 4 Jun 2009 19:24:09 +0000 (UTC) (envelope-from aric.shipley@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so515389ywe.13 for ; Thu, 04 Jun 2009 12:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=KcX5Mx02Khiik29R+3+G7MGEwlAifi6RA3M890jL2Kg=; b=uNt+XywdgJrcCJ/+FyJ41jmSUjF9izbaFBtf6i8bZDEnxq7tqz+EMJ5MMy3YDc9XxU sqJix2zcSCFsVNDbztqxJw9koK1/SYy90wwqJZ3L4P6twfeYEAwwCX6HumAeojHcqlwN dw68vUnIkv3LZVH6/jYtkB3MY/ZxwTFQlT5VQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=OQEp2goRTccR7yWhFcyvWJ052KAYjCYKBeg6ThBIrzifY/cotLFndr2xxxEqLunapK N/5YSX22wfZoYA62VuvozSjBEWIPNr6benzs/Ew6bVyAw6yUFwi5JpohsHmAqFEmlvAg cQxJ8kQDT8ag5TlZ3Ks5i9cyG392gRCoD8ZGI= MIME-Version: 1.0 Received: by 10.90.118.19 with SMTP id q19mr2116680agc.87.1244142151007; Thu, 04 Jun 2009 12:02:31 -0700 (PDT) Date: Thu, 4 Jun 2009 15:02:30 -0400 Message-ID: From: AJ Shipley To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Kernel Loadable Driver vs. Custom Compiled Driver Question X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 19:24:09 -0000 Hi, I am in the process of integrating a 3rd party HW vendor=92s driver into our FreeBSD code base. The driver works when it is loaded as a KLM using kldload =96v but when I modified the kernel using config and compiled the driver into the kernel, it does not work. The kernel builds and installs fine, but the driver does not load correctly. I was able to verify that the first 10 steps of the driver works during load in both cases and that the driver is loading the device into the same PCI memory range (it=92s a PCI based HW card). However, at a critical step in the driver, it polls an ISR register waiting for a bit to toggle high indicating that the board is ready and out of reset and it never does, and eventually hits the driver timeout and aborts its load. Why would a driver work as a KLM but not statically compiled into the kerne= l? Thanks AJ Shipley From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 4 20:37:40 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B09D5106566B for ; Thu, 4 Jun 2009 20:37:40 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 358918FC0A for ; Thu, 4 Jun 2009 20:37:40 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by bwz9 with SMTP id 9so71424bwz.43 for ; Thu, 04 Jun 2009 13:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=X0DHo+mAHQSX3ZDZHgTYEqrqDNFPUaA53mFIkTk8IG8=; b=QjjdPFxFlMeb7eC8mG2ufo0Hhzu+4IHo0DTP7fnpHIl5jsrogLf8x6S+VncxO+i3yG qWW2dF2Q8hgsWo5iXt6VHx3fsjXjUEn3oTCjnawSriuAOleN/Fl64JcsK+LmyFq15E3/ THRafakTfwouMZiyhls8hpXdSR6o2ULX+5Ll8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PL7kexRGBqF9PtpPtAMs4jmKobXZ2zza5J11SDotTJ1sYNjcy0vDUbvdWbyQxdLQgT 25u4XT9MQBHt3udZG7BFLQ7WT2BVa1dReV6vmxnJH/CF9b8ySeQ4uRXeNH8XfuTcH0d0 HsmSWwG6tc2YoJu66r6KpmoTsjQbpytZfEADk= MIME-Version: 1.0 Received: by 10.204.58.9 with SMTP id e9mr2400225bkh.23.1244146454016; Thu, 04 Jun 2009 13:14:14 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Jun 2009 20:14:13 +0000 Message-ID: <3a142e750906041314o5666cfc5ibe93b1810e1b825@mail.gmail.com> From: "Paul B. Mahol" To: AJ Shipley Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-drivers@freebsd.org Subject: Re: Kernel Loadable Driver vs. Custom Compiled Driver Question X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 20:37:40 -0000 On 6/4/09, AJ Shipley wrote: > Hi, > > I am in the process of integrating a 3rd party HW vendor's driver into > our FreeBSD code base. The driver works when it is loaded as a KLM > using kldload -v but when I modified the kernel using > config and compiled the driver into the kernel, it does not work. The > kernel builds and installs fine, but the driver does not load > correctly. > > I was able to verify that the first 10 steps of the driver works > during load in both cases and that the driver is loading the device > into the same PCI memory range (it's a PCI based HW card). However, > at a critical step in the driver, it polls an ISR register waiting for > a bit to toggle high indicating that the board is ready and out of > reset and it never does, and eventually hits the driver timeout and > aborts its load. > > Why would a driver work as a KLM but not statically compiled into the > kernel? Races? -- Paul From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 5 10:12:19 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DB7E10656A8 for ; Fri, 5 Jun 2009 10:12:19 +0000 (UTC) (envelope-from ericd@free.fr) Received: from meteor.synten.com (ns4.synten.com [193.47.141.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2245D8FC15 for ; Fri, 5 Jun 2009 10:12:18 +0000 (UTC) (envelope-from ericd@free.fr) Received: from PCdeEricDHEM (LRouen-151-73-20-55.w80-13.abo.wanadoo.fr [80.13.51.55]) by meteor.synten.com (8.13.2/8.13.2) with SMTP id n559v7tl005808 for ; Fri, 5 Jun 2009 11:57:07 +0200 Message-ID: <5E42C46B1EB84E55963EC55EF515B4A0@PCdeEricDHEM> From: "Eric" To: Date: Fri, 5 Jun 2009 11:55:37 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-SYNTEN-MailScanner-Information: Please contact the ISP for more information X-SYNTEN-MailScanner: Found to be clean X-SYNTEN-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (not cached, score=1.894, requis 10, AWL 0.59, BAYES_20 -0.74, HTML_MESSAGE 0.00, RCVD_IN_SORBS_DUL 2.05) X-SYNTEN-MailScanner-SpamScore: s X-SYNTEN-MailScanner-From: ericd@free.fr X-Spam-Status: No Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 10:12:19 -0000 Hi, Does any one find solution to this problem as we have same, try a = proposed patch but still have problem and don't find anywhere the = solution? Regards, Eric. From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 5 10:20:28 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0D91065674 for ; Fri, 5 Jun 2009 10:20:28 +0000 (UTC) (envelope-from ericd@free.fr) Received: from meteor.synten.com (ns4.synten.com [193.47.141.42]) by mx1.freebsd.org (Postfix) with ESMTP id E9C598FC15 for ; Fri, 5 Jun 2009 10:20:27 +0000 (UTC) (envelope-from ericd@free.fr) Received: from PCdeEricDHEM (LRouen-151-73-20-55.w80-13.abo.wanadoo.fr [80.13.51.55]) by meteor.synten.com (8.13.2/8.13.2) with SMTP id n55AKIqo000442 for ; Fri, 5 Jun 2009 12:20:19 +0200 Message-ID: <7758B5F61AA742B1B52EB2682F090282@PCdeEricDHEM> From: "Eric" To: Date: Fri, 5 Jun 2009 12:19:58 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-SYNTEN-MailScanner-Information: Please contact the ISP for more information X-SYNTEN-MailScanner: Found to be clean X-SYNTEN-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (not cached, score=0.942, requis 10, AWL 1.49, BAYES_00 -2.60, HTML_MESSAGE 0.00, RCVD_IN_SORBS_DUL 2.05) X-SYNTEN-MailScanner-From: ericd@free.fr X-Spam-Status: No Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 10:20:28 -0000 Hi, Does any one find solution to this problem as we have same, try a = proposed patch but still have problem? Regards, Eric. From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 5 10:32:47 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325E5106566B for ; Fri, 5 Jun 2009 10:32:47 +0000 (UTC) (envelope-from ericd@free.fr) Received: from meteor.synten.com (ns4.synten.com [193.47.141.42]) by mx1.freebsd.org (Postfix) with ESMTP id A293D8FC13 for ; Fri, 5 Jun 2009 10:32:46 +0000 (UTC) (envelope-from ericd@free.fr) Received: from PCdeEricDHEM (LRouen-151-73-20-55.w80-13.abo.wanadoo.fr [80.13.51.55]) by meteor.synten.com (8.13.2/8.13.2) with SMTP id n55AWcFh014576 for ; Fri, 5 Jun 2009 12:32:38 +0200 Message-ID: From: "Eric" To: References: <7758B5F61AA742B1B52EB2682F090282@PCdeEricDHEM> In-Reply-To: <7758B5F61AA742B1B52EB2682F090282@PCdeEricDHEM> Date: Fri, 5 Jun 2009 12:32:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-SYNTEN-MailScanner-Information: Please contact the ISP for more information X-SYNTEN-MailScanner: Found to be clean X-SYNTEN-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (not cached, score=2.161, requis 10, AWL 0.20, BAYES_40 -0.18, RCVD_IN_SORBS_DUL 2.05, SYNTEN_SPAMB_UNSUBSRIBECN 0.10) X-SYNTEN-MailScanner-SpamScore: ss X-SYNTEN-MailScanner-From: ericd@free.fr X-Spam-Status: No Subject: Re: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 10:32:47 -0000 I mean : I have a dell R710 with four : bce: To: Sent: Friday, June 05, 2009 12:19 PM Subject: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell Hi, Does any one find solution to this problem as we have same, try a proposed patch but still have problem? Regards, Eric. _______________________________________________ freebsd-drivers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-drivers To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 5 13:55:06 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E6F4106566B for ; Fri, 5 Jun 2009 13:55:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 505A38FC15 for ; Fri, 5 Jun 2009 13:55:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E824E46B29; Fri, 5 Jun 2009 09:55:05 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A55B18A041; Fri, 5 Jun 2009 09:55:04 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Date: Fri, 5 Jun 2009 08:36:04 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906050836.04538.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 05 Jun 2009 09:55:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: AJ Shipley Subject: Re: Kernel Loadable Driver vs. Custom Compiled Driver Question X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 13:55:07 -0000 On Thursday 04 June 2009 3:02:30 pm AJ Shipley wrote: > Hi, >=20 > I am in the process of integrating a 3rd party HW vendor=92s driver into > our FreeBSD code base. The driver works when it is loaded as a KLM > using kldload =96v but when I modified the kernel using > config and compiled the driver into the kernel, it does not work. The > kernel builds and installs fine, but the driver does not load > correctly. >=20 > I was able to verify that the first 10 steps of the driver works > during load in both cases and that the driver is loading the device > into the same PCI memory range (it=92s a PCI based HW card). However, > at a critical step in the driver, it polls an ISR register waiting for > a bit to toggle high indicating that the board is ready and out of > reset and it never does, and eventually hits the driver timeout and > aborts its load. >=20 > Why would a driver work as a KLM but not statically compiled into the=20 kernel? Are you depending on working interrupts? If so, you will need to defer tha= t=20 work using config_intrhook(9). =2D-=20 John Baldwin From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 5 18:09:54 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83B091065690 for ; Fri, 5 Jun 2009 18:09:54 +0000 (UTC) (envelope-from cpardo@fastsoft.com) Received: from HQ-ES.FASTSOFT.COM (hq-es.fastsoft.com [38.102.243.86]) by mx1.freebsd.org (Postfix) with ESMTP id 699408FC20 for ; Fri, 5 Jun 2009 18:09:54 +0000 (UTC) (envelope-from cpardo@fastsoft.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 5 Jun 2009 11:09:53 -0700 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell Thread-Index: AcnlyQBo3G8yhxFpR+ao3Os2BRdIEAAP53Sw References: <7758B5F61AA742B1B52EB2682F090282@PCdeEricDHEM> From: "Carlos Pardo" To: "Eric" , Cc: Subject: RE: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 18:09:54 -0000 Eric, We made the driver a loadable module and it seems to work. It is a temporary workaround. -----Original Message----- From: owner-freebsd-drivers@freebsd.org [mailto:owner-freebsd-drivers@freebsd.org] On Behalf Of Eric Sent: Friday, June 05, 2009 3:32 AM To: freebsd-drivers@freebsd.org Subject: Re: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell I mean : I have a dell R710 with four : bce: To: Sent: Friday, June 05, 2009 12:19 PM Subject: Broadcom NetXtreme II BCM5709 Gigabit Ethernet Dell 610 and Dell Hi, Does any one find solution to this problem as we have same, try a proposed=20 patch but still have problem? Regards, Eric. _______________________________________________ freebsd-drivers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-drivers To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" _______________________________________________ freebsd-drivers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-drivers To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org"