From owner-freebsd-drivers@FreeBSD.ORG Sun Dec 14 22:53:57 2008 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 23C5F106564A for ; Sun, 14 Dec 2008 22:53:56 +0000 (UTC) (envelope-from itavy@itavy.com) Received: from gateway16.websitewelcome.com (gateway16.websitewelcome.com [69.56.239.11]) by mx1.freebsd.org (Postfix) with SMTP id 909C78FC14 for ; Sun, 14 Dec 2008 22:53:56 +0000 (UTC) (envelope-from itavy@itavy.com) Received: (qmail 26293 invoked from network); 14 Dec 2008 23:08:26 -0000 Received: from gator482.hostgator.com (67.18.18.122) by gateway16.websitewelcome.com with SMTP; 14 Dec 2008 23:08:26 -0000 Received: from [78.97.148.67] (port=2744 helo=[10.22.22.22]) by gator482.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1LBzqR-0005hb-Nt for freebsd-drivers@FreeBSD.org; Sun, 14 Dec 2008 16:53:51 -0600 Message-ID: <49458E76.7090407@itavy.com> Date: Mon, 15 Dec 2008 00:53:42 +0200 From: Octavian Ionescu User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: freebsd-drivers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator482.hostgator.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - itavy.com Cc: Subject: driver for wireless asus eeepc (rt2860) 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: Sun, 14 Dec 2008 22:53:57 -0000 hi, i have compiled the module for rt2860 using ndis. everything worked almost fine except a few error messages one of them wich is very frustrating # uname -a FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 #pciconf -lv .... ndis0@pci0:1:0:0: class=0x028000 card=0x27901814 chip=0x07811814 rev=0x00 hdr=0x00 vendor = 'Ralink Technology, Corp' class = network Dec 14 22:46:03 kernel: ndis0: <802.11n Wireless LAN Card> mem 0xfbef0000-0xfbefffff irq 19 at device 0.0 on pci1 Dec 14 22:46:03 kernel: ndis0: [ITHREAD] Dec 14 22:46:03 kernel: ndis0: NDIS API version: 5.0 *Dec 14 22:46:04 kernel: NDIS: open file /compat/ndis/rate.bin failed: 2* i can transfer files and i have installed some ports but when i try to cvsup to update the src's i get the following error and nothing is updating: TreeList failed: Network write failure: Connection closed i have had to go back on wired connection and on it i could update the src without any problem -- Best regards, Octavian From owner-freebsd-drivers@FreeBSD.ORG Sun Dec 14 22:56:55 2008 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 2B2151065670 for ; Sun, 14 Dec 2008 22:56:54 +0000 (UTC) (envelope-from itavy@itavy.com) Received: from gateway04.websitewelcome.com (gateway04.websitewelcome.com [64.5.52.7]) by mx1.freebsd.org (Postfix) with SMTP id B20E38FC17 for ; Sun, 14 Dec 2008 22:56:54 +0000 (UTC) (envelope-from itavy@itavy.com) Received: (qmail 6307 invoked from network); 14 Dec 2008 23:12:38 -0000 Received: from gator482.hostgator.com (67.18.18.122) by gateway04.websitewelcome.com with SMTP; 14 Dec 2008 23:12:38 -0000 Received: from [78.97.148.67] (port=2745 helo=[10.22.22.22]) by gator482.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1LBztK-0006H4-9B for freebsd-drivers@FreeBSD.org; Sun, 14 Dec 2008 16:56:50 -0600 Message-ID: <49458F28.4000206@itavy.com> Date: Mon, 15 Dec 2008 00:56:40 +0200 From: Octavian Ionescu User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: freebsd-drivers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator482.hostgator.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - itavy.com Cc: Subject: Driver for DWL-G122 rev C1 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: Sun, 14 Dec 2008 22:56:55 -0000 hi, i have an Wireless USB DWL-G122 rev c1 card and on current itblocks my computer after a while. it scans for ap after i have configured it but after 2-3 minutes of scaning hang the entire computer and give me an backtrace prompt. # uname -a FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 #dmesg .... Dec 14 22:40:28 kernel: rum0: on uhub4 Dec 14 22:40:28 kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 Dec 14 22:40:28 kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT flag #usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, self powered, config 1, BT-253(0xb700), Broadcom Corp(0x0b05), rev 2.41 port 2 powered Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 addr 3: high speed, power 300 mA, config 1, 802.11 bg WLAN(0x3c03), Ralink(0x07d1), rev 0.01 port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered port 8 addr 2: high speed, power 500 mA, config 1, CNF7129(0xb071), Chicony Electronics Co., Ltd.(0x04f2), rev 15.44 can anyone help me about this one? Thank you, -- Best regards, Octavian From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 15 11:00:12 2008 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 F3CC6106564A for ; Mon, 15 Dec 2008 11:00:11 +0000 (UTC) (envelope-from 306423.311704@vux.bos.netsolhost.com) Received: from omr11.networksolutionsemail.com (omr11.networksolutionsemail.com [205.178.146.61]) by mx1.freebsd.org (Postfix) with ESMTP id AF04F8FC13 for ; Mon, 15 Dec 2008 11:00:11 +0000 (UTC) (envelope-from 306423.311704@vux.bos.netsolhost.com) Received: from vux.bos.netsolhost.com ([10.49.38.152]) by omr11.networksolutionsemail.com (8.13.6/8.13.6) with ESMTP id mBFAmohE014938 for ; Mon, 15 Dec 2008 05:48:50 -0500 Received: from vux25.mgt.hosting.dc2.netsol.com (smmsp@localhost [127.0.0.1]) by vux.bos.netsolhost.com (8.13.7/8.13.7) with ESMTP id mBFAiZwm019120 for ; Mon, 15 Dec 2008 05:48:50 -0500 Received: (from 306423.311704@localhost) by vux25.mgt.hosting.dc2.netsol.com (8.13.7/8.13.7/Submit) id mBFAffa8017738; Mon, 15 Dec 2008 05:41:41 -0500 Date: Mon, 15 Dec 2008 05:41:41 -0500 Message-Id: <200812151041.mBFAffa8017738@vux25.mgt.hosting.dc2.netsol.com> To: freebsd-drivers@freebsd.org From: Chevron Texaco Oil and Gas Company MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Subject: CONTACT OUR ZONE F BRANCH OFFICE X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: peterhamilton33@live.com List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 11:00:12 -0000 Attn: Dear Email Owner. I am Mrs. Chin Wool, the Company's secretary to Chevron Texaco Oil and Gas Company In Singapore (ASIA DISTRICT). If this email address is yours, congratulation to you, as we have a life transforming news for you. For more information kindly contact our Zone F,United Kingdom branch. Mr Peter Hamilton. email:peterhamilton33@live.com Yours Faithfully, Chin Wool (Mrs) For the Chief Executive Officer (CEO), Chevron Texaco Oil and Gas Company, Singapore, Asia. From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 15 12:36:07 2008 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 AF61E1065672 for ; Mon, 15 Dec 2008 12:36:07 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 6C11B8FC12 for ; Mon, 15 Dec 2008 12:36:07 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1048296yxb.13 for ; Mon, 15 Dec 2008 04:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=K8EFHcb7/MjUg9Yx5MC98kytTpsAvi1EtJM7y9MFGT8=; b=HE41gzmfD6Lt5A5cGCWeIeTeMNJzUDU2vbdSsRC8z8JnCfkom3mguwnlS3y9BLKg51 alHQNz2rs5UqNw50G++kkc9ng+5hOK7Kas5X4Qdt4R7PItViDlpFzySPCRC7jQbdB9Ns /uUVYRd5oErXhL0YzI1LQjcsSaUZX8X+BAyJc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AolfDfDreJMg8DBcYLf46IodmQpmCi0a9ivqrWszolpdB7Nd2LZdZyjvxFbbt+cwZB FCzgK4L7T8f3QITgCw01tSLlkWngex2tAnpBKwn8GBkTZ1VE7DaTXGVCLxH0tkiP4yFa OEjDwngVmn2+1A5TztQcNk1WWRWGjRp+hDFZo= Received: by 10.231.10.70 with SMTP id o6mr76632ibo.50.1229344086017; Mon, 15 Dec 2008 04:28:06 -0800 (PST) Received: by 10.231.10.130 with HTTP; Mon, 15 Dec 2008 04:28:05 -0800 (PST) Message-ID: <3a142e750812150428y1ab873cdy82442c15d97462d4@mail.gmail.com> Date: Mon, 15 Dec 2008 13:28:05 +0100 From: "Paul B. Mahol" To: "Octavian Ionescu" In-Reply-To: <49458E76.7090407@itavy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49458E76.7090407@itavy.com> Cc: freebsd-drivers@freebsd.org Subject: Re: driver for wireless asus eeepc (rt2860) 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: Mon, 15 Dec 2008 12:36:07 -0000 On 12/14/08, Octavian Ionescu wrote: > hi, > > i have compiled the module for rt2860 using ndis. everything worked > almost fine except a few error messages one of them wich is very > frustrating > # uname -a > FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC > 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 > > #pciconf -lv > .... > ndis0@pci0:1:0:0: class=0x028000 card=0x27901814 chip=0x07811814 > rev=0x00 hdr=0x00 > vendor = 'Ralink Technology, Corp' > class = network > > Dec 14 22:46:03 kernel: ndis0: <802.11n Wireless LAN Card> mem > 0xfbef0000-0xfbefffff irq 19 at device 0.0 on pci1 > Dec 14 22:46:03 kernel: ndis0: [ITHREAD] > Dec 14 22:46:03 kernel: ndis0: NDIS API version: 5.0 > *Dec 14 22:46:04 kernel: NDIS: open file /compat/ndis/rate.bin failed: 2* This looks like firmware file. Do you have put rate.bin file with others INF and SYS files when using ndisgen(8)? If not than you can: rebuild miniport driver with ndisgen, including all firmware files. or create /compat/ndis/ directory and put rate.bin in it. > > i can transfer files and i have installed some ports but when i try to > cvsup to update the src's i get the following error and nothing is updating: > TreeList failed: Network write failure: Connection closed > > i have had to go back on wired connection and on it i could update the -- Paul From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 15 12:52:35 2008 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 A35D21065670 for ; Mon, 15 Dec 2008 12:52:35 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7D08FC2A for ; Mon, 15 Dec 2008 12:52:35 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1046586ywe.13 for ; Mon, 15 Dec 2008 04:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=tjfxHldnQHnPb6Hw8h27eHYtwfsmiGquGZNi+Fhjl04=; b=mvN6c2VHaKlPTNPh35q6XlWXROx6V1t2pKin/3cOaRKJIKdEA3fR5QE7xJfo/crK8g ypEwTkk832ou5qhGYzrR4JCLArY8TWC4nZMpV2OaA+UeRzT5I4wcCgyTJ8qJQ2s5kfEg wF0qym5AGvzWYDcxB9iTg4Y1uH0AhgrqwQ/dk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=vcWj2bNUiP4RND7rPmhYCjeIt1RrFS5WYLgdn5HxP2wKzeWcgga08XpNLDhZtrHCOy s874k52oKKvAewoIirvcW6+p2cnLJ5+M7jhY6185mbnXwEpkTG3DnPIawY3u/Eb5Sx8a aSbpX+gGLs0e69nM47562Q/CX8ANgSUXoMb+0= Received: by 10.231.10.140 with SMTP id p12mr78021ibp.13.1229343813788; Mon, 15 Dec 2008 04:23:33 -0800 (PST) Received: by 10.231.10.130 with HTTP; Mon, 15 Dec 2008 04:23:33 -0800 (PST) Message-ID: <3a142e750812150423w168620f7g40e93cf61f6a3b7b@mail.gmail.com> Date: Mon, 15 Dec 2008 13:23:33 +0100 From: "Paul B. Mahol" To: "Octavian Ionescu" In-Reply-To: <49458F28.4000206@itavy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49458F28.4000206@itavy.com> Cc: freebsd-drivers@freebsd.org Subject: Re: Driver for DWL-G122 rev C1 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: Mon, 15 Dec 2008 12:52:35 -0000 On 12/14/08, Octavian Ionescu wrote: > hi, > > i have an Wireless USB DWL-G122 rev c1 card and on current itblocks my > computer after a while. it scans for ap after i have configured it but > after 2-3 minutes of scaning hang the entire computer and give me an > backtrace prompt. > > # uname -a > FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC > 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 > > #dmesg > .... > Dec 14 22:40:28 kernel: rum0: 2.00/0.01, addr 3> on uhub4 > Dec 14 22:40:28 kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 > Dec 14 22:40:28 kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT flag Let me guess you have SMP machine with SMP enabled kernel? In that case usb ehci have some bugs triggered with rum driver. Workaround: disable smp: # echo "kern.smp.disabled=1" >> /boot/loader.conf and reboot. Fix: use if_rum2 from usb2: # echo "usb2_wlan_rum_load=YES" >> /boot/loader.conf For this one to really work you need first to remove usb,uhci,ehci,ohci and others old usb stuff from kernel conf, and use usb2 as modules ... -- Paul From owner-freebsd-drivers@FreeBSD.ORG Mon Dec 15 13:44:45 2008 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 425D01065673 for ; Mon, 15 Dec 2008 13:44:45 +0000 (UTC) (envelope-from itavy@itavy.com) Received: from gateway16.websitewelcome.com (gateway16.websitewelcome.com [69.93.243.5]) by mx1.freebsd.org (Postfix) with SMTP id 009D38FC17 for ; Mon, 15 Dec 2008 13:44:44 +0000 (UTC) (envelope-from itavy@itavy.com) Received: (qmail 29368 invoked from network); 15 Dec 2008 13:59:17 -0000 Received: from gator482.hostgator.com (67.18.18.122) by gateway16.websitewelcome.com with SMTP; 15 Dec 2008 13:59:17 -0000 Received: from localhost ([127.0.0.1]:56740) by gator482.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1LCDkY-0007gp-QP; Mon, 15 Dec 2008 07:44:42 -0600 Received: from 86.55.4.142 ([86.55.4.142]) by www.itavy.com (Horde MIME library) with HTTP; Mon, 15 Dec 2008 07:44:42 -0600 Message-ID: <20081215074442.u7fju0xwysgckc0c@www.itavy.com> Date: Mon, 15 Dec 2008 07:44:42 -0600 From: Octavian Ionescu To: "Paul B. Mahol" References: <49458F28.4000206@itavy.com> <3a142e750812150423w168620f7g40e93cf61f6a3b7b@mail.gmail.com> In-Reply-To: <3a142e750812150423w168620f7g40e93cf61f6a3b7b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator482.hostgator.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - itavy.com Cc: freebsd-drivers@freebsd.org Subject: Re: Driver for DWL-G122 rev C1 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: Mon, 15 Dec 2008 13:44:45 -0000 hi, yes i have SMP enabled. i will recompile the kernel with the new =20 options and i will let yuo know. Thank you --=20 Octavian Quoting "Paul B. Mahol" : > On 12/14/08, Octavian Ionescu wrote: >> hi, >> >> i have an Wireless USB DWL-G122 rev c1 card and on current itblocks my >> computer after a while. it scans for ap after i have configured it but >> after 2-3 minutes of scaning hang the entire computer and give me an >> backtrace prompt. >> >> # uname -a >> FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC >> 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 >> >> #dmesg >> .... >> Dec 14 22:40:28 kernel: rum0: > 2.00/0.01, addr 3> on uhub4 >> Dec 14 22:40:28 kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 >> Dec 14 22:40:28 kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT fl= ag > > Let me guess you have SMP machine with SMP enabled kernel? > In that case usb ehci have some bugs triggered with rum driver. > > Workaround: disable smp: > # echo "kern.smp.disabled=3D1" >> /boot/loader.conf and reboot. > > Fix: > use if_rum2 from usb2: > > # echo "usb2_wlan_rum_load=3DYES" >> /boot/loader.conf > > For this one to really work you need first to remove usb,uhci,ehci,ohci an= d > others old usb stuff from kernel conf, and use usb2 as modules ... > > > -- > Paul > From owner-freebsd-drivers@FreeBSD.ORG Tue Dec 16 05:23:48 2008 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 EEB991065673; Tue, 16 Dec 2008 05:23:48 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (pool-71-182-69-106.ptldor.fios.verizon.net [71.182.69.106]) by mx1.freebsd.org (Postfix) with ESMTP id ACA478FC1B; Tue, 16 Dec 2008 05:23:48 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: by sopwith.solgatos.com (Postfix, from userid 66) id 5C88E3F22; Mon, 15 Dec 2008 20:53:55 -0800 (PST) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id DAA27074; Mon, 15 Dec 2008 03:30:04 GMT Message-Id: <200812150330.DAA27074@sopwith.solgatos.com> To: freebsd-firewire@freebsd.org, freebsd-drivers@freebsd.org Date: Sun, 14 Dec 2008 19:30:04 +0000 From: Dieter Cc: bug-followup@FreeBSD.org Subject: Re: kern/118093: firewire bus reset hogs CPU, causing data to be lost 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: Tue, 16 Dec 2008 05:23:49 -0000 I found the source of this problem. When a firewire bus resets, the firewire driver prints a few lines to the console, using printf(9) and device_printf(9). I suspect that these are running at splfw aka splimp, locking out other i/o. Commenting out the *printf() calls fixes the problem, but that isn't a good solution. Would changing the *printf() calls to log(9) calls be safe? ("safe" meaning other i/o doesn't get locked out) Ah, for the good old days when 19200 baud seemed fast... From owner-freebsd-drivers@FreeBSD.ORG Tue Dec 16 05:35:08 2008 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 933D91065672; Tue, 16 Dec 2008 05:35:08 +0000 (UTC) (envelope-from ikob@ni.aist.go.jp) Received: from mail.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id 605B18FC0C; Tue, 16 Dec 2008 05:35:08 +0000 (UTC) (envelope-from ikob@ni.aist.go.jp) Received: from dhcpa11093.tky.aist.go.jp (unknown [150.82.175.93]) by mail.asahi-net.or.jp (Postfix) with ESMTP id C75126806D; Tue, 16 Dec 2008 14:17:11 +0900 (JST) Message-Id: <15EB8FB3-CAA8-4834-9979-912508B619D4@ni.aist.go.jp> From: Katsushi Kobayashi To: Dieter In-Reply-To: <200812150330.DAA27074@sopwith.solgatos.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 16 Dec 2008 14:17:10 +0900 References: <200812150330.DAA27074@sopwith.solgatos.com> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-firewire@freebsd.org, freebsd-drivers@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/118093: firewire bus reset hogs CPU, causing data to be lost 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: Tue, 16 Dec 2008 05:35:08 -0000 Hi, I believe no side effect is anticipated the message. "side effect" includes locking i/o. ---- Katsushi Kobayashi On 2008/12/15, at 4:30, Dieter wrote: > I found the source of this problem. When a firewire bus resets, > the firewire driver prints a few lines to the console, > using printf(9) and device_printf(9). I suspect that these are > running at splfw aka splimp, locking out other i/o. > > Commenting out the *printf() calls fixes the problem, but that > isn't a good solution. > > Would changing the *printf() calls to log(9) calls be safe? > ("safe" meaning other i/o doesn't get locked out) > > Ah, for the good old days when 19200 baud seemed fast... > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org" From owner-freebsd-drivers@FreeBSD.ORG Tue Dec 16 06:03:20 2008 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 A2E431065670; Tue, 16 Dec 2008 06:03:20 +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 5E1708FC1F; Tue, 16 Dec 2008 06:03:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBG61UKQ048412; Mon, 15 Dec 2008 23:01:30 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 15 Dec 2008 23:01:30 -0700 (MST) Message-Id: <20081215.230130.74702477.imp@bsdimp.com> To: freebsd@sopwith.solgatos.com From: Warner Losh In-Reply-To: <200812150330.DAA27074@sopwith.solgatos.com> References: <200812150330.DAA27074@sopwith.solgatos.com> X-Mailer: Mew version 3.3 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-firewire@FreeBSD.org, freebsd-drivers@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: kern/118093: firewire bus reset hogs CPU, causing data to be lost 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: Tue, 16 Dec 2008 06:03:20 -0000 > I found the source of this problem. When a firewire bus resets, > the firewire driver prints a few lines to the console, > using printf(9) and device_printf(9). I suspect that these are > running at splfw aka splimp, locking out other i/o. This can't be the case. There's no SPL involved at all. Maybe removing the printfs causes an interrupt to be serviced faster, resulting in what appears to be better performance... > Commenting out the *printf() calls fixes the problem, but that > isn't a good solution. > > Would changing the *printf() calls to log(9) calls be safe? > ("safe" meaning other i/o doesn't get locked out) > > Ah, for the good old days when 19200 baud seemed fast... > _______________________________________________ > 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 Tue Dec 16 07:36:39 2008 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 D0B7A106564A for ; Tue, 16 Dec 2008 07:36:39 +0000 (UTC) (envelope-from itavy@itavy.com) Received: from gateway11.websitewelcome.com (gateway11.websitewelcome.com [67.18.68.8]) by mx1.freebsd.org (Postfix) with SMTP id 8AB848FC1B for ; Tue, 16 Dec 2008 07:36:39 +0000 (UTC) (envelope-from itavy@itavy.com) Received: (qmail 25210 invoked from network); 16 Dec 2008 07:52:58 -0000 Received: from gator482.hostgator.com (67.18.18.122) by gateway11.websitewelcome.com with SMTP; 16 Dec 2008 07:52:58 -0000 Received: from localhost ([127.0.0.1]:57935) by gator482.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1LCUTu-0008N9-0S; Tue, 16 Dec 2008 01:36:38 -0600 Received: from 86.55.4.142 ([86.55.4.142]) by www.itavy.com (Horde MIME library) with HTTP; Tue, 16 Dec 2008 01:36:37 -0600 Message-ID: <20081216013637.0pal212d4w0sk4k4@www.itavy.com> Date: Tue, 16 Dec 2008 01:36:37 -0600 From: Octavian Ionescu To: "Paul B. Mahol" References: <49458F28.4000206@itavy.com> <3a142e750812150423w168620f7g40e93cf61f6a3b7b@mail.gmail.com> <20081215074442.u7fju0xwysgckc0c@www.itavy.com> In-Reply-To: <20081215074442.u7fju0xwysgckc0c@www.itavy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator482.hostgator.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - itavy.com Cc: freebsd-drivers@freebsd.org Subject: Re: Driver for DWL-G122 rev C1 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: Tue, 16 Dec 2008 07:36:39 -0000 hi, i have recompiled and everything have worked very good :) now i am =20 able to use my notebook without having to stay just at my desk :) btw where i cad read a little more about those dependencies like SMP =20 enabled -> have to use usb2. i have searched on google about how to enable usb2 on the kernel but i =20 found just exemples of kernel config's and not why it shoul dbe used. Thank you, --=20 Octavian Quoting Octavian Ionescu : > hi, > > yes i have SMP enabled. i will recompile the kernel with the new > options and i will let yuo know. > > Thank you > --=20 > Octavian > > > Quoting "Paul B. Mahol" : > >> On 12/14/08, Octavian Ionescu wrote: >>> hi, >>> >>> i have an Wireless USB DWL-G122 rev c1 card and on current itblocks my >>> computer after a while. it scans for ap after i have configured it but >>> after 2-3 minutes of scaning hang the entire computer and give me an >>> backtrace prompt. >>> >>> # uname -a >>> FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Dec 6 17:17:09 UTC >>> 2008 root@:/usr/obj/usr/src/sys/ITAVYEEE2 i386 >>> >>> #dmesg >>> .... >>> Dec 14 22:40:28 kernel: rum0: >> 2.00/0.01, addr 3> on uhub4 >>> Dec 14 22:40:28 kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 >>> Dec 14 22:40:28 kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT f= lag >> >> Let me guess you have SMP machine with SMP enabled kernel? >> In that case usb ehci have some bugs triggered with rum driver. >> >> Workaround: disable smp: >> # echo "kern.smp.disabled=3D1" >> /boot/loader.conf and reboot. >> >> Fix: >> use if_rum2 from usb2: >> >> # echo "usb2_wlan_rum_load=3DYES" >> /boot/loader.conf >> >> For this one to really work you need first to remove usb,uhci,ehci,ohci a= nd >> others old usb stuff from kernel conf, and use usb2 as modules ... >> >> >> -- >> Paul >> > > > > _______________________________________________ > 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 Tue Dec 16 10:44:12 2008 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 90ABD106564A for ; Tue, 16 Dec 2008 10:44:12 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7838FC1A for ; Tue, 16 Dec 2008 10:44:12 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1313976anc.13 for ; Tue, 16 Dec 2008 02:44:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IyiNxDqOMVUWBi18Oep7tdcohF1PELXnLvfzcw4eS1E=; b=c5IN0zUejVNyn1jPme4O9DVpB0CyAJyxZDxiC6/9QBeWZ2aPNXJ2mubBQfImwSMaCD zag4/J+49e3yG5XekXo1J/I4SK0ZuqDfXwkkUcSvFJYi/4k0AKN+hJLPBaNnPrATDo82 sPca2eDFh8iQOU3hL9dyR0Dz3+09RZxQxYhMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=nGKtCitBbWCAHfttTEfidA+jtVRMi/H00dXGkjoPYexV9bdeSdhqdPsTc0kFbcsvyO ZGfmIua5sIMLoUa4S/91IVsP+IIJmfP1tVBjTOsUuNj0IszoFlyilL1Ce0DshvIC76Kg V38/IZFLyBdOps4SQ2bdWpEtigxftqc7vDsH4= Received: by 10.231.10.194 with SMTP id q2mr106917ibq.0.1229424251448; Tue, 16 Dec 2008 02:44:11 -0800 (PST) Received: by 10.231.19.8 with HTTP; Tue, 16 Dec 2008 02:44:11 -0800 (PST) Message-ID: <3a142e750812160244y7e8b703cw55766d802f480631@mail.gmail.com> Date: Tue, 16 Dec 2008 11:44:11 +0100 From: "Paul B. Mahol" To: "Octavian Ionescu" In-Reply-To: <20081216013637.0pal212d4w0sk4k4@www.itavy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49458F28.4000206@itavy.com> <3a142e750812150423w168620f7g40e93cf61f6a3b7b@mail.gmail.com> <20081215074442.u7fju0xwysgckc0c@www.itavy.com> <20081216013637.0pal212d4w0sk4k4@www.itavy.com> Cc: freebsd-drivers@freebsd.org Subject: Re: Driver for DWL-G122 rev C1 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: Tue, 16 Dec 2008 10:44:12 -0000 On 12/16/08, Octavian Ionescu wrote: > hi, > > i have recompiled and everything have worked very good :) now i am > able to use my notebook without having to stay just at my desk :) > > btw where i cad read a little more about those dependencies like SMP > enabled -> have to use usb2. It is not dependencies, it just old usb stack current state - buggy ehci(4) > i have searched on google about how to enable usb2 on the kernel but i > found just exemples of kernel config's and not why it shoul dbe used. Stop top posting, and than start reading manual pages and source code. -- Paul From owner-freebsd-drivers@FreeBSD.ORG Wed Dec 17 05:10:24 2008 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 1AC52106564A; Wed, 17 Dec 2008 05:10:24 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (pool-71-182-69-106.ptldor.fios.verizon.net [71.182.69.106]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7028FC18; Wed, 17 Dec 2008 05:10:22 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: by sopwith.solgatos.com (Postfix, from userid 66) id 9B0D13F22; Tue, 16 Dec 2008 20:51:06 -0800 (PST) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id DAA17848; Wed, 17 Dec 2008 03:29:13 GMT Message-Id: <200812170329.DAA17848@sopwith.solgatos.com> To: freebsd-firewire@FreeBSD.org, freebsd-drivers@FreeBSD.org, bug-followup@FreeBSD.org In-reply-to: Your message of "Tue, 16 Dec 2008 09:51:44 PST." <4947EAB0.3020704@miralink.com> Date: Tue, 16 Dec 2008 19:29:13 +0000 From: Dieter Cc: Subject: Re: kern/118093: firewire bus reset hogs CPU, causing data to be lost 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: Wed, 17 Dec 2008 05:10:24 -0000 Sean> Which file in dev/firewire are you looking at? fwohci.c and firewire.c examples: printf("non CYCLEMASTER mode\n"); device_printf(fc->dev, "Initiate bus reset\n"); ------------------- Warner> This can't be the case. There's no SPL involved at all. Maybe Warner> removing the printfs causes an interrupt to be serviced faster, Warner> resulting in what appears to be better performance... With the printfs, Ethernet is not getting serviced. This is repeatable and easily reproduced. Without the printfs, it seems ok. If it isn't spl, what is locking out Ethernet? From owner-freebsd-drivers@FreeBSD.ORG Wed Dec 17 07:00:25 2008 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 196401065674; Wed, 17 Dec 2008 07:00:25 +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 C64458FC40; Wed, 17 Dec 2008 07:00:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBH6xbN5070526; Tue, 16 Dec 2008 23:59:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 16 Dec 2008 23:59:41 -0700 (MST) Message-Id: <20081216.235941.1266245051.imp@bsdimp.com> To: freebsd@sopwith.solgatos.com From: "M. Warner Losh" In-Reply-To: <200812170329.DAA17848@sopwith.solgatos.com> References: <4947EAB0.3020704@miralink.com> <200812170329.DAA17848@sopwith.solgatos.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-firewire@freebsd.org, freebsd-drivers@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/118093: firewire bus reset hogs CPU, causing data to be lost 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: Wed, 17 Dec 2008 07:00:26 -0000 In message: <200812170329.DAA17848@sopwith.solgatos.com> Dieter writes: : Sean> Which file in dev/firewire are you looking at? : : fwohci.c and firewire.c : : examples: : : printf("non CYCLEMASTER mode\n"); : : device_printf(fc->dev, "Initiate bus reset\n"); : : ------------------- : : Warner> This can't be the case. There's no SPL involved at all. Maybe : Warner> removing the printfs causes an interrupt to be serviced faster, : Warner> resulting in what appears to be better performance... : : With the printfs, Ethernet is not getting serviced. This : is repeatable and easily reproduced. Without the printfs, : it seems ok. : : If it isn't spl, what is locking out Ethernet? interrupt storm? In old-spl-locked drivers, often times the interrupt would be masked while certain operations happened. In new mutex-locked freebsd, there's no way to block the interrupts, so sometimes old code gets into an interrupt storm, which starves other things. Not sure why printf would trigger this, however... Warner From owner-freebsd-drivers@FreeBSD.ORG Sat Dec 20 09:08:20 2008 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 9738A1065670 for ; Sat, 20 Dec 2008 09:08:20 +0000 (UTC) (envelope-from elbarto@arcadebsd.org) Received: from mail.arcadebsd.org (sd-16356.dedibox.fr [88.191.88.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA588FC08 for ; Sat, 20 Dec 2008 09:08:20 +0000 (UTC) (envelope-from elbarto@arcadebsd.org) Received: from [192.168.0.1] (home.elbarto.org [82.229.222.193]) (Authenticated sender: elbarto) by mail.arcadebsd.org (Postfix) with ESMTPA id 8FEE9341D0; Sat, 20 Dec 2008 10:08:18 +0100 (CET) Message-ID: <494CB5A8.50509@arcadebsd.org> Date: Sat, 20 Dec 2008 10:06:48 +0100 From: ElBarto User-Agent: Thunderbird 2.0.0.18 (X11/20081129) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org References: <493EE331.8070708@arcadebsd.org> In-Reply-To: <493EE331.8070708@arcadebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: frebsd-usb@freebsd.org Subject: Re: USB Joystick/gamepad 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: Sat, 20 Dec 2008 09:08:20 -0000 ElBarto wrote: > Hello all, > > I've started a driver for usb joystick and gamepad. > The goal of this driver is to have a complete support for HID and > non-HID device. > For now it support HID device and (partially) the Xbox360 gamepad. > > The driver create a ujoy%d device in /dev . > For now the data are like this : > > AXIS_X AXIS_Y AXIS_Z AXIS_RX AXIS_RY AXIS_RZ SLIDER HAT_SWITCH BUTTONS > All coded in one int each. > > I'll next add some ioctl to, for example, find which axis is present > for the joystick etc .... > > There is of course no userland application which support this driver, > I'm planning to re-do the sdl support > for this driver, but before I want to standardize the driver. > > You can download the driver and a small crappy userland application > here : > http://www.arcadebsd.org/~elbarto/ujoy.tgz > > > This has been tested on FreeBSD 7.0 with two different Thrustmaster > gamepad and a Xbox360 one. > > Comments ? Suggestions ? > Hello again, I've updated the driver, it's now more clean. Now it has a struct ujoy to read the data, the struct is like this : struct ujoy_axis { char present; int value; int min; int max; }; struct ujoy { struct ujoy_axis axis[UJOY_MAXAXIS]; unsigned int hat; unsigned int buttons; }; The value of the axis are as they are read at the joystick. Some joystick/gamepad send value from -127->+127 others from 0->255 etc ... But I think it's to the userland application to decide what to do, that's why I give the min and max of each axis. For what I know the max number of axis of an USB joystick/gamepad is 7 (X, Y, Z, RX, RY, RX, SLIDER) but I may but wrong, if you have an usb joystick please try this driver and tell me if all your axis are not recognize. I've tried to get the name of the device to have a ioctl to get it, but all my attempts were unsuccessful. The drivers has been tried on FreeBSD-7.0-RELEASE-p6 with two thrustmaster gamepad, one Xbox360 usb and a gamecube usb adapter. I've CC'ed freebsd-usb too. -- Emmanuel Vadot elbarto@arcadebsd.org