From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 09:14:19 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBAFD106567E; Sun, 9 Nov 2008 09:14:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id EE67A8FC08; Sun, 9 Nov 2008 09:14:18 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=bdeZpJpNa0wA:10 a=SER6hIBTabIA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=z3qQozMs_g8_L49VVIsA:9 a=agvM7UP9R81b-ez9ud1S9GCoaIMA:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 95086384; Sun, 09 Nov 2008 10:14:16 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sun, 9 Nov 2008 10:16:16 +0100 User-Agent: KMail/1.9.7 References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <20081107.132401.1622434515.imp@bsdimp.com> <15059493.193721226221296136.JavaMail.coremail@bj163app23.163.com> In-Reply-To: <15059493.193721226221296136.JavaMail.coremail@bj163app23.163.com> MIME-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091016.16934.hselasky@c2i.net> Cc: kevin , freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:14:19 -0000 On Sunday 09 November 2008, kevin wrote: > It's a bug? > /boot/loader.conf: > zfs_load="YES" > vm.kmem_size_max="2048M" > vm.kmem_size="2048M" > vfs.zfs.zil_disable=1 > vfs.zfs.prefetch_disable=1 > hw.psm.synaptics_support=1 > legal.intel_iwn.license_ack=1 > acpi_ibm_load="YES" > snd_hda_load="YES" > powerd_enable="YES" > linux_load="YES" > if_iwn_load="YES" > ubtbcmfw_load="YES" > usb2_bluetooth_load="YES" > usb2_bluetooth_ng_load="YES" > usb2_bluetooth_fw_load="YES" > usb2_controller_uhci_load="YES" > usb2_controller_ehci_load="YES" > usb2_input_ms_load="YES" > usb2_storage_mass_load="YES" > usb2_image_load="YES" > > kldstat: > Id Refs Address Size Name > 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) > 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) > 3 2 0xffffffff80c00000 6670 opensolaris.ko > (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 linux.ko > (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 snd_hda.ko > (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 sound.ko > (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 acpi_ibm.ko > (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 if_iwn.ko > (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 ubtbcmfw.ko > (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 27f88 usb.ko > (/boot/kernel/usb.ko) > 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko > (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 > usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 bbf8 > usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 > 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 1 > 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko > (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 > usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 > 0xffffffff80ed1000 8780 usb2_controller.ko > (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 > usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 > 0xffffffff80ef4000 e128 usb2_input_ms.ko > (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 > usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 15c28 > usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 > 0xffffffff80f1a000 bd8 usb2_storage.ko (/boot/kernel/usb2_storage.ko) > 23 1 0xffffffff80f1b000 bd0 usb2_image.ko > (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 > ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 0xffffffff81024000 > 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 0xffffffff81038000 > 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 1 0xffffffff81050000 > 2de0a ng_btsocket.ko (/boot/kernel/ng_btsocket.ko) 28 1 > 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) 29 > 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 1 > 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) > > I build kernel without usb*.I notice usb.ko's refs is 2, after i run > kldunload usb.ko, it is 1.when i try to kldunload usb.ko another time,it > return "Device busy".Any thing still request usb.ko? > Hi, Could you send me your kernel config file. Maybe there is still one USB config entry left for the old USB stack. Else the following should do the trick: rm /boot/kernel/usb.ko --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 09:37:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1F9C1065680; Sun, 9 Nov 2008 09:37:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id D58698FC1B; Sun, 9 Nov 2008 09:37:46 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=bdeZpJpNa0wA:10 a=SER6hIBTabIA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=GVVtOPgssA86c3O9foEA:9 a=1D2jOXY6p8Fq7yK9v-IA:7 a=FUBW0jyTs4d4kPHOJPs0fQ9R9XYA:4 a=9aOQ2cSd83gA:10 a=cvZW9r6VXHAA:10 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 401096190; Sun, 09 Nov 2008 10:37:45 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sun, 9 Nov 2008 10:39:55 +0100 User-Agent: KMail/1.9.7 References: <3a142e750811071154y5108f299h60bb7c1060f4567e@mail.gmail.com> <200811072236.38267.hselasky@c2i.net> <3a142e750811081442kc746a41j41d3d46e6688033f@mail.gmail.com> In-Reply-To: <3a142e750811081442kc746a41j41d3d46e6688033f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091039.55889.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:37:47 -0000 On Saturday 08 November 2008, Paul B. Mahol wrote: > On 11/7/08, Hans Petter Selasky wrote: > > On Friday 07 November 2008, Paul B. Mahol wrote: > >> On 11/7/08, M. Warner Losh wrote: > >> > : > After some time it will appear but will start attaching and > >> > : > dettaching all the time: > > > > How quick is this happening? There has been some changes to the > > sys/dev/usb2/core/uhub2.c file recently, which control how HUB is > > responding to events. > > ~3 seconds. > > I got also this messages: > > uhci1: LegSup = 0x2f00 ^^^^ Legacy support is complaining about something! > uhci_interrupt: host controller halted > uhci_dumpregs:705: usbus1 regs: cmd=0000, sts=0020, intr=0000, > frnum=0000, flbase=3f7fa000, sof=0040, portsc1=0080, portsc2=0080 > uhci_dump_qh:779: QH(0xc627e900) at 0x05a7e902: h_next=0x05a7db82 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627db80) at 0x05a7db82: h_next=0x05a7dc02 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627dc00) at 0x05a7dc02: h_next=0x05a7dc82 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627dc80) at 0x05a7dc82: h_next=0x00000001 > e_next=0x05a7dd00 > uhci_interrupt: host controller halted > uhci_dumpregs:705: usbus1 regs: cmd=0000, sts=0020, intr=0000, > frnum=0000, flbase=3f7fa000, sof=0040, portsc1=0080, portsc2=0080 > uhci_dump_qh:779: QH(0xc627e900) at 0x05a7e902: h_next=0x05a7db82 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627db80) at 0x05a7db82: h_next=0x05a7dc02 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627dc00) at 0x05a7dc02: h_next=0x05a7dc82 > e_next=0x00000001 > uhci_dump_qh:779: QH(0xc627dc80) at 0x05a7dc82: h_next=0x00000001 > e_next=0x05a7dd00 > > Doesnt looks like hub is source of fault, one from perforce with > 152460 comitt is not available > in CURRENT and with latest version of usb2_hub.c from perforce problem > is still there. > > > Maybe you can get the date of that file from the build where it works and > > the > > build where it doesn't work, and I will check the differences. > > Last time I tested usb2 from svn was before huge modularization. Yes, then it probably has something to do with Legacy USB support. Some suggestions: 0) Have you tried putting the USB modules in the kernel ? 1) Try not loading the EHCI driver. Does the UHCI driver work without the host controller halted error? 2) sys/dev/usb2/controller/uhci2_pci.c Try moving the pci_read/pci_write lines before the IRQ is setup: #if (__FreeBSD_version >= 700031) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (void *)(void *)uhci_interrupt, sc, &sc->sc_intr_hdl); #else err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, (void *)(void *)uhci_interrupt, sc, &sc->sc_intr_hdl); #endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); sc->sc_intr_hdl = NULL; goto error; } /* * Set the PIRQD enable bit and switch off all the others. We don't * want legacy support to interfere with us XXX Does this also mean * that the BIOS won't touch the keyboard anymore if it is connected * to the ports of the root hub? */ #if USB_DEBUG if (pci_read_config(self, PCI_LEGSUP, 2) != PCI_LEGSUP_USBPIRQDEN) { device_printf(self, "LegSup = 0x%04x\n", pci_read_config(self, PCI_LEGSUP, 2)); } #endif pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); 3) There has been some changes to the EHCI legacy support code recently. Try the same in EHCI: Move "ehci_pci_takecontroller" before the IRQ is setup: sys/dev/usb2/controller/ehci2_pci.c #if (__FreeBSD_version >= 700031) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (void *)(void *)ehci_interrupt, sc, &sc->sc_intr_hdl); #else err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, (void *)(void *)ehci_interrupt, sc, &sc->sc_intr_hdl); #endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); sc->sc_intr_hdl = NULL; goto error; } ehci_pci_takecontroller(self); You only need to recompile and reinstall the USB2 modules after these changes. Try one suggestion at a time so that we can do some elimination. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 12:20:33 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CCD91065688 for ; Sun, 9 Nov 2008 12:20:33 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id D3CEA8FC0A for ; Sun, 9 Nov 2008 12:20:32 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 07A5E6D439 for ; Sun, 9 Nov 2008 13:03:01 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ubMU+6vLAPDB for ; Sun, 9 Nov 2008 13:02:57 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id E97236D42B; Sun, 9 Nov 2008 13:02:57 +0100 (CET) Date: Sun, 9 Nov 2008 13:02:57 +0100 From: Rink Springer To: usb@FreeBSD.org Message-ID: <20081109120257.GA78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 12:20:33 -0000 Hi everyone, I've made a patch, available at http://rink.nu/tmp/usb-cdev.diff, which removes the custom "/dev/usb " device, associated event handlers and custom ownership/permissions structures and converts the whole deal to use make_dev(9) and friends. The end result is that every USB device will get a /dev entry, which can be chmod(1)-ed, chown(1)-ed etc as usual - futhermore, possible races between looking up a device name and opening it are completely removed by this patch [1] usbconfig(8) works as before after applying the patch, but obviously, commands that involve setting permissions or ownership will return an error as those ioctl's are no longer present; I intend to remove them completely and from usbconfig itself after this patch has been committed. Feel free to review this patch; I'd like to commit it to HEAD at the end of the week or so. [1] The previous code would set a global variable to determine which USB device corresponds with the file being looked up, and a subsequent open call would open this device. I don't know the VFS well enough to determine if this can be exploited, but it doesn't look right to me :-) Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 14:13:19 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE3F1065672; Sun, 9 Nov 2008 14:13:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 27CEE8FC0A; Sun, 9 Nov 2008 14:13:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=1su-2ruMAAAA:8 a=tLYY_Hw5G-20JAV5bo4A:9 a=pBeghD07ZpBDkmSujhgA:7 a=wGUWeYFnk7lRD-dxEgJPurCmvmQA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 973860208; Sun, 09 Nov 2008 15:13:16 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 9 Nov 2008 15:15:25 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> In-Reply-To: <20081109120257.GA78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091515.26123.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:13:19 -0000 Hi Rick, After going through your patch I have a feeling you quite well understand how USB2 is working with regard to the file system. Some issues: 1) You don't have to create an alias in "usb2_fifo_attach". The alias /dev/usbX.Y.Z.T is mostly for internal usage. + make_dev_alias(f_sc->dev, buf); 2) struct usb2_privdata I would call the structure "usb2_fs_privdata" so that it is clear that this is File-System related private data. There is also a field called "xfer->priv_sc" so it might be confusing? 3) You need to solve the problem about a per-open-call context for /dev/ugenX.Y . This device is supposed to be cloneable, that means multiple processes are allowed to open it and establish independant connections to the USB stack. Here are also some tricky issues with permissions, because I allow trunking of multiple endpoints through the same file-handle, called USB FS, and you have to verify that the current thread has permission to open the endpoint inside an ioctl function. 4) You need to generate dummy /dev/ugenX.Y.0 ... 15 inclusivly, endpoint holders. Typically there are not 15 endpoints, but it is difficult to in-advance figure out this number. 5) Given that you use "destroy_dev_sched_cb" it becomes very easy to end up in a situation with multiple cdev instances having identical names, because the "destroy_dev_sched_cb" does not delete the device until the process which has the device opened closes it. Especially when re-attaching an USB device. Regarding your finding [1], I've assumed that lookup and open of a file is atomic in devfs regard. Else you would have to change the devfs-clone interface to be able to solve the problem passing along the global variables. --HPS On Sunday 09 November 2008, Rink Springer wrote: > Hi everyone, > > I've made a patch, available at http://rink.nu/tmp/usb-cdev.diff, which > removes the custom "/dev/usb " device, associated event handlers and > custom ownership/permissions structures and converts the whole deal to > use make_dev(9) and friends. The end result is that every USB device > will get a /dev entry, which can be chmod(1)-ed, chown(1)-ed etc as > usual - futhermore, possible races between looking up a device name and > opening it are completely removed by this patch [1] > > usbconfig(8) works as before after applying the patch, but obviously, > commands that involve setting permissions or ownership will return an > error as those ioctl's are no longer present; I intend to remove them > completely and from usbconfig itself after this patch has been > committed. > > Feel free to review this patch; I'd like to commit it to HEAD at the end > of the week or so. > > [1] The previous code would set a global variable to determine which > USB device corresponds with the file being looked up, and a > subsequent open call would open this device. I don't know the VFS > well enough to determine if this can be exploited, but it doesn't > look right to me :-) > From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 15:13:20 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91DF61065678 for ; Sun, 9 Nov 2008 15:13:20 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id F090D8FC12 for ; Sun, 9 Nov 2008 15:13:19 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=1su-2ruMAAAA:8 a=tLYY_Hw5G-20JAV5bo4A:9 a=pBeghD07ZpBDkmSujhgA:7 a=wGUWeYFnk7lRD-dxEgJPurCmvmQA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 973860208; Sun, 09 Nov 2008 15:13:16 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 9 Nov 2008 15:15:25 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> In-Reply-To: <20081109120257.GA78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091515.26123.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 15:13:20 -0000 Hi Rick, After going through your patch I have a feeling you quite well understand how USB2 is working with regard to the file system. Some issues: 1) You don't have to create an alias in "usb2_fifo_attach". The alias /dev/usbX.Y.Z.T is mostly for internal usage. + make_dev_alias(f_sc->dev, buf); 2) struct usb2_privdata I would call the structure "usb2_fs_privdata" so that it is clear that this is File-System related private data. There is also a field called "xfer->priv_sc" so it might be confusing? 3) You need to solve the problem about a per-open-call context for /dev/ugenX.Y . This device is supposed to be cloneable, that means multiple processes are allowed to open it and establish independant connections to the USB stack. Here are also some tricky issues with permissions, because I allow trunking of multiple endpoints through the same file-handle, called USB FS, and you have to verify that the current thread has permission to open the endpoint inside an ioctl function. 4) You need to generate dummy /dev/ugenX.Y.0 ... 15 inclusivly, endpoint holders. Typically there are not 15 endpoints, but it is difficult to in-advance figure out this number. 5) Given that you use "destroy_dev_sched_cb" it becomes very easy to end up in a situation with multiple cdev instances having identical names, because the "destroy_dev_sched_cb" does not delete the device until the process which has the device opened closes it. Especially when re-attaching an USB device. Regarding your finding [1], I've assumed that lookup and open of a file is atomic in devfs regard. Else you would have to change the devfs-clone interface to be able to solve the problem passing along the global variables. --HPS On Sunday 09 November 2008, Rink Springer wrote: > Hi everyone, > > I've made a patch, available at http://rink.nu/tmp/usb-cdev.diff, which > removes the custom "/dev/usb " device, associated event handlers and > custom ownership/permissions structures and converts the whole deal to > use make_dev(9) and friends. The end result is that every USB device > will get a /dev entry, which can be chmod(1)-ed, chown(1)-ed etc as > usual - futhermore, possible races between looking up a device name and > opening it are completely removed by this patch [1] > > usbconfig(8) works as before after applying the patch, but obviously, > commands that involve setting permissions or ownership will return an > error as those ioctl's are no longer present; I intend to remove them > completely and from usbconfig itself after this patch has been > committed. > > Feel free to review this patch; I'd like to commit it to HEAD at the end > of the week or so. > > [1] The previous code would set a global variable to determine which > USB device corresponds with the file being looked up, and a > subsequent open call would open this device. I don't know the VFS > well enough to determine if this can be exploited, but it doesn't > look right to me :-) > From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 15:47:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E491065676; Sun, 9 Nov 2008 15:47:21 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0558FC19; Sun, 9 Nov 2008 15:47:20 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 9280F6D439; Sun, 9 Nov 2008 16:47:26 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NpE0z56g91gY; Sun, 9 Nov 2008 16:47:22 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id C78196D42B; Sun, 9 Nov 2008 16:47:22 +0100 (CET) Date: Sun, 9 Nov 2008 16:47:22 +0100 From: Rink Springer To: Hans Petter Selasky Message-ID: <20081109154722.GC78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811091515.26123.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 15:47:22 -0000 Hi Hans, On Sun, Nov 09, 2008 at 03:15:25PM +0100, Hans Petter Selasky wrote: > 1) You don't have to create an alias in "usb2_fifo_attach". The > alias /dev/usbX.Y.Z.T is mostly for internal usage. > > + make_dev_alias(f_sc->dev, buf); OK, I'll remove it - I assumed it might be used elsewhere, but appearantly this is not the case. > > 2) struct usb2_privdata > > I would call the structure "usb2_fs_privdata" so that it is clear that this is > File-System related private data. There is also a field > called "xfer->priv_sc" so it might be confusing? Yeah, after some though that is way too generic - I've renamed it to 'usb2_cdev_privdata' as it's really private cdev data. > 3) You need to solve the problem about a per-open-call context > for /dev/ugenX.Y . This device is supposed to be cloneable, that means > multiple processes are allowed to open it and establish independant > connections to the USB stack. Here are also some tricky issues with > permissions, because I allow trunking of multiple endpoints through the same > file-handle, called USB FS, and you have to verify that the current thread > has permission to open the endpoint inside an ioctl function. Well, multiple opens aren't a problem to implement - but I fail the permissions problem. I think allowing multiple opens is useful for as you can do ioctl() to them - but why would you ever want to be able to read/write the same endpoint from multiple processes? > 4) You need to generate dummy /dev/ugenX.Y.0 ... 15 inclusivly, endpoint > holders. Typically there are not 15 endpoints, but it is difficult to > in-advance figure out this number. OK, will do. > 5) Given that you use "destroy_dev_sched_cb" it becomes very easy to end up in > a situation with multiple cdev instances having identical names, because > the "destroy_dev_sched_cb" does not delete the device until the process which > has the device opened closes it. Especially when re-attaching an USB device. Yeah, I agree this is a problem. Robert Watson suggested that maybe a worker thread that does all make_dev and destroy_dev calls may be a good idea (appearantly, pccard does this already) - so they can be adequately serialized to prevent duplicant devices from existing. I'll think about this some more and talk to pccard people about how they did it. -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 15:47:22 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E491065676; Sun, 9 Nov 2008 15:47:21 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0558FC19; Sun, 9 Nov 2008 15:47:20 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 9280F6D439; Sun, 9 Nov 2008 16:47:26 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NpE0z56g91gY; Sun, 9 Nov 2008 16:47:22 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id C78196D42B; Sun, 9 Nov 2008 16:47:22 +0100 (CET) Date: Sun, 9 Nov 2008 16:47:22 +0100 From: Rink Springer To: Hans Petter Selasky Message-ID: <20081109154722.GC78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811091515.26123.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 15:47:22 -0000 Hi Hans, On Sun, Nov 09, 2008 at 03:15:25PM +0100, Hans Petter Selasky wrote: > 1) You don't have to create an alias in "usb2_fifo_attach". The > alias /dev/usbX.Y.Z.T is mostly for internal usage. > > + make_dev_alias(f_sc->dev, buf); OK, I'll remove it - I assumed it might be used elsewhere, but appearantly this is not the case. > > 2) struct usb2_privdata > > I would call the structure "usb2_fs_privdata" so that it is clear that this is > File-System related private data. There is also a field > called "xfer->priv_sc" so it might be confusing? Yeah, after some though that is way too generic - I've renamed it to 'usb2_cdev_privdata' as it's really private cdev data. > 3) You need to solve the problem about a per-open-call context > for /dev/ugenX.Y . This device is supposed to be cloneable, that means > multiple processes are allowed to open it and establish independant > connections to the USB stack. Here are also some tricky issues with > permissions, because I allow trunking of multiple endpoints through the same > file-handle, called USB FS, and you have to verify that the current thread > has permission to open the endpoint inside an ioctl function. Well, multiple opens aren't a problem to implement - but I fail the permissions problem. I think allowing multiple opens is useful for as you can do ioctl() to them - but why would you ever want to be able to read/write the same endpoint from multiple processes? > 4) You need to generate dummy /dev/ugenX.Y.0 ... 15 inclusivly, endpoint > holders. Typically there are not 15 endpoints, but it is difficult to > in-advance figure out this number. OK, will do. > 5) Given that you use "destroy_dev_sched_cb" it becomes very easy to end up in > a situation with multiple cdev instances having identical names, because > the "destroy_dev_sched_cb" does not delete the device until the process which > has the device opened closes it. Especially when re-attaching an USB device. Yeah, I agree this is a problem. Robert Watson suggested that maybe a worker thread that does all make_dev and destroy_dev calls may be a good idea (appearantly, pccard does this already) - so they can be adequately serialized to prevent duplicant devices from existing. I'll think about this some more and talk to pccard people about how they did it. -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 15:58:03 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6369A106564A; Sun, 9 Nov 2008 15:58:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 96B8D8FC16; Sun, 9 Nov 2008 15:58:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=FVM5Q_DoANwoGtWqb9oA:9 a=Vo0Yl0eysTpf8LqmnMEA:7 a=vp6WGYIvxjnnhARfuOBSHwA9N5cA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1144733230; Sun, 09 Nov 2008 16:58:00 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:00:05 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> In-Reply-To: <20081109154722.GC78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091700.06932.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 15:58:03 -0000 Hi Rick, On Sunday 09 November 2008, Rink Springer wrote: > Hi Hans, ... > > > 3) You need to solve the problem about a per-open-call context > > for /dev/ugenX.Y . This device is supposed to be cloneable, that means > > multiple processes are allowed to open it and establish independant > > connections to the USB stack. Here are also some tricky issues with > > permissions, because I allow trunking of multiple endpoints through the > > same file-handle, called USB FS, and you have to verify that the current > > thread has permission to open the endpoint inside an ioctl function. > > Well, multiple opens aren't a problem to implement - but I fail the > permissions problem. I think allowing multiple opens is useful for > as you can do ioctl() to them - but why would you ever want to be able > to read/write the same endpoint from multiple processes? Hi, It is not the same endpoint, but multiple different endpoints on the same device through the same file handle. Instead of one endpoint per file, you have one file handle for each set of endpoints you need for your USB userland driver, like LibUSB. Then there is only one file-handle to poll. Actually there are two modes in UGEN now. Maybe you were not aware. Let me quickly explain: 1) Simple read/write mode that works with cat & dd. 2) Special USB FS mode which exposes the full USB features to userland. This mode does not use read/write, but rather copyin, copyout and a set of software USB descriptors. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:09:25 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E0B11065690; Sun, 9 Nov 2008 16:09:25 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 697E28FC1A; Sun, 9 Nov 2008 16:09:24 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=K57ehcWm55DzPhoCGXIA:9 a=seAdGuFaZuS5R1wP-zmYPBa6aakA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1043985679; Sun, 09 Nov 2008 17:09:22 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:11:30 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> In-Reply-To: <20081109154722.GC78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091711.32260.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:09:25 -0000 Hi Rick, > but why would you ever want to be able > to read/write the same endpoint from multiple processes? > The control endpoint is a special endpoint which is shared and might be accessed from multiple process. Else you are right that only one process should access and endpoint at a time. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:09:25 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E0B11065690; Sun, 9 Nov 2008 16:09:25 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 697E28FC1A; Sun, 9 Nov 2008 16:09:24 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=K57ehcWm55DzPhoCGXIA:9 a=seAdGuFaZuS5R1wP-zmYPBa6aakA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1043985679; Sun, 09 Nov 2008 17:09:22 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:11:30 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> In-Reply-To: <20081109154722.GC78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091711.32260.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:09:25 -0000 Hi Rick, > but why would you ever want to be able > to read/write the same endpoint from multiple processes? > The control endpoint is a special endpoint which is shared and might be accessed from multiple process. Else you are right that only one process should access and endpoint at a time. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:28:33 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1C7A1065686; Sun, 9 Nov 2008 16:28:33 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4778FC2C; Sun, 9 Nov 2008 16:28:32 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 5C0296D42B; Sun, 9 Nov 2008 17:28:39 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GWA7jWtlbfH2; Sun, 9 Nov 2008 17:28:35 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id 7A48E6D423; Sun, 9 Nov 2008 17:28:35 +0100 (CET) Date: Sun, 9 Nov 2008 17:28:35 +0100 From: Rink Springer To: Hans Petter Selasky Message-ID: <20081109162835.GE78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> <200811091700.06932.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811091700.06932.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:28:34 -0000 Hi Hans, On Sun, Nov 09, 2008 at 05:00:05PM +0100, Hans Petter Selasky wrote: > It is not the same endpoint, but multiple different endpoints on the same > device through the same file handle. Instead of one endpoint per file, you > have one file handle for each set of endpoints you need for your USB userland > driver, like LibUSB. Then there is only one file-handle to poll. Actually > there are two modes in UGEN now. Maybe you were not aware. Let me quickly > explain: > > 1) Simple read/write mode that works with cat & dd. > > 2) Special USB FS mode which exposes the full USB features to userland. This > mode does not use read/write, but rather copyin, copyout and a set of > software USB descriptors. Hmm, I think I see what you mean. Basically, you just open("/dev/ugenX.Y") and you can use the USB_FS_xxx ioctl's to have fine-grained control. However, if you open("/dev/ugen.X.Y.Z"), you'd talk with endpoint Z on USB device X.Y.. this is actually quite cool, guess I should have studied usb2_generic.c more :-) I think it makes sense to say that if /dev/ugenX.Y is opened, you shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would be fine, but any ioctl() dealing with the corresponding endpoint Z should be denied. Does this make sense to you? -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:28:33 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1C7A1065686; Sun, 9 Nov 2008 16:28:33 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4778FC2C; Sun, 9 Nov 2008 16:28:32 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 5C0296D42B; Sun, 9 Nov 2008 17:28:39 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GWA7jWtlbfH2; Sun, 9 Nov 2008 17:28:35 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id 7A48E6D423; Sun, 9 Nov 2008 17:28:35 +0100 (CET) Date: Sun, 9 Nov 2008 17:28:35 +0100 From: Rink Springer To: Hans Petter Selasky Message-ID: <20081109162835.GE78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> <200811091700.06932.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811091700.06932.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:28:34 -0000 Hi Hans, On Sun, Nov 09, 2008 at 05:00:05PM +0100, Hans Petter Selasky wrote: > It is not the same endpoint, but multiple different endpoints on the same > device through the same file handle. Instead of one endpoint per file, you > have one file handle for each set of endpoints you need for your USB userland > driver, like LibUSB. Then there is only one file-handle to poll. Actually > there are two modes in UGEN now. Maybe you were not aware. Let me quickly > explain: > > 1) Simple read/write mode that works with cat & dd. > > 2) Special USB FS mode which exposes the full USB features to userland. This > mode does not use read/write, but rather copyin, copyout and a set of > software USB descriptors. Hmm, I think I see what you mean. Basically, you just open("/dev/ugenX.Y") and you can use the USB_FS_xxx ioctl's to have fine-grained control. However, if you open("/dev/ugen.X.Y.Z"), you'd talk with endpoint Z on USB device X.Y.. this is actually quite cool, guess I should have studied usb2_generic.c more :-) I think it makes sense to say that if /dev/ugenX.Y is opened, you shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would be fine, but any ioctl() dealing with the corresponding endpoint Z should be denied. Does this make sense to you? -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:39:04 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C882106568A; Sun, 9 Nov 2008 16:39:04 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id CDC738FC0C; Sun, 9 Nov 2008 16:39:03 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 1192D6D42B; Sun, 9 Nov 2008 17:39:10 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6rVXJu6OoYvW; Sun, 9 Nov 2008 17:39:06 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id CA3886D423; Sun, 9 Nov 2008 17:39:06 +0100 (CET) Date: Sun, 9 Nov 2008 17:39:06 +0100 From: Rink Springer To: Rink Springer Message-ID: <20081109163906.GF78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> <200811091700.06932.hselasky@c2i.net> <20081109162835.GE78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081109162835.GE78524@rink.nu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:39:04 -0000 On Sun, Nov 09, 2008 at 05:28:35PM +0100, Rink Springer wrote: > I think it makes sense to say that if /dev/ugenX.Y is opened, you > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > be fine, but any ioctl() dealing with the corresponding endpoint Z > should be denied. Come to think of it, I'd expect that an application would either: 1) Open /dev/ugenX.Y and chat with whatever endpoints it needs 2) Open /dev/ugenX.Y.{Z1,Z2} and chat with them But not mix these - thus, if a device opens /dev/ugenX.Y, I'd say it should have complete control since it asked for this; if it opens /dev/ugenX.Y.Z, anyone else can open /dev/ugenX.Y.Z' if Z' != Z. You see, I'd prefer to keep the implementation reasonably easy - for example, what happends if a process forks off extra threads which each open a /dev/usbX.Y.Z device? Should they be allowed? What if one of them dies, etc... I'd like to avoid the whole 'the same process can...' alltogether for this purpose. (Of course, the zero endpoint should be magic, since you need it to suspend/resume a device etc.) Does this make sense to you (or anyone else for what matter? :-) -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:39:04 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C882106568A; Sun, 9 Nov 2008 16:39:04 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id CDC738FC0C; Sun, 9 Nov 2008 16:39:03 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 1192D6D42B; Sun, 9 Nov 2008 17:39:10 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6rVXJu6OoYvW; Sun, 9 Nov 2008 17:39:06 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id CA3886D423; Sun, 9 Nov 2008 17:39:06 +0100 (CET) Date: Sun, 9 Nov 2008 17:39:06 +0100 From: Rink Springer To: Rink Springer Message-ID: <20081109163906.GF78524@rink.nu> References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> <200811091700.06932.hselasky@c2i.net> <20081109162835.GE78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081109162835.GE78524@rink.nu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:39:04 -0000 On Sun, Nov 09, 2008 at 05:28:35PM +0100, Rink Springer wrote: > I think it makes sense to say that if /dev/ugenX.Y is opened, you > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > be fine, but any ioctl() dealing with the corresponding endpoint Z > should be denied. Come to think of it, I'd expect that an application would either: 1) Open /dev/ugenX.Y and chat with whatever endpoints it needs 2) Open /dev/ugenX.Y.{Z1,Z2} and chat with them But not mix these - thus, if a device opens /dev/ugenX.Y, I'd say it should have complete control since it asked for this; if it opens /dev/ugenX.Y.Z, anyone else can open /dev/ugenX.Y.Z' if Z' != Z. You see, I'd prefer to keep the implementation reasonably easy - for example, what happends if a process forks off extra threads which each open a /dev/usbX.Y.Z device? Should they be allowed? What if one of them dies, etc... I'd like to avoid the whole 'the same process can...' alltogether for this purpose. (Of course, the zero endpoint should be magic, since you need it to suspend/resume a device etc.) Does this make sense to you (or anyone else for what matter? :-) -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:46:04 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00871106568C; Sun, 9 Nov 2008 16:46:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 369D38FC1C; Sun, 9 Nov 2008 16:46:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=T0YFZMV6NusNvlpCoTQA:9 a=JTT4-4WaAcZvEnkw9hnbDhrwkH8A:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 756766916; Sun, 09 Nov 2008 17:46:01 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:48:05 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091700.06932.hselasky@c2i.net> <20081109162835.GE78524@rink.nu> In-Reply-To: <20081109162835.GE78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091748.05863.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:46:04 -0000 On Sunday 09 November 2008, Rink Springer wrote: > Hi Hans, > > On Sun, Nov 09, 2008 at 05:00:05PM +0100, Hans Petter Selasky wrote: > > It is not the same endpoint, but multiple different endpoints on the same > > device through the same file handle. Instead of one endpoint per file, > > you have one file handle for each set of endpoints you need for your USB > > userland driver, like LibUSB. Then there is only one file-handle to poll. > > Actually there are two modes in UGEN now. Maybe you were not aware. Let > > me quickly explain: > > > > 1) Simple read/write mode that works with cat & dd. > > > > 2) Special USB FS mode which exposes the full USB features to userland. > > This mode does not use read/write, but rather copyin, copyout and a set > > of software USB descriptors. > > Hmm, I think I see what you mean. Basically, you just > open("/dev/ugenX.Y") and you can use the USB_FS_xxx ioctl's to have > fine-grained control. However, if you open("/dev/ugen.X.Y.Z"), you'd > talk with endpoint Z on USB device X.Y.. this is actually quite cool, > guess I should have studied usb2_generic.c more :-) That's correct. > > I think it makes sense to say that if /dev/ugenX.Y is opened, you > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > be fine, but any ioctl() dealing with the corresponding endpoint Z > should be denied. I would say it be allowed to open the endpoint both ways at the same time. It can make debugging easier. But there can be two different processes opening /dev/ugenX.Y at the same time, accessing different endpoints! --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:46:04 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00871106568C; Sun, 9 Nov 2008 16:46:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 369D38FC1C; Sun, 9 Nov 2008 16:46:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=T0YFZMV6NusNvlpCoTQA:9 a=JTT4-4WaAcZvEnkw9hnbDhrwkH8A:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 756766916; Sun, 09 Nov 2008 17:46:01 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:48:05 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091700.06932.hselasky@c2i.net> <20081109162835.GE78524@rink.nu> In-Reply-To: <20081109162835.GE78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091748.05863.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:46:04 -0000 On Sunday 09 November 2008, Rink Springer wrote: > Hi Hans, > > On Sun, Nov 09, 2008 at 05:00:05PM +0100, Hans Petter Selasky wrote: > > It is not the same endpoint, but multiple different endpoints on the same > > device through the same file handle. Instead of one endpoint per file, > > you have one file handle for each set of endpoints you need for your USB > > userland driver, like LibUSB. Then there is only one file-handle to poll. > > Actually there are two modes in UGEN now. Maybe you were not aware. Let > > me quickly explain: > > > > 1) Simple read/write mode that works with cat & dd. > > > > 2) Special USB FS mode which exposes the full USB features to userland. > > This mode does not use read/write, but rather copyin, copyout and a set > > of software USB descriptors. > > Hmm, I think I see what you mean. Basically, you just > open("/dev/ugenX.Y") and you can use the USB_FS_xxx ioctl's to have > fine-grained control. However, if you open("/dev/ugen.X.Y.Z"), you'd > talk with endpoint Z on USB device X.Y.. this is actually quite cool, > guess I should have studied usb2_generic.c more :-) That's correct. > > I think it makes sense to say that if /dev/ugenX.Y is opened, you > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > be fine, but any ioctl() dealing with the corresponding endpoint Z > should be denied. I would say it be allowed to open the endpoint both ways at the same time. It can make debugging easier. But there can be two different processes opening /dev/ugenX.Y at the same time, accessing different endpoints! --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:53:24 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D9C106564A; Sun, 9 Nov 2008 16:53:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id CDDC38FC0A; Sun, 9 Nov 2008 16:53:23 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=q3P2X_nk9Hctx0a1uNUA:9 a=j2kp9weOVhrKCxJNGggXKwxtH58A:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 756777338; Sun, 09 Nov 2008 17:53:22 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:55:23 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <20081109162835.GE78524@rink.nu> <20081109163906.GF78524@rink.nu> In-Reply-To: <20081109163906.GF78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091755.23962.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:53:24 -0000 Hi Rick, On Sunday 09 November 2008, Rink Springer wrote: > On Sun, Nov 09, 2008 at 05:28:35PM +0100, Rink Springer wrote: > > I think it makes sense to say that if /dev/ugenX.Y is opened, you > > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > > be fine, but any ioctl() dealing with the corresponding endpoint Z > > should be denied. > > Come to think of it, I'd expect that an application would either: > > 1) Open /dev/ugenX.Y and chat with whatever endpoints it needs > 2) Open /dev/ugenX.Y.{Z1,Z2} and chat with them Right. > > But not mix these - thus, if a device opens /dev/ugenX.Y, I'd say it > should have complete control since it asked for this; if it opens > /dev/ugenX.Y.Z, anyone else can open /dev/ugenX.Y.Z' if Z' != Z. > > You see, I'd prefer to keep the implementation reasonably easy - for > example, what happends if a process forks off extra threads which each > open a /dev/usbX.Y.Z device? Should they be allowed? I would say yes. For debugging purpose only. Sometimes you need to do things out of the ordinary, and then this is a very easy way to do it. > What if one of them > dies, etc... I'd like to avoid the whole 'the same process can...' > alltogether for this purpose. LibUSB20 currently uses the /dev/ugenX.Y for all device access. /dev/ugenX.Y.Z is mostly there for backwards compatibility and debugging. With some minor tweaks to devfs the "magic" I'm already doing, would become much simpler. > > (Of course, the zero endpoint should be magic, since you need it to > suspend/resume a device etc.) > > Does this make sense to you (or anyone else for what matter? :-) Yes, I think you are getting it now :-) --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:53:24 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D9C106564A; Sun, 9 Nov 2008 16:53:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id CDDC38FC0A; Sun, 9 Nov 2008 16:53:23 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=q3P2X_nk9Hctx0a1uNUA:9 a=j2kp9weOVhrKCxJNGggXKwxtH58A:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 756777338; Sun, 09 Nov 2008 17:53:22 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:55:23 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <20081109162835.GE78524@rink.nu> <20081109163906.GF78524@rink.nu> In-Reply-To: <20081109163906.GF78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091755.23962.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:53:24 -0000 Hi Rick, On Sunday 09 November 2008, Rink Springer wrote: > On Sun, Nov 09, 2008 at 05:28:35PM +0100, Rink Springer wrote: > > I think it makes sense to say that if /dev/ugenX.Y is opened, you > > shouldn't be able to open /dev/ugenX.Y.Z, right? However, what happends > > if /dev/ugenX.Y.Z is opened? I'd think that opening /dev/ugenX.Y would > > be fine, but any ioctl() dealing with the corresponding endpoint Z > > should be denied. > > Come to think of it, I'd expect that an application would either: > > 1) Open /dev/ugenX.Y and chat with whatever endpoints it needs > 2) Open /dev/ugenX.Y.{Z1,Z2} and chat with them Right. > > But not mix these - thus, if a device opens /dev/ugenX.Y, I'd say it > should have complete control since it asked for this; if it opens > /dev/ugenX.Y.Z, anyone else can open /dev/ugenX.Y.Z' if Z' != Z. > > You see, I'd prefer to keep the implementation reasonably easy - for > example, what happends if a process forks off extra threads which each > open a /dev/usbX.Y.Z device? Should they be allowed? I would say yes. For debugging purpose only. Sometimes you need to do things out of the ordinary, and then this is a very easy way to do it. > What if one of them > dies, etc... I'd like to avoid the whole 'the same process can...' > alltogether for this purpose. LibUSB20 currently uses the /dev/ugenX.Y for all device access. /dev/ugenX.Y.Z is mostly there for backwards compatibility and debugging. With some minor tweaks to devfs the "magic" I'm already doing, would become much simpler. > > (Of course, the zero endpoint should be magic, since you need it to > suspend/resume a device etc.) > > Does this make sense to you (or anyone else for what matter? :-) Yes, I think you are getting it now :-) --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 16:58:05 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACC41065677 for ; Sun, 9 Nov 2008 16:58:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 9772D8FC16 for ; Sun, 9 Nov 2008 16:58:04 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MdMrz2CnUUkA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=FVM5Q_DoANwoGtWqb9oA:9 a=Vo0Yl0eysTpf8LqmnMEA:7 a=vp6WGYIvxjnnhARfuOBSHwA9N5cA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1144733230; Sun, 09 Nov 2008 16:58:00 +0100 From: Hans Petter Selasky To: Rink Springer Date: Sun, 9 Nov 2008 17:00:05 +0100 User-Agent: KMail/1.9.7 References: <20081109120257.GA78524@rink.nu> <200811091515.26123.hselasky@c2i.net> <20081109154722.GC78524@rink.nu> In-Reply-To: <20081109154722.GC78524@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811091700.06932.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Patch to convert usb2 to use cdev X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 16:58:05 -0000 Hi Rick, On Sunday 09 November 2008, Rink Springer wrote: > Hi Hans, ... > > > 3) You need to solve the problem about a per-open-call context > > for /dev/ugenX.Y . This device is supposed to be cloneable, that means > > multiple processes are allowed to open it and establish independant > > connections to the USB stack. Here are also some tricky issues with > > permissions, because I allow trunking of multiple endpoints through the > > same file-handle, called USB FS, and you have to verify that the current > > thread has permission to open the endpoint inside an ioctl function. > > Well, multiple opens aren't a problem to implement - but I fail the > permissions problem. I think allowing multiple opens is useful for > as you can do ioctl() to them - but why would you ever want to be able > to read/write the same endpoint from multiple processes? Hi, It is not the same endpoint, but multiple different endpoints on the same device through the same file handle. Instead of one endpoint per file, you have one file handle for each set of endpoints you need for your USB userland driver, like LibUSB. Then there is only one file-handle to poll. Actually there are two modes in UGEN now. Maybe you were not aware. Let me quickly explain: 1) Simple read/write mode that works with cat & dd. 2) Special USB FS mode which exposes the full USB features to userland. This mode does not use read/write, but rather copyin, copyout and a set of software USB descriptors. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Nov 9 17:15:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF43A10656A5; Sun, 9 Nov 2008 17:15:17 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-gx0-f13.google.com (mail-gx0-f13.google.com [209.85.217.13]) by mx1.freebsd.org (Postfix) with ESMTP id 5940B8FC0C; Sun, 9 Nov 2008 17:15:17 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by gxk6 with SMTP id 6so1669717gxk.19 for ; Sun, 09 Nov 2008 09:15:16 -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=2/7OKWFG1yMOcsbNj+E6gIT53km+K4NR4h0OzEZRO5A=; b=ws5hqAOfWPhosVlnEWnQ2raT3tjKIIZZ43sn4ld2OvouF0TDf/fHSruj9DgXoorTY5 +L5Bok2YpfzD7uq39xh7y8+ocBS/ReoRcsI9cVv0Eu1u8OhwHZJfbiLiJw3YU7aqY1mu XwrEMYMWlD/YnS+mNOauzj3NgBw1gwWkKBPRc= 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=bdzOhTCXC0B4PwkBqxUTsynL9UX/rgHqB4X0A6YyVtvkzNFHyDz8U3rSwODbVLc6eD RP9b9NPCTb+J93IiqLWE/IQiGmDlVbSQVoC7AGJHPns0mdJT0HYpiAAvLqhKPZvR0t35 M9r5db+WsM3BpY0JxePbwkkK4A2DlndWj2gKc= Received: by 10.64.183.6 with SMTP id g6mr6002120qbf.17.1226250916207; Sun, 09 Nov 2008 09:15:16 -0800 (PST) Received: by 10.65.216.9 with HTTP; Sun, 9 Nov 2008 09:15:16 -0800 (PST) Message-ID: <3a142e750811090915u389a3bfeqf4a13fc8b6c70c5d@mail.gmail.com> Date: Sun, 9 Nov 2008 18:15:16 +0100 From: "Paul B. Mahol" To: "Hans Petter Selasky" In-Reply-To: <200811091039.55889.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a142e750811071154y5108f299h60bb7c1060f4567e@mail.gmail.com> <200811072236.38267.hselasky@c2i.net> <3a142e750811081442kc746a41j41d3d46e6688033f@mail.gmail.com> <200811091039.55889.hselasky@c2i.net> Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 17:15:18 -0000 On 11/9/08, Hans Petter Selasky wrote: > On Saturday 08 November 2008, Paul B. Mahol wrote: >> On 11/7/08, Hans Petter Selasky wrote: >> > On Friday 07 November 2008, Paul B. Mahol wrote: >> >> On 11/7/08, M. Warner Losh wrote: >> >> > : > After some time it will appear but will start attaching and >> >> > : > dettaching all the time: >> > >> > How quick is this happening? There has been some changes to the >> > sys/dev/usb2/core/uhub2.c file recently, which control how HUB is >> > responding to events. >> >> ~3 seconds. >> >> I got also this messages: >> >> uhci1: LegSup = 0x2f00 > ^^^^ Legacy support is complaining about something! > >> uhci_interrupt: host controller halted >> uhci_dumpregs:705: usbus1 regs: cmd=0000, sts=0020, intr=0000, >> frnum=0000, flbase=3f7fa000, sof=0040, portsc1=0080, portsc2=0080 >> uhci_dump_qh:779: QH(0xc627e900) at 0x05a7e902: h_next=0x05a7db82 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627db80) at 0x05a7db82: h_next=0x05a7dc02 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627dc00) at 0x05a7dc02: h_next=0x05a7dc82 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627dc80) at 0x05a7dc82: h_next=0x00000001 >> e_next=0x05a7dd00 >> uhci_interrupt: host controller halted >> uhci_dumpregs:705: usbus1 regs: cmd=0000, sts=0020, intr=0000, >> frnum=0000, flbase=3f7fa000, sof=0040, portsc1=0080, portsc2=0080 >> uhci_dump_qh:779: QH(0xc627e900) at 0x05a7e902: h_next=0x05a7db82 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627db80) at 0x05a7db82: h_next=0x05a7dc02 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627dc00) at 0x05a7dc02: h_next=0x05a7dc82 >> e_next=0x00000001 >> uhci_dump_qh:779: QH(0xc627dc80) at 0x05a7dc82: h_next=0x00000001 >> e_next=0x05a7dd00 >> >> Doesnt looks like hub is source of fault, one from perforce with >> 152460 comitt is not available >> in CURRENT and with latest version of usb2_hub.c from perforce problem >> is still there. >> >> > Maybe you can get the date of that file from the build where it works >> > and >> > the >> > build where it doesn't work, and I will check the differences. >> >> Last time I tested usb2 from svn was before huge modularization. > > Yes, then it probably has something to do with Legacy USB support. > > Some suggestions: > > 0) Have you tried putting the USB modules in the kernel ? > > 1) Try not loading the EHCI driver. Does the UHCI driver work without the > host > controller halted error? > > 2) sys/dev/usb2/controller/uhci2_pci.c > > Try moving the pci_read/pci_write lines before the IRQ is setup: > > #if (__FreeBSD_version >= 700031) > err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | > INTR_MPSAFE, > NULL, (void *)(void *)uhci_interrupt, sc, &sc->sc_intr_hdl); > #else > err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | > INTR_MPSAFE, > (void *)(void *)uhci_interrupt, sc, &sc->sc_intr_hdl); > #endif > > if (err) { > device_printf(self, "Could not setup irq, %d\n", err); > sc->sc_intr_hdl = NULL; > goto error; > } > /* > * Set the PIRQD enable bit and switch off all the others. We don't > * want legacy support to interfere with us XXX Does this also mean > * that the BIOS won't touch the keyboard anymore if it is connected > * to the ports of the root hub? > */ > #if USB_DEBUG > if (pci_read_config(self, PCI_LEGSUP, 2) != PCI_LEGSUP_USBPIRQDEN) { > device_printf(self, "LegSup = 0x%04x\n", > pci_read_config(self, PCI_LEGSUP, 2)); > } > #endif > pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); > > 3) There has been some changes to the EHCI legacy support code recently. Try > the same in EHCI: Move "ehci_pci_takecontroller" before the IRQ is setup: > > sys/dev/usb2/controller/ehci2_pci.c > > #if (__FreeBSD_version >= 700031) > err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | > INTR_MPSAFE, > NULL, (void *)(void *)ehci_interrupt, sc, &sc->sc_intr_hdl); > #else > err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | > INTR_MPSAFE, > (void *)(void *)ehci_interrupt, sc, &sc->sc_intr_hdl); > #endif > if (err) { > device_printf(self, "Could not setup irq, %d\n", err); > sc->sc_intr_hdl = NULL; > goto error; > } > ehci_pci_takecontroller(self); > > You only need to recompile and reinstall the USB2 modules after these > changes. > > Try one suggestion at a time so that we can do some elimination. Real source of problem was card itself (similar errors were happening in oldusb, linux and windows) Another card works fine. Sorry for the noise. From owner-freebsd-usb@FreeBSD.ORG Mon Nov 10 03:12:31 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC3E0106567F; Mon, 10 Nov 2008 03:12:31 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from m12-13.163.com (m12-13.163.com [220.181.12.13]) by mx1.freebsd.org (Postfix) with SMTP id A4CC48FC0A; Mon, 10 Nov 2008 03:12:30 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from [127.0.0.1] (unknown [60.191.86.3]) by smtp9 (Coremail) with SMTP id DcCowLCbwlmYphdJqigSFQ--.457S2; Mon, 10 Nov 2008 11:12:24 +0800 (CST) Message-ID: <4917A695.3030903@163.com> Date: Mon, 10 Nov 2008 11:12:21 +0800 From: kevin User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Hans Petter Selasky References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <20081107.132401.1622434515.imp@bsdimp.com> <15059493.193721226221296136.JavaMail.coremail@bj163app23.163.com> <200811091016.16934.hselasky@c2i.net> In-Reply-To: <200811091016.16934.hselasky@c2i.net> Content-Type: text/plain; charset=x-gbk; format=flowed Content-Transfer-Encoding: 7bit X-Coremail-Antispam: 1Uf129KBjvJXoW3JFWrXw15CFW5JFW7WrWfXwb_yoW3JFykpr 98GFnxJr4kKF1F9w1qqwn5CrWrJa1UAayfJa4kKw4rKw1jg34Yqr9FyFy3uwnIvrZ5uF17 ZFykAw4Iqw15WaUanT9S1TB71UUUUUUv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UU U8D7k0a2IF6F4UM7kC6x804xWl14x267AKxVWUJVW8JwAFxVCF77xC6IxKo4kEV4yl1I0E scIYIxCEI4klw4CSwwAFIxvE14AKwVWUJVWUGwAawVAYYI1S6c8GOVWUur45Jrylnx0Ec2 IEnICE548m6r1DJrWUZwAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Jrv_JF1lYx0Ex4A2jsIE14v26r4j6F4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6x AIw28IcVAK0I8IjxAxMx02cVAKzwCY02Avz4vE14v_Gr4lc2IjII80xcxEwVWxJVW3JwCF 72vE52k0Y41lx4CE17CEb7AF67AKxVWUXVWUAbIYCTnIWIevJa73UjIFyTuYvjxUT5l1DU UUU Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 03:12:32 -0000 Hans Petter Selasky wrote: > On Sunday 09 November 2008, kevin wrote: > >> It's a bug? >> /boot/loader.conf: >> zfs_load="YES" >> vm.kmem_size_max="2048M" >> vm.kmem_size="2048M" >> vfs.zfs.zil_disable=1 >> vfs.zfs.prefetch_disable=1 >> hw.psm.synaptics_support=1 >> legal.intel_iwn.license_ack=1 >> acpi_ibm_load="YES" >> snd_hda_load="YES" >> powerd_enable="YES" >> linux_load="YES" >> if_iwn_load="YES" >> ubtbcmfw_load="YES" >> usb2_bluetooth_load="YES" >> usb2_bluetooth_ng_load="YES" >> usb2_bluetooth_fw_load="YES" >> usb2_controller_uhci_load="YES" >> usb2_controller_ehci_load="YES" >> usb2_input_ms_load="YES" >> usb2_storage_mass_load="YES" >> usb2_image_load="YES" >> >> kldstat: >> Id Refs Address Size Name >> 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) >> 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) >> 3 2 0xffffffff80c00000 6670 opensolaris.ko >> (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 linux.ko >> (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 snd_hda.ko >> (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 sound.ko >> (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 acpi_ibm.ko >> (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 if_iwn.ko >> (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 ubtbcmfw.ko >> (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 27f88 usb.ko >> (/boot/kernel/usb.ko) >> 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko >> (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 >> usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 bbf8 >> usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 >> 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 1 >> 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko >> (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 >> usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 >> 0xffffffff80ed1000 8780 usb2_controller.ko >> (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 >> usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 >> 0xffffffff80ef4000 e128 usb2_input_ms.ko >> (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 >> usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 15c28 >> usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 >> 0xffffffff80f1a000 bd8 usb2_storage.ko (/boot/kernel/usb2_storage.ko) >> 23 1 0xffffffff80f1b000 bd0 usb2_image.ko >> (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 >> ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 0xffffffff81024000 >> 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 0xffffffff81038000 >> 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 1 0xffffffff81050000 >> 2de0a ng_btsocket.ko (/boot/kernel/ng_btsocket.ko) 28 1 >> 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) 29 >> 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 1 >> 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) >> >> I build kernel without usb*.I notice usb.ko's refs is 2, after i run >> kldunload usb.ko, it is 1.when i try to kldunload usb.ko another time,it >> return "Device busy".Any thing still request usb.ko? >> >> > > Hi, > > Could you send me your kernel config file. Maybe there is still one USB config > entry left for the old USB stack. Else the following should do the trick: > rm /boot/kernel/usb.ko > > --HPS > > This is my kernel config file. cpu HAMMER ident G8laptop options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options NFSCLIENT # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NTFS # NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options KDB # Enable kernel debugger support. options DDB # Support DDB. options KDTRACE_HOOKS options DDB_CTF options KDTRACE_FRAME options SMP # Symmetric MultiProcessor Kernel device cpufreq device coretemp device nvram device acpi device pci device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) device cd # CD device pass # Passthrough device (direct SCSI access) device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver device splash # Splash screen and screen saver support device sc device agp # support several AGP chipsets device cbb # cardbus (yenta) bridge device pccard # PC Card (16-bit) bus device cardbus # CardBus (32-bit) bus device em # Intel PRO/1000 Gigabit Ethernet Family device miibus # MII bus support device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device loop # Network loopback device random # Entropy device device ether # Ethernet support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device firmware # firmware assist module device bpf # Berkeley packet filter device usb2_storage device usb2_storage_mass I don't think any thing request usb.ko. When i unload all usb2* and netgraph.ko related modules,i find i can unload usb.ko successful. Thanks, kevin From owner-freebsd-usb@FreeBSD.ORG Mon Nov 10 06:20:02 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926641065686 for ; Mon, 10 Nov 2008 06:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7037D8FC21 for ; Mon, 10 Nov 2008 06:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA6K2BX099673 for ; Mon, 10 Nov 2008 06:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAA6K2h6099672; Mon, 10 Nov 2008 06:20:02 GMT (envelope-from gnats) Resent-Date: Mon, 10 Nov 2008 06:20:02 GMT Resent-Message-Id: <200811100620.mAA6K2h6099672@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, aGaTHoS Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0D0B106564A for ; Mon, 10 Nov 2008 06:10:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id A078C8FC17 for ; Mon, 10 Nov 2008 06:10:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA6AqQB036759 for ; Mon, 10 Nov 2008 06:10:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAA6Aqpr036758; Mon, 10 Nov 2008 06:10:52 GMT (envelope-from nobody) Message-Id: <200811100610.mAA6Aqpr036758@www.freebsd.org> Date: Mon, 10 Nov 2008 06:10:52 GMT From: aGaTHoS To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/128745: zyd teoretically supported usb device makes kernel panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 06:20:02 -0000 >Number: 128745 >Category: usb >Synopsis: zyd teoretically supported usb device makes kernel panic >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 10 06:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: aGaTHoS >Release: FreeBSD 7.1-PRERELEASE >Organization: >Environment: FreeBSD ares.fobos.org 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #6: Sun Nov 2 00:12:52 CET 2008 root@ares.fobos.org:/usr/obj/usr/src/sys/ARES amd64 >Description: Usb zyd device with vendor and product id's: 0x0ace, 0x1215, causes kernel panic inmediately when plugged. >How-To-Repeat: 1. plug zyd device with vendor and product id's 0x0ace, 0x1215 2. wait 2 or 3 seconds :) [root@ares ~]# kgdb /usr/obj/usr/src/sys/ARES/kernel.debug /var/crash/vmcore.1 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: zyd0: zyd_read sleep timeout ehci_check_intr: sqtdstart=NULL Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x38 fault code = supervisor read data, page not present instruction pointer = 0x8:0xffffffff802273df stack pointer = 0x10:0xffffffffacd82be0 frame pointer = 0x10:0xffffffffacdb1f80 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 28 (usbtask-hc) trap number = 12 panic: page fault cpuid = 1 Uptime: 18m29s ehci_check_intr: sqtdstart=NULL ehci_check_intr: sqtdstart=NULL ehci_check_intr: sqtdstart=NULL ehci_check_intr: sqtdstart=NULL ehci_check_intr: sqtdstart=NULL ehci_check_intr: sqtdstart=NULL Physical memory: 2037 MB Dumping 165 MB: 150 134 118 102 86 70 54 38 22 6 Reading symbols from /boot/kernel/zfs.ko...Reading symbols from /boot/kernel/zfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/zfs.ko Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols from /boot/kernel/opensolaris.ko. symbols...done. done. Loaded symbols for /boot/kernel/opensolaris.ko Reading symbols from /boot/kernel/if_zyd.ko...Reading symbols from /boot/kernel/if_zyd.ko.symbols... done. done. Loaded symbols for /boot/kernel/if_zyd.ko Reading symbols from /boot/kernel/wlan_amrr.ko...Reading symbols from /boot/kernel/wlan_amrr.ko.symb ols...done. done. Loaded symbols for /boot/kernel/wlan_amrr.ko Reading symbols from /boot/kernel/wlan.ko...Reading symbols from /boot/kernel/wlan.ko.symbols...done >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Nov 10 07:50:36 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 383721065673; Mon, 10 Nov 2008 07:50:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 5608A8FC18; Mon, 10 Nov 2008 07:50:34 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=bdeZpJpNa0wA:10 a=SER6hIBTabIA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=XF3acwq6FAg48xs-ISIA:9 a=iZwxDU77xk6EjGbTrmQA:7 a=3bYFV93LAggYKNpXYJ_vinOs_b4A:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 405265457; Mon, 10 Nov 2008 08:50:32 +0100 From: Hans Petter Selasky To: kevin Date: Mon, 10 Nov 2008 08:52:42 +0100 User-Agent: KMail/1.9.7 References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <200811091016.16934.hselasky@c2i.net> <4917A695.3030903@163.com> In-Reply-To: <4917A695.3030903@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811100852.43003.hselasky@c2i.net> Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 07:50:36 -0000 On Monday 10 November 2008, kevin wrote: > Hans Petter Selasky wrote: > > On Sunday 09 November 2008, kevin wrote: > >> It's a bug? > >> /boot/loader.conf: > >> zfs_load="YES" > >> vm.kmem_size_max="2048M" > >> vm.kmem_size="2048M" > >> vfs.zfs.zil_disable=1 > >> vfs.zfs.prefetch_disable=1 > >> hw.psm.synaptics_support=1 > >> legal.intel_iwn.license_ack=1 > >> acpi_ibm_load="YES" > >> snd_hda_load="YES" > >> powerd_enable="YES" > >> linux_load="YES" > >> if_iwn_load="YES" > >> ubtbcmfw_load="YES" > >> usb2_bluetooth_load="YES" > >> usb2_bluetooth_ng_load="YES" > >> usb2_bluetooth_fw_load="YES" > >> usb2_controller_uhci_load="YES" > >> usb2_controller_ehci_load="YES" > >> usb2_input_ms_load="YES" > >> usb2_storage_mass_load="YES" > >> usb2_image_load="YES" > >> > >> kldstat: > >> Id Refs Address Size Name > >> 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) > >> 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) > >> 3 2 0xffffffff80c00000 6670 opensolaris.ko > >> (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 > >> linux.ko (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 > >> snd_hda.ko (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 > >> sound.ko (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 > >> acpi_ibm.ko (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 > >> if_iwn.ko (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 > >> ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 27f88 > >> usb.ko (/boot/kernel/usb.ko) > >> 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko > >> (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 > >> usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 bbf8 > >> usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 > >> 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 > >> 1 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko > >> (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 > >> usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 > >> 0xffffffff80ed1000 8780 usb2_controller.ko > >> (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 > >> usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 > >> 0xffffffff80ef4000 e128 usb2_input_ms.ko > >> (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 > >> usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 > >> 15c28 usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 > >> 0xffffffff80f1a000 bd8 usb2_storage.ko > >> (/boot/kernel/usb2_storage.ko) 23 1 0xffffffff80f1b000 bd0 > >> usb2_image.ko > >> (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 > >> ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 > >> 0xffffffff81024000 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 > >> 0xffffffff81038000 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 > >> 1 0xffffffff81050000 2de0a ng_btsocket.ko > >> (/boot/kernel/ng_btsocket.ko) 28 1 > >> 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) 29 > >> 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 1 > >> 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) > >> > >> I build kernel without usb*.I notice usb.ko's refs is 2, after i run > >> kldunload usb.ko, it is 1.when i try to kldunload usb.ko another time,it > >> return "Device busy".Any thing still request usb.ko? > > > > Hi, > > > > Could you send me your kernel config file. Maybe there is still one USB > > config entry left for the old USB stack. Else the following should do the > > trick: rm /boot/kernel/usb.ko > > > > --HPS > > This is my kernel config file. > > cpu HAMMER > ident G8laptop > options SCHED_ULE # ULE scheduler > options PREEMPTION # Enable kernel thread preemption > options INET # InterNETworking > options INET6 # IPv6 communications protocols > options SCTP # Stream Control Transmission Protocol > options FFS # Berkeley Fast Filesystem > options SOFTUPDATES # Enable FFS soft updates support > options UFS_ACL # Support for access control lists > options UFS_DIRHASH # Improve performance on big directories > options UFS_GJOURNAL # Enable gjournal-based UFS journaling > options NFSCLIENT # Network Filesystem Client > options NFSLOCKD # Network Lock Manager > options NTFS # NT File System > options MSDOSFS # MSDOS Filesystem > options CD9660 # ISO 9660 Filesystem > options PROCFS # Process filesystem (requires PSEUDOFS) > options PSEUDOFS # Pseudo-filesystem framework > options GEOM_PART_GPT # GUID Partition Tables. > options GEOM_LABEL # Provides labelization > options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] > options COMPAT_IA32 # Compatible with i386 binaries > options COMPAT_FREEBSD4 # Compatible with FreeBSD4 > options COMPAT_FREEBSD5 # Compatible with FreeBSD5 > options COMPAT_FREEBSD6 # Compatible with FreeBSD6 > options COMPAT_FREEBSD7 # Compatible with FreeBSD7 > options KTRACE # ktrace(1) support > options STACK # stack(9) support > options SYSVSHM # SYSV-style shared memory > options SYSVMSG # SYSV-style message queues > options SYSVSEM # SYSV-style semaphores > options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions > options KBD_INSTALL_CDEV # install a CDEV entry in /dev > options STOP_NMI # Stop CPUS using NMI instead of IPI > options AUDIT # Security event auditing > options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) > options KDB # Enable kernel debugger support. > options DDB # Support DDB. > options KDTRACE_HOOKS > options DDB_CTF > options KDTRACE_FRAME > options SMP # Symmetric MultiProcessor Kernel > device cpufreq > device coretemp > device nvram > device acpi > device pci > device ata > device atadisk # ATA disk drives > device atapicd # ATAPI CDROM drives > options ATA_STATIC_ID # Static device numbering > device scbus # SCSI bus (required for SCSI) > device da # Direct Access (disks) > device cd # CD > device pass # Passthrough device (direct SCSI access) > device atkbdc # AT keyboard controller > device atkbd # AT keyboard > device psm # PS/2 mouse > device kbdmux # keyboard multiplexer > device vga # VGA video card driver > device splash # Splash screen and screen saver support > device sc > device agp # support several AGP chipsets > device cbb # cardbus (yenta) bridge > device pccard # PC Card (16-bit) bus > device cardbus # CardBus (32-bit) bus > device em # Intel PRO/1000 Gigabit Ethernet Family > device miibus # MII bus support > device wlan # 802.11 support > options IEEE80211_DEBUG # enable debug msgs > options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's > device wlan_wep # 802.11 WEP support > device wlan_ccmp # 802.11 CCMP support > device wlan_tkip # 802.11 TKIP support > device wlan_amrr # AMRR transmit rate control algorithm > device loop # Network loopback > device random # Entropy device > device ether # Ethernet support > device tun # Packet tunnel. > device pty # BSD-style compatibility pseudo ttys > device md # Memory "disks" > device gif # IPv6 and IPv4 tunneling > device faith # IPv6-to-IPv4 relaying (translation) > device firmware # firmware assist module > device bpf # Berkeley packet filter > device usb2_storage > device usb2_storage_mass > > I don't think any thing request usb.ko. When i unload all usb2* and > netgraph.ko related modules,i find i can unload usb.ko successful. > Try adding "device usb2_controller", "usb2_controller_ehci", and "usb2_controller_ohci" to the kernel config. Or "rm /boot/kernel/usb.ko" --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Nov 10 11:06:59 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE0711065686 for ; Mon, 10 Nov 2008 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C4CC18FC26 for ; Mon, 10 Nov 2008 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAB6xTa049894 for ; Mon, 10 Nov 2008 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAAB6xkr049890 for freebsd-usb@FreeBSD.org; Mon, 10 Nov 2008 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Nov 2008 11:06:59 GMT Message-Id: <200811101106.mAAB6xkr049890@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 11:07:00 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/128745 usb zyd teoretically supported usb device makes kernel pan o usb/128485 usb Nokia N80 modem support o usb/128425 usb Cannot Connect Maxtor Onetouch 4 USB drive f usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/128324 usb [uplcom] remove baud rate restriction for PL2303X chip p usb/128115 usb [uplcom] [patch] USB-RS232 circuets on chip PL2303HX n o usb/128093 usb [ohci] panic in ohci_softintr: OXFER(xfer)->xfer.pipe o usb/127980 usb [QUIRK] Fix Samsung YP U2 MP3 player on 7.x and 8.x o usb/127926 usb [boot] USB Timeout during bootup o usb/127549 usb [umass] [patch] Meizu MiniPlayer M6 (SL) requires some f usb/127516 usb after csup src-all RELENG_7 s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127423 usb [boot] BTX halted on Gigabyte GA-MA69VM-S2 / AMD Sempr o usb/127342 usb [boot] cannot enable usb keyboard and mouse support in o kern/127222 usb [ohci]: Regression in 7.0 usb storage generic driver o usb/126884 usb [patch] Bug in buffer handling in ugen.c f kern/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125631 usb [usb][ums] kernel panic during bootup while 'Logitech o usb/125510 usb repeated plug and unplug of USB mass storage devices l o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125238 usb Habu Mouse turns off in X o usb/125088 usb Touchpad not detected on Adesso AKB-430UG USB kbd/pad o usb/125072 usb [uplcom] [patch] add Mobile Action MA-620 Infrared Ada o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124604 usb Wireless Mouse doesn't work o usb/123969 usb Supermicro H8SMi-2 usb problem o usb/123714 usb Panic when hald-storage-probe runs with umass device i o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb Panic on USB device insertion when usb loaded as a mod o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123352 usb Add Option GTMAX3.6/7.2 and Quallcomm MMC module devic o usb/123351 usb Add Reiner SCT cyberJack, Omnikey [26]020, Fujitsu Sie p usb/123211 usb [udav] if_udav driver doesn't support Davicom 9601 USB p usb/123148 usb [uscanner] [patch] Epson DX8400/50 needs uscanner to s o usb/122992 usb MotoROKR Z6 Phone not recognised by umass as USB disk. o usb/122956 usb Support for Novatel Wireless XU870 3G Card o usb/122936 usb [ucom][ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o usb/122819 usb Patch to provide dynamic additions to the usb quirks t o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US p usb/122610 usb Add Verizon v740 support to ubsa(4) o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122025 usb [patch] uscanner does not attach to Epson RX620 printe o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/121275 usb [boot] FreeBSD fails to boot with usb legacy support e o usb/121232 usb USB CardBus card removal causes reboot sometimes o usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/120786 usb Kernel panic when forced umount of a dettached USB Har o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/120017 usb [ehci] [patch] CS5536 (AMD Geode) USB 2.0 quirk o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119509 usb USB flaky on Dell Optiplex 755 o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117546 usb [uftdi] [patch] Add MaxStream ZigBee product ID to uft o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117185 usb [umodem] [patch] Add support for UNION interface descr o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114068 usb [umass] [patch] Problems with connection of the umass o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af a usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID s usb/110991 usb [usbdevs] [patch] QUIRK: Super Top IDE DEVICE (depends o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC o usb/109397 usb [panic] on boot from USB flash o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/107924 usb [patch] usbd(8) does not call detach o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107388 usb [patch] [request] new driver: add utoppy device from N o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze s usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/105065 usb [ata] SATA - USB Bridge o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/103418 usb usbhidctl(1): [patch] [request] usbhidctl: add ability o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not f usb/102096 usb [patch] usbd(8) does not handle multiple devices in on o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91629 usb usbd_abort_pipe() may result in infinite loop o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/87224 usb Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe f usb/83677 usb [usb] [request] usb controller often not detected (Sun o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80829 usb [modules] [panic] possible panic when loading USB-modu s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/79722 usb [ehci] wrong alignments in ehci.h a usb/79656 usb [ehci] RHSC interrupts lost o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/76732 usb Mouse problems with USB KVM Switch o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75797 usb [sound] 5.3-STABLE(2005 1/4) detect USB headset, But c o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/74771 usb [umass] [hang] mounting write-protected umass device a s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/73307 usb [panic] Kernel panics on USB disconnect s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/71455 usb [umass] Slow USB umass performance of 5.3 o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans o bin/57255 usb usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 288 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Nov 10 20:10:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A3631065674 for ; Mon, 10 Nov 2008 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5554A8FC1B for ; Mon, 10 Nov 2008 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAKA18j054466 for ; Mon, 10 Nov 2008 20:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAAKA1pZ054465; Mon, 10 Nov 2008 20:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 10 Nov 2008 20:10:01 GMT Resent-Message-Id: <200811102010.mAAKA1pZ054465@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Arjan de Vet Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E369F1065670 for ; Mon, 10 Nov 2008 20:04:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id D04928FC13 for ; Mon, 10 Nov 2008 20:04:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAK4AIW056159 for ; Mon, 10 Nov 2008 20:04:10 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAAK4ANn056158; Mon, 10 Nov 2008 20:04:10 GMT (envelope-from nobody) Message-Id: <200811102004.mAAK4ANn056158@www.freebsd.org> Date: Mon, 10 Nov 2008 20:04:10 GMT From: Arjan de Vet To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/128760: [ums] patch for Microsoft Comfort Optical Mouse 3000 (model 1043) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 20:10:03 -0000 >Number: 128760 >Category: usb >Synopsis: [ums] patch for Microsoft Comfort Optical Mouse 3000 (model 1043) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Nov 10 20:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Arjan de Vet >Release: FreeBSD 7.0-RELEASE-p5 >Organization: >Environment: FreeBSD adv.devet.org 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #1: Mon Nov 10 20:17:26 CET 2008 root@adv.devet.org:/usr/obj/usr/src/sys/ADV i386 >Description: The Microsoft Comfort Optical Mouse 3000 (model 1043), a wired USB mouse, does not work by default. Its characteristics are: Microsoft Optical Mouse with Tilt Wheel(0x00d1), Microsoft(0x045e), rev 1.20 >How-To-Repeat: Plug in a mouse of the type mentioned. >Fix: The attached patch (relative to RELENG_7_0) makes the mouse working, except for left/right tilt-wheel and 4th button which might need more code. Patch attached with submission follows: Index: usb_quirks.c =================================================================== RCS file: /home/freebsd/CVS/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.63.4.1 diff -u -r1.63.4.1 usb_quirks.c --- usb_quirks.c 7 Jan 2008 23:12:45 -0000 1.63.4.1 +++ usb_quirks.c 10 Nov 2008 18:57:34 -0000 @@ -88,6 +88,8 @@ ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }}, { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_WLNOTEBOOK2, ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }}, + { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_COMFORT3000, + ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }}, { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_WLINTELLIMOUSE, ANY, { UQ_MS_LEADING_BYTE }}, Index: usbdevs =================================================================== RCS file: /home/freebsd/CVS/src/sys/dev/usb/usbdevs,v retrieving revision 1.328.2.1.2.1 diff -u -r1.328.2.1.2.1 usbdevs --- usbdevs 7 Jan 2008 23:12:45 -0000 1.328.2.1.2.1 +++ usbdevs 10 Nov 2008 19:54:43 -0000 @@ -1640,6 +1640,7 @@ product MICROSOFT WLINTELLIMOUSE 0x008c Wireless Optical IntelliMouse product MICROSOFT WLNOTEBOOK 0x00b9 Wireless Optical Mouse (Model 1023) product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) +product MICROSOFT COMFORT3000 0x00d1 Comfort Optical Mouse 3000 (Model 1043) product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 01:37:29 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D451F1065680; Tue, 11 Nov 2008 01:37:29 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AF6578FC1E; Tue, 11 Nov 2008 01:37:29 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from freefall.freebsd.org (weongyo@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB1bTgp003947; Tue, 11 Nov 2008 01:37:29 GMT (envelope-from weongyo@freefall.freebsd.org) Received: (from weongyo@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAB1bTdM003943; Tue, 11 Nov 2008 01:37:29 GMT (envelope-from weongyo) Date: Tue, 11 Nov 2008 01:37:29 GMT Message-Id: <200811110137.mAB1bTdM003943@freefall.freebsd.org> To: weongyo@FreeBSD.org, freebsd-usb@FreeBSD.org, weongyo@FreeBSD.org From: weongyo@FreeBSD.org Cc: Subject: Re: usb/128745: zyd teoretically supported usb device makes kernel panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 01:37:29 -0000 Synopsis: zyd teoretically supported usb device makes kernel panic Responsible-Changed-From-To: freebsd-usb->weongyo Responsible-Changed-By: weongyo Responsible-Changed-When: Tue Nov 11 01:36:06 UTC 2008 Responsible-Changed-Why: Promised to him I'll look at this PR. http://www.freebsd.org/cgi/query-pr.cgi?pr=128745 From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 02:43:18 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31866106568A; Tue, 11 Nov 2008 02:43:18 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from m12-16.163.com (m12-16.163.com [220.181.12.16]) by mx1.freebsd.org (Postfix) with SMTP id D96E18FC12; Tue, 11 Nov 2008 02:43:16 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from [127.0.0.1] (unknown [60.191.86.3]) by smtp12 (Coremail) with SMTP id EMCowLBLFBdA8RhJrOJ6GQ--.44282S2; Tue, 11 Nov 2008 10:43:12 +0800 (CST) Message-ID: <4918F13F.1090302@163.com> Date: Tue, 11 Nov 2008 10:43:11 +0800 From: kevin User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Hans Petter Selasky References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <200811091016.16934.hselasky@c2i.net> <4917A695.3030903@163.com> <200811100852.43003.hselasky@c2i.net> In-Reply-To: <200811100852.43003.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Coremail-Antispam: 1Uf129KBjvJXoW3WF4ruryrXFW5GFWfuryDJrb_yoW3tFW3pr yDGanrJF48KF1Yvw1jqrn5CFZ5Ka10ya1fGa4kG34rKr1jga45JasFyFy3uwnIvrZ8ur17 XFWDA3yIqw15JaUanT9S1TB71UUUUUUv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UU U847k0a2IF6r1UM7kC6x804xWl14x267AKxVWUJVW8JwAFxVCF77xC6IxKo4kEV4yl1I0E scIYIxCEI4klw4CSwwAFIxvE14AKwVWUJVWUGwAawVAYYI1S6c8GOVWUur45Jrylnx0Ec2 IEnICE548m6r1DJrWUZwAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6x AIw28IcVAK0I8IjxAxMx02cVAKzwCY0x0Ix7I2Y4AK6F4j6FyUMxCjnVAqn7xvrwC2zVAF 1VAY17CE14v26r1Y6r17YxBIdaVFxhVjvjDU0xZFpf9x0zEVyI5UUUUU= Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 02:43:18 -0000 Hans Petter Selasky wrote: > On Monday 10 November 2008, kevin wrote: > >> Hans Petter Selasky wrote: >> >>> On Sunday 09 November 2008, kevin wrote: >>> >>>> It's a bug? >>>> /boot/loader.conf: >>>> zfs_load="YES" >>>> vm.kmem_size_max="2048M" >>>> vm.kmem_size="2048M" >>>> vfs.zfs.zil_disable=1 >>>> vfs.zfs.prefetch_disable=1 >>>> hw.psm.synaptics_support=1 >>>> legal.intel_iwn.license_ack=1 >>>> acpi_ibm_load="YES" >>>> snd_hda_load="YES" >>>> powerd_enable="YES" >>>> linux_load="YES" >>>> if_iwn_load="YES" >>>> ubtbcmfw_load="YES" >>>> usb2_bluetooth_load="YES" >>>> usb2_bluetooth_ng_load="YES" >>>> usb2_bluetooth_fw_load="YES" >>>> usb2_controller_uhci_load="YES" >>>> usb2_controller_ehci_load="YES" >>>> usb2_input_ms_load="YES" >>>> usb2_storage_mass_load="YES" >>>> usb2_image_load="YES" >>>> >>>> kldstat: >>>> Id Refs Address Size Name >>>> 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) >>>> 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) >>>> 3 2 0xffffffff80c00000 6670 opensolaris.ko >>>> (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 >>>> linux.ko (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 >>>> snd_hda.ko (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 >>>> sound.ko (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 >>>> acpi_ibm.ko (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 >>>> if_iwn.ko (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 >>>> ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 27f88 >>>> usb.ko (/boot/kernel/usb.ko) >>>> 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko >>>> (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 >>>> usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 bbf8 >>>> usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 >>>> 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 >>>> 1 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko >>>> (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 >>>> usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 >>>> 0xffffffff80ed1000 8780 usb2_controller.ko >>>> (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 >>>> usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 >>>> 0xffffffff80ef4000 e128 usb2_input_ms.ko >>>> (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 >>>> usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 >>>> 15c28 usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 >>>> 0xffffffff80f1a000 bd8 usb2_storage.ko >>>> (/boot/kernel/usb2_storage.ko) 23 1 0xffffffff80f1b000 bd0 >>>> usb2_image.ko >>>> (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 >>>> ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 >>>> 0xffffffff81024000 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 >>>> 0xffffffff81038000 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 >>>> 1 0xffffffff81050000 2de0a ng_btsocket.ko >>>> (/boot/kernel/ng_btsocket.ko) 28 1 >>>> 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) 29 >>>> 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 1 >>>> 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) >>>> >>>> I build kernel without usb*.I notice usb.ko's refs is 2, after i run >>>> kldunload usb.ko, it is 1.when i try to kldunload usb.ko another time,it >>>> return "Device busy".Any thing still request usb.ko? >>>> >>> Hi, >>> >>> Could you send me your kernel config file. Maybe there is still one USB >>> config entry left for the old USB stack. Else the following should do the >>> trick: rm /boot/kernel/usb.ko >>> >>> --HPS >>> >> This is my kernel config file. >> >> cpu HAMMER >> ident G8laptop >> options SCHED_ULE # ULE scheduler >> options PREEMPTION # Enable kernel thread preemption >> options INET # InterNETworking >> options INET6 # IPv6 communications protocols >> options SCTP # Stream Control Transmission Protocol >> options FFS # Berkeley Fast Filesystem >> options SOFTUPDATES # Enable FFS soft updates support >> options UFS_ACL # Support for access control lists >> options UFS_DIRHASH # Improve performance on big directories >> options UFS_GJOURNAL # Enable gjournal-based UFS journaling >> options NFSCLIENT # Network Filesystem Client >> options NFSLOCKD # Network Lock Manager >> options NTFS # NT File System >> options MSDOSFS # MSDOS Filesystem >> options CD9660 # ISO 9660 Filesystem >> options PROCFS # Process filesystem (requires PSEUDOFS) >> options PSEUDOFS # Pseudo-filesystem framework >> options GEOM_PART_GPT # GUID Partition Tables. >> options GEOM_LABEL # Provides labelization >> options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] >> options COMPAT_IA32 # Compatible with i386 binaries >> options COMPAT_FREEBSD4 # Compatible with FreeBSD4 >> options COMPAT_FREEBSD5 # Compatible with FreeBSD5 >> options COMPAT_FREEBSD6 # Compatible with FreeBSD6 >> options COMPAT_FREEBSD7 # Compatible with FreeBSD7 >> options KTRACE # ktrace(1) support >> options STACK # stack(9) support >> options SYSVSHM # SYSV-style shared memory >> options SYSVMSG # SYSV-style message queues >> options SYSVSEM # SYSV-style semaphores >> options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions >> options KBD_INSTALL_CDEV # install a CDEV entry in /dev >> options STOP_NMI # Stop CPUS using NMI instead of IPI >> options AUDIT # Security event auditing >> options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) >> options KDB # Enable kernel debugger support. >> options DDB # Support DDB. >> options KDTRACE_HOOKS >> options DDB_CTF >> options KDTRACE_FRAME >> options SMP # Symmetric MultiProcessor Kernel >> device cpufreq >> device coretemp >> device nvram >> device acpi >> device pci >> device ata >> device atadisk # ATA disk drives >> device atapicd # ATAPI CDROM drives >> options ATA_STATIC_ID # Static device numbering >> device scbus # SCSI bus (required for SCSI) >> device da # Direct Access (disks) >> device cd # CD >> device pass # Passthrough device (direct SCSI access) >> device atkbdc # AT keyboard controller >> device atkbd # AT keyboard >> device psm # PS/2 mouse >> device kbdmux # keyboard multiplexer >> device vga # VGA video card driver >> device splash # Splash screen and screen saver support >> device sc >> device agp # support several AGP chipsets >> device cbb # cardbus (yenta) bridge >> device pccard # PC Card (16-bit) bus >> device cardbus # CardBus (32-bit) bus >> device em # Intel PRO/1000 Gigabit Ethernet Family >> device miibus # MII bus support >> device wlan # 802.11 support >> options IEEE80211_DEBUG # enable debug msgs >> options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's >> device wlan_wep # 802.11 WEP support >> device wlan_ccmp # 802.11 CCMP support >> device wlan_tkip # 802.11 TKIP support >> device wlan_amrr # AMRR transmit rate control algorithm >> device loop # Network loopback >> device random # Entropy device >> device ether # Ethernet support >> device tun # Packet tunnel. >> device pty # BSD-style compatibility pseudo ttys >> device md # Memory "disks" >> device gif # IPv6 and IPv4 tunneling >> device faith # IPv6-to-IPv4 relaying (translation) >> device firmware # firmware assist module >> device bpf # Berkeley packet filter >> device usb2_storage >> device usb2_storage_mass >> >> I don't think any thing request usb.ko. When i unload all usb2* and >> netgraph.ko related modules,i find i can unload usb.ko successful. >> >> > > Try adding "device usb2_controller", "usb2_controller_ehci", > and "usb2_controller_ohci" to the kernel config. > > I build kernel with "device usb2_controller", "usb2_controller_ehci", and "usb2_controller_ohci".but it works nothing. usb.ko was still loaded.,and usb2_controller* seems not be compiled into kernel. usb2_controller_uhci_load="YES",usb2_controller_ehci_load="YES" still load model to kernel. > Or "rm /boot/kernel/usb.ko" > > > Thanks, kevin From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 13:00:05 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2C3A106567C; Tue, 11 Nov 2008 13:00:05 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4658FC23; Tue, 11 Nov 2008 13:00:04 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA26701; Tue, 11 Nov 2008 15:00:01 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491981D0.7060100@icyb.net.ua> Date: Tue, 11 Nov 2008 15:00:00 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: FreeBSD Stable , freebsd-usb@freebsd.org, freebsd-hackers@freebsd.org References: <4912E462.4090608@icyb.net.ua> In-Reply-To: <4912E462.4090608@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 13:00:05 -0000 on 06/11/2008 14:34 Andriy Gapon said the following: > I have a quite strange problem. > This is with 7-BETA amd64. > All of USB is out of kernel and is loaded via modules. > BIOS has "Legacy USB" enabled. > I have only a USB keyboard, no PS/2 port. > > The keyboard works file in BIOS and for selecting boot device in boot0 > menu. It also works in loader menu. If in the menu I select to go to > loader prompt then it works for about 5 seconds and then "dies" - no > reaction to key presses, no led change, nothing. > I haven't actually verified if the keyboard would still work if I stayed > in loader menu for longer than ~10 seconds. > > This doesn't happen if USB is built into kernel. > > Weird... I did more experimentation and the behavior seems to be quite random - sometimes keyboard works ok for long time in all places, sometimes it stops working after some period of time, sometimes it doesn't work from the start and couple of times I experienced boot process going astray. Not sure what stage that was, there were endless messages spewed on the screen very fast, I couldn't read them. This leads me to the following "crazy" question - is it possible that our boot chain corrupts some vital BIOS memory? I think loader would be a primary suspect. I am not sure of anything, but a wild guess is that RAM where BIOS stores some USB-related stuff gets corrupted. Maybe it's overwritten when kernel and modules are loaded... -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 13:14:08 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5995A106564A; Tue, 11 Nov 2008 13:14:08 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3D38F8FC25; Tue, 11 Nov 2008 13:14:06 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA27811; Tue, 11 Nov 2008 15:14:03 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4919851B.7050800@icyb.net.ua> Date: Tue, 11 Nov 2008 15:14:03 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Volker References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> In-Reply-To: <491586B9.2020303@vwsoft.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 13:14:08 -0000 on 08/11/2008 14:31 Volker said the following: > Andriy, > > On 12/23/-58 20:59, Andriy Gapon wrote: >> I have a quite strange problem. >> This is with 7-BETA amd64. > > Did it work with earlier versions? Can't say, this is a new machine, FreeBSD took its virginity :-) >> All of USB is out of kernel and is loaded via modules. >> BIOS has "Legacy USB" enabled. >> I have only a USB keyboard, no PS/2 port. > > Can you check BIOS settings for EHCI handover? No such settings. > If the BIOS does not have handover enabled, it may disable legacy > support after a timeout, which is often bad. IMO this is the same with > booting off USB drives but every BIOS handles that different. This doesn't seem to be the case. The behavior is quite random, sometimes I can work at loader prompt for may minutes, sometimes keyboard is dead after a few seconds. Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but I am not sure if this matters. My guess is that Legacy support should work until OS explicitly takes over by using special procedure (this should be done for UHCI as well). BTW, it seems that our UHCI take-over code is far more simple than what MS described here: http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC Anyway, this happens after loader is done. >> The keyboard works file in BIOS and for selecting boot device in boot0 >> menu. It also works in loader menu. If in the menu I select to go to >> loader prompt then it works for about 5 seconds and then "dies" - no >> reaction to key presses, no led change, nothing. >> I haven't actually verified if the keyboard would still work if I stayed >> in loader menu for longer than ~10 seconds. >> >> This doesn't happen if USB is built into kernel. > > That sound strange. I have no idea why that might work (or I'm totally > wrong with my handover theory). I was incorrect about the above, I have already seen it happening both ways. >> Weird... > > Yes, sounds like or it's probably easily explainable ;) -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 15:34:28 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4622E106567F; Tue, 11 Nov 2008 15:34:28 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 645E08FC2A; Tue, 11 Nov 2008 15:34:27 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=bdeZpJpNa0wA:10 a=SER6hIBTabIA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=BzFBn3pzvcrwpwruglkA:9 a=c56OXe6Is6YdSzWUJesA:7 a=L0woqm1i2wUS3-NCfUa-rP8iQ9sA:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1150932846; Tue, 11 Nov 2008 16:34:25 +0100 From: Hans Petter Selasky To: kevin Date: Tue, 11 Nov 2008 16:36:25 +0100 User-Agent: KMail/1.9.7 References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <200811100852.43003.hselasky@c2i.net> <4918F13F.1090302@163.com> In-Reply-To: <4918F13F.1090302@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811111636.26174.hselasky@c2i.net> Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 15:34:28 -0000 On Tuesday 11 November 2008, kevin wrote: > Hans Petter Selasky wrote: > > On Monday 10 November 2008, kevin wrote: > >> Hans Petter Selasky wrote: > >>> On Sunday 09 November 2008, kevin wrote: > >>>> It's a bug? > >>>> /boot/loader.conf: > >>>> zfs_load="YES" > >>>> vm.kmem_size_max="2048M" > >>>> vm.kmem_size="2048M" > >>>> vfs.zfs.zil_disable=1 > >>>> vfs.zfs.prefetch_disable=1 > >>>> hw.psm.synaptics_support=1 > >>>> legal.intel_iwn.license_ack=1 > >>>> acpi_ibm_load="YES" > >>>> snd_hda_load="YES" > >>>> powerd_enable="YES" > >>>> linux_load="YES" > >>>> if_iwn_load="YES" > >>>> ubtbcmfw_load="YES" > >>>> usb2_bluetooth_load="YES" > >>>> usb2_bluetooth_ng_load="YES" > >>>> usb2_bluetooth_fw_load="YES" > >>>> usb2_controller_uhci_load="YES" > >>>> usb2_controller_ehci_load="YES" > >>>> usb2_input_ms_load="YES" > >>>> usb2_storage_mass_load="YES" > >>>> usb2_image_load="YES" > >>>> > >>>> kldstat: > >>>> Id Refs Address Size Name > >>>> 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) > >>>> 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) > >>>> 3 2 0xffffffff80c00000 6670 opensolaris.ko > >>>> (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 > >>>> linux.ko (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 > >>>> snd_hda.ko (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 > >>>> sound.ko (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 > >>>> acpi_ibm.ko (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 > >>>> if_iwn.ko (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 > >>>> ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 > >>>> 27f88 usb.ko (/boot/kernel/usb.ko) > >>>> 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko > >>>> (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 > >>>> usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 > >>>> bbf8 usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 > >>>> 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 > >>>> 1 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko > >>>> (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 > >>>> usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 > >>>> 0xffffffff80ed1000 8780 usb2_controller.ko > >>>> (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 > >>>> usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 > >>>> 0xffffffff80ef4000 e128 usb2_input_ms.ko > >>>> (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 > >>>> usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 > >>>> 15c28 usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 > >>>> 0xffffffff80f1a000 bd8 usb2_storage.ko > >>>> (/boot/kernel/usb2_storage.ko) 23 1 0xffffffff80f1b000 bd0 > >>>> usb2_image.ko > >>>> (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 > >>>> ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 > >>>> 0xffffffff81024000 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 > >>>> 0xffffffff81038000 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 > >>>> 1 0xffffffff81050000 2de0a ng_btsocket.ko > >>>> (/boot/kernel/ng_btsocket.ko) 28 1 > >>>> 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) > >>>> 29 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 > >>>> 1 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) > >>>> > >>>> I build kernel without usb*.I notice usb.ko's refs is 2, after i run > >>>> kldunload usb.ko, it is 1.when i try to kldunload usb.ko another > >>>> time,it return "Device busy".Any thing still request usb.ko? > >>> > >>> Hi, > >>> > >>> Could you send me your kernel config file. Maybe there is still one USB > >>> config entry left for the old USB stack. Else the following should do > >>> the trick: rm /boot/kernel/usb.ko > >>> > >>> --HPS > >> > >> This is my kernel config file. > >> > >> cpu HAMMER > >> ident G8laptop > >> options SCHED_ULE # ULE scheduler > >> options PREEMPTION # Enable kernel thread preemption > >> options INET # InterNETworking > >> options INET6 # IPv6 communications protocols > >> options SCTP # Stream Control Transmission Protocol > >> options FFS # Berkeley Fast Filesystem > >> options SOFTUPDATES # Enable FFS soft updates support > >> options UFS_ACL # Support for access control lists > >> options UFS_DIRHASH # Improve performance on big directories > >> options UFS_GJOURNAL # Enable gjournal-based UFS journaling > >> options NFSCLIENT # Network Filesystem Client > >> options NFSLOCKD # Network Lock Manager > >> options NTFS # NT File System > >> options MSDOSFS # MSDOS Filesystem > >> options CD9660 # ISO 9660 Filesystem > >> options PROCFS # Process filesystem (requires PSEUDOFS) > >> options PSEUDOFS # Pseudo-filesystem framework > >> options GEOM_PART_GPT # GUID Partition Tables. > >> options GEOM_LABEL # Provides labelization > >> options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] > >> options COMPAT_IA32 # Compatible with i386 binaries > >> options COMPAT_FREEBSD4 # Compatible with FreeBSD4 > >> options COMPAT_FREEBSD5 # Compatible with FreeBSD5 > >> options COMPAT_FREEBSD6 # Compatible with FreeBSD6 > >> options COMPAT_FREEBSD7 # Compatible with FreeBSD7 > >> options KTRACE # ktrace(1) support > >> options STACK # stack(9) support > >> options SYSVSHM # SYSV-style shared memory > >> options SYSVMSG # SYSV-style message queues > >> options SYSVSEM # SYSV-style semaphores > >> options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time > >> extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev > >> options STOP_NMI # Stop CPUS using NMI instead of IPI > >> options AUDIT # Security event auditing > >> options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) > >> options KDB # Enable kernel debugger support. > >> options DDB # Support DDB. > >> options KDTRACE_HOOKS > >> options DDB_CTF > >> options KDTRACE_FRAME > >> options SMP # Symmetric MultiProcessor Kernel > >> device cpufreq > >> device coretemp > >> device nvram > >> device acpi > >> device pci > >> device ata > >> device atadisk # ATA disk drives > >> device atapicd # ATAPI CDROM drives > >> options ATA_STATIC_ID # Static device numbering > >> device scbus # SCSI bus (required for SCSI) > >> device da # Direct Access (disks) > >> device cd # CD > >> device pass # Passthrough device (direct SCSI access) > >> device atkbdc # AT keyboard controller > >> device atkbd # AT keyboard > >> device psm # PS/2 mouse > >> device kbdmux # keyboard multiplexer > >> device vga # VGA video card driver > >> device splash # Splash screen and screen saver support > >> device sc > >> device agp # support several AGP chipsets > >> device cbb # cardbus (yenta) bridge > >> device pccard # PC Card (16-bit) bus > >> device cardbus # CardBus (32-bit) bus > >> device em # Intel PRO/1000 Gigabit Ethernet Family > >> device miibus # MII bus support > >> device wlan # 802.11 support > >> options IEEE80211_DEBUG # enable debug msgs > >> options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's > >> device wlan_wep # 802.11 WEP support > >> device wlan_ccmp # 802.11 CCMP support > >> device wlan_tkip # 802.11 TKIP support > >> device wlan_amrr # AMRR transmit rate control algorithm > >> device loop # Network loopback > >> device random # Entropy device > >> device ether # Ethernet support > >> device tun # Packet tunnel. > >> device pty # BSD-style compatibility pseudo ttys > >> device md # Memory "disks" > >> device gif # IPv6 and IPv4 tunneling > >> device faith # IPv6-to-IPv4 relaying (translation) > >> device firmware # firmware assist module > >> device bpf # Berkeley packet filter > >> device usb2_storage > >> device usb2_storage_mass > >> > >> I don't think any thing request usb.ko. When i unload all usb2* and > >> netgraph.ko related modules,i find i can unload usb.ko successful. > > > > Try adding "device usb2_controller", "usb2_controller_ehci", > > and "usb2_controller_ohci" to the kernel config. > > I build kernel with "device usb2_controller", "usb2_controller_ehci", > and "usb2_controller_ohci".but it works nothing. usb.ko was still > loaded.,and usb2_controller* seems not be compiled into kernel. > usb2_controller_uhci_load="YES",usb2_controller_ehci_load="YES" still > load model to kernel. You also need "device usb2_core". Try this: rm /boot/kernel/usb.ko kldload /boot/kernel/usb2_core.ko kldload /boot/kernel/usb2_controller_uhci.ko kldload /boot/kernel/usb2_controller_ohci.ko kldload /boot/kernel/usb2_controller_ehci.ko kldload /boot/kernel/usb2_storage_mass.ko Do you get any dmesg printouts ? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 19:06:29 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E248D106564A for ; Tue, 11 Nov 2008 19:06:29 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gx0-f15.google.com (mail-gx0-f15.google.com [209.85.217.15]) by mx1.freebsd.org (Postfix) with ESMTP id 739CD8FC1A for ; Tue, 11 Nov 2008 19:05:44 +0000 (UTC) (envelope-from peter@wemm.org) Received: by gxk8 with SMTP id 8so2023gxk.12 for ; Tue, 11 Nov 2008 11:05:02 -0800 (PST) Received: by 10.142.163.13 with SMTP id l13mr3103833wfe.91.1226429745370; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Received: by 10.142.255.21 with HTTP; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 10:55:45 -0800 From: "Peter Wemm" To: "Andriy Gapon" In-Reply-To: <4919851B.7050800@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> Cc: Volker , FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 19:06:30 -0000 On Tue, Nov 11, 2008 at 5:14 AM, Andriy Gapon wrote: > on 08/11/2008 14:31 Volker said the following: >> Andriy, >> >> On 12/23/-58 20:59, Andriy Gapon wrote: >>> I have a quite strange problem. >>> This is with 7-BETA amd64. >> >> Did it work with earlier versions? > > Can't say, this is a new machine, FreeBSD took its virginity :-) > >>> All of USB is out of kernel and is loaded via modules. >>> BIOS has "Legacy USB" enabled. >>> I have only a USB keyboard, no PS/2 port. >> >> Can you check BIOS settings for EHCI handover? > > No such settings. > >> If the BIOS does not have handover enabled, it may disable legacy >> support after a timeout, which is often bad. IMO this is the same with >> booting off USB drives but every BIOS handles that different. > > This doesn't seem to be the case. The behavior is quite random, > sometimes I can work at loader prompt for may minutes, sometimes > keyboard is dead after a few seconds. > Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but > I am not sure if this matters. My guess is that Legacy support should > work until OS explicitly takes over by using special procedure (this > should be done for UHCI as well). > > BTW, it seems that our UHCI take-over code is far more simple than what > MS described here: > http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC > > Anyway, this happens after loader is done. > >>> The keyboard works file in BIOS and for selecting boot device in boot0 >>> menu. It also works in loader menu. If in the menu I select to go to >>> loader prompt then it works for about 5 seconds and then "dies" - no >>> reaction to key presses, no led change, nothing. >>> I haven't actually verified if the keyboard would still work if I stayed >>> in loader menu for longer than ~10 seconds. >>> >>> This doesn't happen if USB is built into kernel. >> >> That sound strange. I have no idea why that might work (or I'm totally >> wrong with my handover theory). > > I was incorrect about the above, I have already seen it happening both ways. > >>> Weird... >> >> Yes, sounds like or it's probably easily explainable ;) > > > -- > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Some bioses have a list of MBR partition id's and use that to determine what to do with the USB keyboard. One of my ol older amd64 motherboards worked but would always disable the usb keyboard right as loader started. I discovered the following: * If I put the freebsd bootblocks and loader on a floppy drive (no MBR), then the bios did not turn off the keyboard. It always continued to work for loader. * If i hacked the boot bootblocks and loader and kernel to recognize different MBR slice id nubmers as "ours", then changing the freebsd MBR to be "msdos" or "linux" also worked for that BIOS. It would no longer turn off the USB keyboard. I don't recall which Id number I used instead of 165 - it was about 4 years ago. * There were other consequences of using the partition ID hack - I think I remember it turning off the apic for msdos mode. Your problems may be different, but mine were caused by a BIOS whitelist of MBR partition id's. What a stupid problem. On that motherboard I ended up taking the path of least resistance and using the PS/2 adapter plug on the keyboard. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 19:07:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938BF1065672 for ; Tue, 11 Nov 2008 19:07:50 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gx0-f15.google.com (mail-gx0-f15.google.com [209.85.217.15]) by mx1.freebsd.org (Postfix) with ESMTP id 450CC8FC1B for ; Tue, 11 Nov 2008 19:06:52 +0000 (UTC) (envelope-from peter@wemm.org) Received: by mail-gx0-f15.google.com with SMTP id 8so2023gxk.12 for ; Tue, 11 Nov 2008 11:06:43 -0800 (PST) Received: by 10.142.163.13 with SMTP id l13mr3103833wfe.91.1226429745370; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Received: by 10.142.255.21 with HTTP; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 10:55:45 -0800 From: "Peter Wemm" To: "Andriy Gapon" In-Reply-To: <4919851B.7050800@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> Cc: Volker , FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 19:07:50 -0000 On Tue, Nov 11, 2008 at 5:14 AM, Andriy Gapon wrote: > on 08/11/2008 14:31 Volker said the following: >> Andriy, >> >> On 12/23/-58 20:59, Andriy Gapon wrote: >>> I have a quite strange problem. >>> This is with 7-BETA amd64. >> >> Did it work with earlier versions? > > Can't say, this is a new machine, FreeBSD took its virginity :-) > >>> All of USB is out of kernel and is loaded via modules. >>> BIOS has "Legacy USB" enabled. >>> I have only a USB keyboard, no PS/2 port. >> >> Can you check BIOS settings for EHCI handover? > > No such settings. > >> If the BIOS does not have handover enabled, it may disable legacy >> support after a timeout, which is often bad. IMO this is the same with >> booting off USB drives but every BIOS handles that different. > > This doesn't seem to be the case. The behavior is quite random, > sometimes I can work at loader prompt for may minutes, sometimes > keyboard is dead after a few seconds. > Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but > I am not sure if this matters. My guess is that Legacy support should > work until OS explicitly takes over by using special procedure (this > should be done for UHCI as well). > > BTW, it seems that our UHCI take-over code is far more simple than what > MS described here: > http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC > > Anyway, this happens after loader is done. > >>> The keyboard works file in BIOS and for selecting boot device in boot0 >>> menu. It also works in loader menu. If in the menu I select to go to >>> loader prompt then it works for about 5 seconds and then "dies" - no >>> reaction to key presses, no led change, nothing. >>> I haven't actually verified if the keyboard would still work if I stayed >>> in loader menu for longer than ~10 seconds. >>> >>> This doesn't happen if USB is built into kernel. >> >> That sound strange. I have no idea why that might work (or I'm totally >> wrong with my handover theory). > > I was incorrect about the above, I have already seen it happening both ways. > >>> Weird... >> >> Yes, sounds like or it's probably easily explainable ;) > > > -- > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Some bioses have a list of MBR partition id's and use that to determine what to do with the USB keyboard. One of my ol older amd64 motherboards worked but would always disable the usb keyboard right as loader started. I discovered the following: * If I put the freebsd bootblocks and loader on a floppy drive (no MBR), then the bios did not turn off the keyboard. It always continued to work for loader. * If i hacked the boot bootblocks and loader and kernel to recognize different MBR slice id nubmers as "ours", then changing the freebsd MBR to be "msdos" or "linux" also worked for that BIOS. It would no longer turn off the USB keyboard. I don't recall which Id number I used instead of 165 - it was about 4 years ago. * There were other consequences of using the partition ID hack - I think I remember it turning off the apic for msdos mode. Your problems may be different, but mine were caused by a BIOS whitelist of MBR partition id's. What a stupid problem. On that motherboard I ended up taking the path of least resistance and using the PS/2 adapter plug on the keyboard. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 19:07:55 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 591331065678 for ; Tue, 11 Nov 2008 19:07:55 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gx0-f15.google.com (mail-gx0-f15.google.com [209.85.217.15]) by mx1.freebsd.org (Postfix) with ESMTP id 011448FC24 for ; Tue, 11 Nov 2008 19:07:00 +0000 (UTC) (envelope-from peter@wemm.org) Received: by gxk8 with SMTP id 8so3167gxk.12 for ; Tue, 11 Nov 2008 11:06:00 -0800 (PST) Received: by 10.142.163.13 with SMTP id l13mr3103833wfe.91.1226429745370; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Received: by 10.142.255.21 with HTTP; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 10:55:45 -0800 From: "Peter Wemm" To: "Andriy Gapon" In-Reply-To: <4919851B.7050800@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> Cc: Volker , FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 19:07:55 -0000 On Tue, Nov 11, 2008 at 5:14 AM, Andriy Gapon wrote: > on 08/11/2008 14:31 Volker said the following: >> Andriy, >> >> On 12/23/-58 20:59, Andriy Gapon wrote: >>> I have a quite strange problem. >>> This is with 7-BETA amd64. >> >> Did it work with earlier versions? > > Can't say, this is a new machine, FreeBSD took its virginity :-) > >>> All of USB is out of kernel and is loaded via modules. >>> BIOS has "Legacy USB" enabled. >>> I have only a USB keyboard, no PS/2 port. >> >> Can you check BIOS settings for EHCI handover? > > No such settings. > >> If the BIOS does not have handover enabled, it may disable legacy >> support after a timeout, which is often bad. IMO this is the same with >> booting off USB drives but every BIOS handles that different. > > This doesn't seem to be the case. The behavior is quite random, > sometimes I can work at loader prompt for may minutes, sometimes > keyboard is dead after a few seconds. > Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but > I am not sure if this matters. My guess is that Legacy support should > work until OS explicitly takes over by using special procedure (this > should be done for UHCI as well). > > BTW, it seems that our UHCI take-over code is far more simple than what > MS described here: > http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC > > Anyway, this happens after loader is done. > >>> The keyboard works file in BIOS and for selecting boot device in boot0 >>> menu. It also works in loader menu. If in the menu I select to go to >>> loader prompt then it works for about 5 seconds and then "dies" - no >>> reaction to key presses, no led change, nothing. >>> I haven't actually verified if the keyboard would still work if I stayed >>> in loader menu for longer than ~10 seconds. >>> >>> This doesn't happen if USB is built into kernel. >> >> That sound strange. I have no idea why that might work (or I'm totally >> wrong with my handover theory). > > I was incorrect about the above, I have already seen it happening both ways. > >>> Weird... >> >> Yes, sounds like or it's probably easily explainable ;) > > > -- > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Some bioses have a list of MBR partition id's and use that to determine what to do with the USB keyboard. One of my ol older amd64 motherboards worked but would always disable the usb keyboard right as loader started. I discovered the following: * If I put the freebsd bootblocks and loader on a floppy drive (no MBR), then the bios did not turn off the keyboard. It always continued to work for loader. * If i hacked the boot bootblocks and loader and kernel to recognize different MBR slice id nubmers as "ours", then changing the freebsd MBR to be "msdos" or "linux" also worked for that BIOS. It would no longer turn off the USB keyboard. I don't recall which Id number I used instead of 165 - it was about 4 years ago. * There were other consequences of using the partition ID hack - I think I remember it turning off the apic for msdos mode. Your problems may be different, but mine were caused by a BIOS whitelist of MBR partition id's. What a stupid problem. On that motherboard I ended up taking the path of least resistance and using the PS/2 adapter plug on the keyboard. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 20:09:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CCB41065687; Tue, 11 Nov 2008 20:09:22 +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 CE6B98FC16; Tue, 11 Nov 2008 20:09:21 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7c04.q.ppp-pool.de [89.53.124.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id 4444512883F; Tue, 11 Nov 2008 21:09:13 +0100 (CET) Received: from cesar.sz.vwsoft.com (unknown [192.168.18.3]) by mail.vtec.ipme.de (Postfix) with ESMTP id 10D892E90F; Tue, 11 Nov 2008 21:09:01 +0100 (CET) Message-ID: <4919E65C.1020307@vwsoft.com> Date: Tue, 11 Nov 2008 21:09:00 +0100 From: Volker User-Agent: Thunderbird 2.0.0.17 (X11/20080930) MIME-Version: 1.0 To: Peter Wemm References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> In-Reply-To: X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1227038950.56887@G4VEviIoOmG1eOJz+zaa0A X-MailScanner-ID: 10D892E90F.AF67A X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com 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 Stable , Andriy Gapon , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 20:09:22 -0000 On 11/11/08 19:55, Peter Wemm wrote: > ... > * There were other consequences of using the partition ID hack - I > think I remember it turning off the apic for msdos mode. > > Your problems may be different, but mine were caused by a BIOS > whitelist of MBR partition id's. What a stupid problem. On that > motherboard I ended up taking the path of least resistance and using > the PS/2 adapter plug on the keyboard. Peter, very interesting what you've found. That reminds me on some investigations I did as I was hunting USB boot device problems. Some BIOSes do not check the partition (slice) ID but are looking for a file system magic. If a FAT filesystem is detected, the BIOS does some stupid things (like ignoring the active partition flag and booting the FAT slice no matter what you've flagged active). Just an example and off-topic to Andriy's keyboard problem. But when combining that with your findings, it may still be a thing to check for... ;) Volker From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 20:24:29 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C0C1065672 for ; Tue, 11 Nov 2008 20:24:29 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id BA1EA8FC25 for ; Tue, 11 Nov 2008 20:24:28 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA11.westchester.pa.mail.comcast.net ([76.96.62.36]) by QMTA09.westchester.pa.mail.comcast.net with comcast id dn6Q1a00B0mv7h059wQTcq; Tue, 11 Nov 2008 20:24:27 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA11.westchester.pa.mail.comcast.net with comcast id dwQR1a00C2P6wsM3XwQR3C; Tue, 11 Nov 2008 20:24:27 +0000 X-Authority-Analysis: v=1.0 c=1 a=ux2eErHcXjUA:10 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=EhV_xG62G5wHDkLL7u4A:9 a=W_ovRdUTjs7m23KX8My7FA9f9c4A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 563A45C1A; Tue, 11 Nov 2008 12:24:25 -0800 (PST) Date: Tue, 11 Nov 2008 12:24:25 -0800 From: Jeremy Chadwick To: Volker Message-ID: <20081111202425.GA6568@icarus.home.lan> References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <4919E65C.1020307@vwsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4919E65C.1020307@vwsoft.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-usb@freebsd.org, FreeBSD Stable , Andriy Gapon , Peter Wemm Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 20:24:29 -0000 On Tue, Nov 11, 2008 at 09:09:00PM +0100, Volker wrote: > On 11/11/08 19:55, Peter Wemm wrote: > > ... > > * There were other consequences of using the partition ID hack - I > > think I remember it turning off the apic for msdos mode. > > > > Your problems may be different, but mine were caused by a BIOS > > whitelist of MBR partition id's. What a stupid problem. On that > > motherboard I ended up taking the path of least resistance and using > > the PS/2 adapter plug on the keyboard. > > Peter, > > very interesting what you've found. That reminds me on some > investigations I did as I was hunting USB boot device problems. > > Some BIOSes do not check the partition (slice) ID but are looking for a > file system magic. If a FAT filesystem is detected, the BIOS does some > stupid things (like ignoring the active partition flag and booting the > FAT slice no matter what you've flagged active). Just an example and > off-topic to Andriy's keyboard problem. > > But when combining that with your findings, it may still be a thing to > check for... ;) Since you folks in this thread have some pretty good experience with BIOS behaviour and bootloader/filesystem stuff, could I ask that someone take a look at something I posted at over on -fs? I'm out of ideas at this point. http://lists.freebsd.org/pipermail/freebsd-fs/2008-November/005317.html Danke! -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 20:30:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F159C1065673 for ; Tue, 11 Nov 2008 20:30:47 +0000 (UTC) (envelope-from peter@wemm.org) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by mx1.freebsd.org (Postfix) with ESMTP id E6E5A8FC1A for ; Tue, 11 Nov 2008 20:30:47 +0000 (UTC) (envelope-from peter@wemm.org) Received: by wf-out-1314.google.com with SMTP id 24so61364wfg.7 for ; Tue, 11 Nov 2008 12:30:47 -0800 (PST) Received: by 10.142.224.5 with SMTP id w5mr3133011wfg.243.1226435020244; Tue, 11 Nov 2008 12:23:40 -0800 (PST) Received: by 10.142.255.21 with HTTP; Tue, 11 Nov 2008 12:23:40 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 12:23:40 -0800 From: "Peter Wemm" To: Volker In-Reply-To: <4919E65C.1020307@vwsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <4919E65C.1020307@vwsoft.com> Cc: FreeBSD Stable , Andriy Gapon , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 20:30:48 -0000 On Tue, Nov 11, 2008 at 12:09 PM, Volker wrote: > On 11/11/08 19:55, Peter Wemm wrote: >> ... >> * There were other consequences of using the partition ID hack - I >> think I remember it turning off the apic for msdos mode. >> >> Your problems may be different, but mine were caused by a BIOS >> whitelist of MBR partition id's. What a stupid problem. On that >> motherboard I ended up taking the path of least resistance and using >> the PS/2 adapter plug on the keyboard. > > Peter, > > very interesting what you've found. That reminds me on some > investigations I did as I was hunting USB boot device problems. > > Some BIOSes do not check the partition (slice) ID but are looking for a > file system magic. If a FAT filesystem is detected, the BIOS does some > stupid things (like ignoring the active partition flag and booting the > FAT slice no matter what you've flagged active). Just an example and > off-topic to Andriy's keyboard problem. > > But when combining that with your findings, it may still be a thing to > check for... ;) > > Volker I have long since stopped being surprised by what bios writers come up with. Or should I say "windows boot loader" instead of bios, because that is what it seems to have degenerated into these days. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 21:00:48 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CAF2106568A; Tue, 11 Nov 2008 21:00:48 +0000 (UTC) (envelope-from nakal@web.de) Received: from fmmailgate01.web.de (fmmailgate01.web.de [217.72.192.221]) by mx1.freebsd.org (Postfix) with ESMTP id E3E8A8FC18; Tue, 11 Nov 2008 21:00:47 +0000 (UTC) (envelope-from nakal@web.de) Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id ECB28F96F254; Tue, 11 Nov 2008 21:33:46 +0100 (CET) Received: from [217.236.9.131] (helo=zelda.local) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1Kzzvm-0005QB-00; Tue, 11 Nov 2008 21:33:46 +0100 Date: Tue, 11 Nov 2008 21:33:44 +0100 From: Martin To: "Peter Wemm" Message-ID: <20081111213344.6657548c@zelda.local> In-Reply-To: References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> X-Mailer: Claws Mail 3.6.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: nakal@web.de X-Sender: nakal@web.de X-Provags-ID: V01U2FsdGVkX1+MIlryiMd49qvoDAw0q5qimWGrbUdPEsXNWBbq ZsqLht5+H1qaAvxwzd8o/DeOQrhticyJk5rmlQRhOzkbptBPlO c8QvlwJPI= Cc: Volker , freebsd-usb@freebsd.org, Stable , Andriy Gapon , FreeBSD Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 21:00:48 -0000 Am Tue, 11 Nov 2008 10:55:45 -0800 schrieb "Peter Wemm" : > Some bioses have a list of MBR partition id's and use that to > determine what to do with the USB keyboard. One of my ol older amd64 > motherboards worked but would always disable the usb keyboard right as > loader started. I discovered the following: > * If I put the freebsd bootblocks and loader on a floppy drive (no > MBR), then the bios did not turn off the keyboard. It always > continued to work for loader. > * If i hacked the boot bootblocks and loader and kernel to recognize > different MBR slice id nubmers as "ours", then changing the freebsd > MBR to be "msdos" or "linux" also worked for that BIOS. It would no > longer turn off the USB keyboard. I don't recall which Id number I > used instead of 165 - it was about 4 years ago. > * There were other consequences of using the partition ID hack - I > think I remember it turning off the apic for msdos mode. > > Your problems may be different, but mine were caused by a BIOS > whitelist of MBR partition id's. What a stupid problem. On that > motherboard I ended up taking the path of least resistance and using > the PS/2 adapter plug on the keyboard. Hello, I want to add some information about USB problems which occur for me very frequently. I have found out that most of the problems are related to Gigabyte mainboards. I have 2 of them now. One is "EP35C-DS3R". With this mainboard sometimes my USB keyboard and USB mouse stop working (the power is simply off). I can reattach them and they both power up again. The second mainboard is "EP45-DS3R". Here the problem is even worse. The keyboard and mouse (both USB) lose power as soon as FreeBSD scans the USB controllers. Here, I can also reattach the devices and they are usable again. One further hint: it seems Vista (64 bit version) has the same problem with this EP45-DS3R mainboard. After it boots into the login screen, I have to reattach the devices to use them. The mainboard is not broken, I have tried 3 so far and all have these strange effects. And now... I want to remind you that I have already posted here about (same) USB problems on my laptop (Lenovo Thinkpad T60p). Sometimes I have to reattach my keyboard there, too. Of course, this is not Gigabyte here, but the weird behaviour ressembles the one above. -- Martin From owner-freebsd-usb@FreeBSD.ORG Tue Nov 11 21:50:01 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7C1B106567D for ; Tue, 11 Nov 2008 21:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AB0A68FC13 for ; Tue, 11 Nov 2008 21:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mABLo1eu048515 for ; Tue, 11 Nov 2008 21:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mABLo19I048514; Tue, 11 Nov 2008 21:50:01 GMT (envelope-from gnats) Resent-Date: Tue, 11 Nov 2008 21:50:01 GMT Resent-Message-Id: <200811112150.mABLo19I048514@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andre Guibert de Bruet Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B8E1065678 for ; Tue, 11 Nov 2008 21:41:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id AF0CE8FC14 for ; Tue, 11 Nov 2008 21:41:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mABLfkP2087908 for ; Tue, 11 Nov 2008 21:41:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mABLfkim087907; Tue, 11 Nov 2008 21:41:46 GMT (envelope-from nobody) Message-Id: <200811112141.mABLfkim087907@www.freebsd.org> Date: Tue, 11 Nov 2008 21:41:46 GMT From: Andre Guibert de Bruet To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/128803: Quirk for I-Tuner Networks USBLCD4X20 support X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 21:50:01 -0000 >Number: 128803 >Category: usb >Synopsis: Quirk for I-Tuner Networks USBLCD4X20 support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 11 21:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Andre Guibert de Bruet >Release: 7.1-PRERELEASE & CURRENT >Organization: Silicon Landmark >Environment: FreeBSD zoom.properkernel.com 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Sat Nov 8 12:12:58 EST 2008 devel@zoom.properkernel.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: The I-Tuner Networks USBLCD4X20 is a bus-powered external USB 4x20 LCD display. When plugged in, uhid attaches to this device, rendering it useless. The attached patch adds the proper quirk so that uhid doesn't attach to it. This allows software such as LCDproc to talk to it and display useful information. >How-To-Repeat: Plug the device in, and try to use any libusb-based application to talk to the device. They will fail to claim the appropriate interface. >Fix: See attached patch. Patch attached with submission follows: --- usb_quirks.c.orig 2008-10-30 22:50:12.000000000 -0400 +++ usb_quirks.c 2008-10-30 22:50:38.000000000 -0400 @@ -102,6 +102,8 @@ ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD2X20, ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD4X20, + ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1, ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, --- usbdevs.orig 2008-10-30 22:50:00.000000000 -0400 +++ usbdevs 2008-10-30 22:51:00.000000000 -0400 @@ -1455,6 +1455,7 @@ /* Ituner networks products */ product ITUNERNET USBLCD2X20 0x0002 USB-LCD 2x20 +product ITUNERNET USBLCD4X20 0xc001 USB-LCD 4x20 /* Jablotron products */ product JABLOTRON PC60B 0x0001 PC-60B >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 02:37:27 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A451065691; Wed, 12 Nov 2008 02:37:26 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by mx1.freebsd.org (Postfix) with SMTP id 2D5A38FC25; Wed, 12 Nov 2008 02:37:24 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from [127.0.0.1] (unknown [60.191.86.3]) by smtp7 (Coremail) with SMTP id C8CowLC7tzBRQRpJuHaLAA--.62740S2; Wed, 12 Nov 2008 10:37:05 +0800 (CST) Message-ID: <491A4156.3080001@163.com> Date: Wed, 12 Nov 2008 10:37:10 +0800 From: kevin User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Hans Petter Selasky References: <3a142e750811071229r6d452b28t7979ab08e1c90d71@mail.gmail.com> <200811100852.43003.hselasky@c2i.net> <4918F13F.1090302@163.com> <200811111636.26174.hselasky@c2i.net> In-Reply-To: <200811111636.26174.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Coremail-Antispam: 1Uf129KBjvJXoWxtF18ur47Zw43trykZr18Xwb_yoWfZFWkpr yDGa17Gr48KF1Yvw1qqwn5CrZ5tF4UAa1fW3WkG3yrGr1qga45J3sFyFy3u39avrs8ur17 XFyDZ3yIqw1UJw7anT9S1TB71UUUUUUv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UU U8D7k0a2IF6r1UM7kC6x804xWl14x267AKxVWUJVW8JwAFxVCF77xC6IxKo4kEV4yl1I0E scIYIxCEI4klw4CSwwAFIxvE14AKwVWUJVWUGwAawVAYYI1S6c8GOVWUur45Jrylnx0Ec2 IEnICE548m6r1DJrWUZwAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Jrv_JF1lYx0Ex4A2jsIE14v26r1j6r4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6x AIw28IcVAK0I8IjxAxMx02cVAKzwCY02Avz4vE14v_Gr1lc2IjII80xcxEwVWxJVW3JwCF 72vE52k0Y41lx4CE17CEb7AF67AKxVWUXVWUAbIYCTnIWIevJa73UjIFyTuYvj4R2ii6UU UUU Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB4BSD release candidate number 3 - request for review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 02:37:27 -0000 Hans Petter Selasky wrote: > On Tuesday 11 November 2008, kevin wrote: > >> Hans Petter Selasky wrote: >> >>> On Monday 10 November 2008, kevin wrote: >>> >>>> Hans Petter Selasky wrote: >>>> >>>>> On Sunday 09 November 2008, kevin wrote: >>>>> >>>>>> It's a bug? >>>>>> /boot/loader.conf: >>>>>> zfs_load="YES" >>>>>> vm.kmem_size_max="2048M" >>>>>> vm.kmem_size="2048M" >>>>>> vfs.zfs.zil_disable=1 >>>>>> vfs.zfs.prefetch_disable=1 >>>>>> hw.psm.synaptics_support=1 >>>>>> legal.intel_iwn.license_ack=1 >>>>>> acpi_ibm_load="YES" >>>>>> snd_hda_load="YES" >>>>>> powerd_enable="YES" >>>>>> linux_load="YES" >>>>>> if_iwn_load="YES" >>>>>> ubtbcmfw_load="YES" >>>>>> usb2_bluetooth_load="YES" >>>>>> usb2_bluetooth_ng_load="YES" >>>>>> usb2_bluetooth_fw_load="YES" >>>>>> usb2_controller_uhci_load="YES" >>>>>> usb2_controller_ehci_load="YES" >>>>>> usb2_input_ms_load="YES" >>>>>> usb2_storage_mass_load="YES" >>>>>> usb2_image_load="YES" >>>>>> >>>>>> kldstat: >>>>>> Id Refs Address Size Name >>>>>> 1 82 0xffffffff80100000 756b28 kernel (/boot/kernel/kernel) >>>>>> 2 1 0xffffffff80857000 3a88f8 zfs.ko (/boot/kernel/zfs.ko) >>>>>> 3 2 0xffffffff80c00000 6670 opensolaris.ko >>>>>> (/boot/kernel/opensolaris.ko) 4 2 0xffffffff80c07000 a1dd8 >>>>>> linux.ko (/boot/kernel/linux.ko) 5 1 0xffffffff80ca9000 28470 >>>>>> snd_hda.ko (/boot/kernel/snd_hda.ko) 6 2 0xffffffff80cd2000 bc4d0 >>>>>> sound.ko (/boot/kernel/sound.ko) 7 1 0xffffffff80d8f000 7a38 >>>>>> acpi_ibm.ko (/boot/kernel/acpi_ibm.ko) 8 1 0xffffffff80d97000 24e80 >>>>>> if_iwn.ko (/boot/kernel/if_iwn.ko) 9 1 0xffffffff80dbc000 6c18 >>>>>> ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko) 10 2 0xffffffff80dc3000 >>>>>> 27f88 usb.ko (/boot/kernel/usb.ko) >>>>>> 11 3 0xffffffff80deb000 be8 usb2_bluetooth.ko >>>>>> (/boot/kernel/usb2_bluetooth.ko) 12 12 0xffffffff80dec000 9c868 >>>>>> usb2_core.ko (/boot/kernel/usb2_core.ko) 13 1 0xffffffff80e89000 >>>>>> bbf8 usb2_bluetooth_ng.ko (/boot/kernel/usb2_bluetooth_ng.ko) 14 6 >>>>>> 0xffffffff80e95000 1ad00 netgraph.ko (/boot/kernel/netgraph.ko) 15 >>>>>> 1 0xffffffff80eb0000 a950 usb2_bluetooth_fw.ko >>>>>> (/boot/kernel/usb2_bluetooth_fw.ko) 16 1 0xffffffff80ebb000 15978 >>>>>> usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 17 3 >>>>>> 0xffffffff80ed1000 8780 usb2_controller.ko >>>>>> (/boot/kernel/usb2_controller.ko) 18 1 0xffffffff80eda000 19dd0 >>>>>> usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) 19 1 >>>>>> 0xffffffff80ef4000 e128 usb2_input_ms.ko >>>>>> (/boot/kernel/usb2_input_ms.ko) 20 2 0xffffffff80f03000 bd0 >>>>>> usb2_input.ko (/boot/kernel/usb2_input.ko) 21 1 0xffffffff80f04000 >>>>>> 15c28 usb2_storage_mass.ko (/boot/kernel/usb2_storage_mass.ko) 22 2 >>>>>> 0xffffffff80f1a000 bd8 usb2_storage.ko >>>>>> (/boot/kernel/usb2_storage.ko) 23 1 0xffffffff80f1b000 bd0 >>>>>> usb2_image.ko >>>>>> (/boot/kernel/usb2_image.ko) 24 4 0xffffffff81022000 1835 >>>>>> ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 25 1 >>>>>> 0xffffffff81024000 133a9 ng_hci.ko (/boot/kernel/ng_hci.ko) 26 1 >>>>>> 0xffffffff81038000 174b7 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 27 >>>>>> 1 0xffffffff81050000 2de0a ng_btsocket.ko >>>>>> (/boot/kernel/ng_btsocket.ko) 28 1 >>>>>> 0xffffffff8107e000 535e ng_socket.ko (/boot/kernel/ng_socket.ko) >>>>>> 29 1 0xffffffff81084000 8059 vkbd.ko (/boot/kernel/vkbd.ko) 30 >>>>>> 1 0xffffffff8108d000 6f4 rtc.ko (/usr/local/modules/rtc.ko) >>>>>> >>>>>> I build kernel without usb*.I notice usb.ko's refs is 2, after i run >>>>>> kldunload usb.ko, it is 1.when i try to kldunload usb.ko another >>>>>> time,it return "Device busy".Any thing still request usb.ko? >>>>>> >>>>> Hi, >>>>> >>>>> Could you send me your kernel config file. Maybe there is still one USB >>>>> config entry left for the old USB stack. Else the following should do >>>>> the trick: rm /boot/kernel/usb.ko >>>>> >>>>> --HPS >>>>> >>>> This is my kernel config file. >>>> >>>> cpu HAMMER >>>> ident G8laptop >>>> options SCHED_ULE # ULE scheduler >>>> options PREEMPTION # Enable kernel thread preemption >>>> options INET # InterNETworking >>>> options INET6 # IPv6 communications protocols >>>> options SCTP # Stream Control Transmission Protocol >>>> options FFS # Berkeley Fast Filesystem >>>> options SOFTUPDATES # Enable FFS soft updates support >>>> options UFS_ACL # Support for access control lists >>>> options UFS_DIRHASH # Improve performance on big directories >>>> options UFS_GJOURNAL # Enable gjournal-based UFS journaling >>>> options NFSCLIENT # Network Filesystem Client >>>> options NFSLOCKD # Network Lock Manager >>>> options NTFS # NT File System >>>> options MSDOSFS # MSDOS Filesystem >>>> options CD9660 # ISO 9660 Filesystem >>>> options PROCFS # Process filesystem (requires PSEUDOFS) >>>> options PSEUDOFS # Pseudo-filesystem framework >>>> options GEOM_PART_GPT # GUID Partition Tables. >>>> options GEOM_LABEL # Provides labelization >>>> options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] >>>> options COMPAT_IA32 # Compatible with i386 binaries >>>> options COMPAT_FREEBSD4 # Compatible with FreeBSD4 >>>> options COMPAT_FREEBSD5 # Compatible with FreeBSD5 >>>> options COMPAT_FREEBSD6 # Compatible with FreeBSD6 >>>> options COMPAT_FREEBSD7 # Compatible with FreeBSD7 >>>> options KTRACE # ktrace(1) support >>>> options STACK # stack(9) support >>>> options SYSVSHM # SYSV-style shared memory >>>> options SYSVMSG # SYSV-style message queues >>>> options SYSVSEM # SYSV-style semaphores >>>> options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time >>>> extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev >>>> options STOP_NMI # Stop CPUS using NMI instead of IPI >>>> options AUDIT # Security event auditing >>>> options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) >>>> options KDB # Enable kernel debugger support. >>>> options DDB # Support DDB. >>>> options KDTRACE_HOOKS >>>> options DDB_CTF >>>> options KDTRACE_FRAME >>>> options SMP # Symmetric MultiProcessor Kernel >>>> device cpufreq >>>> device coretemp >>>> device nvram >>>> device acpi >>>> device pci >>>> device ata >>>> device atadisk # ATA disk drives >>>> device atapicd # ATAPI CDROM drives >>>> options ATA_STATIC_ID # Static device numbering >>>> device scbus # SCSI bus (required for SCSI) >>>> device da # Direct Access (disks) >>>> device cd # CD >>>> device pass # Passthrough device (direct SCSI access) >>>> device atkbdc # AT keyboard controller >>>> device atkbd # AT keyboard >>>> device psm # PS/2 mouse >>>> device kbdmux # keyboard multiplexer >>>> device vga # VGA video card driver >>>> device splash # Splash screen and screen saver support >>>> device sc >>>> device agp # support several AGP chipsets >>>> device cbb # cardbus (yenta) bridge >>>> device pccard # PC Card (16-bit) bus >>>> device cardbus # CardBus (32-bit) bus >>>> device em # Intel PRO/1000 Gigabit Ethernet Family >>>> device miibus # MII bus support >>>> device wlan # 802.11 support >>>> options IEEE80211_DEBUG # enable debug msgs >>>> options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's >>>> device wlan_wep # 802.11 WEP support >>>> device wlan_ccmp # 802.11 CCMP support >>>> device wlan_tkip # 802.11 TKIP support >>>> device wlan_amrr # AMRR transmit rate control algorithm >>>> device loop # Network loopback >>>> device random # Entropy device >>>> device ether # Ethernet support >>>> device tun # Packet tunnel. >>>> device pty # BSD-style compatibility pseudo ttys >>>> device md # Memory "disks" >>>> device gif # IPv6 and IPv4 tunneling >>>> device faith # IPv6-to-IPv4 relaying (translation) >>>> device firmware # firmware assist module >>>> device bpf # Berkeley packet filter >>>> device usb2_storage >>>> device usb2_storage_mass >>>> >>>> I don't think any thing request usb.ko. When i unload all usb2* and >>>> netgraph.ko related modules,i find i can unload usb.ko successful. >>>> >>> Try adding "device usb2_controller", "usb2_controller_ehci", >>> and "usb2_controller_ohci" to the kernel config. >>> >> I build kernel with "device usb2_controller", "usb2_controller_ehci", >> and "usb2_controller_ohci".but it works nothing. usb.ko was still >> loaded.,and usb2_controller* seems not be compiled into kernel. >> usb2_controller_uhci_load="YES",usb2_controller_ehci_load="YES" still >> load model to kernel. >> > > You also need "device usb2_core". > > Try this: > > rm /boot/kernel/usb.ko > > kldload /boot/kernel/usb2_core.ko > kldload /boot/kernel/usb2_controller_uhci.ko > kldload /boot/kernel/usb2_controller_ohci.ko > kldload /boot/kernel/usb2_controller_ehci.ko > kldload /boot/kernel/usb2_storage_mass.ko > > Do you get any dmesg printouts ? > rm /boot/kernel/usb.ko,and then reboot system. system works fine without usb.ko and there is no difference in dmesg. Thanks, kevin From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 10:03:01 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E4631065689 for ; Wed, 12 Nov 2008 10:03:01 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3398FC18 for ; Wed, 12 Nov 2008 10:03:00 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so982308ugs.39 for ; Wed, 12 Nov 2008 02:02:59 -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=rqIW+ivaUfSTkt9r7UPj/RvB/i09ETs7Dj+PHG3016s=; b=LxYIgY167JYzV53SScocLuqV/LSP33c5+c97HdVP4qLVmNL7tgK/zkykh62zsMYi0Y Sk2T5h37kPn56NiaAZl3dwRWNVHOjDl43EcarodYP+Dg29N1l9t6a8wBlLWCsuXOHE3Q OvnV07ijFq78vxojnEO3E1cYWZwr8+08nV8kI= 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=J9f1oaFO2zMM5aNuU0XeF6veaxihLVWKlBp73HaKnotyncJyk2REQRukaqfTVzetde gkahCZXosiJa8nuAyOywDprH2Pl4nuCyLK6MObvHV20p4Xot1ECtqsUS1WnqNRwJBDrV t1/wBmcEGWAx7ToFmUSTpS2+fK3po2Je495bY= Received: by 10.210.130.14 with SMTP id c14mr8214233ebd.190.1226482579428; Wed, 12 Nov 2008 01:36:19 -0800 (PST) Received: by 10.210.38.6 with HTTP; Wed, 12 Nov 2008 01:36:19 -0800 (PST) Message-ID: Date: Wed, 12 Nov 2008 12:36:19 +0300 From: pluknet To: Martin In-Reply-To: <20081111213344.6657548c@zelda.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <20081111213344.6657548c@zelda.local> Cc: Volker , Stable , freebsd-usb@freebsd.org, Peter Wemm , Andriy Gapon Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 10:03:01 -0000 2008/11/11 Martin : > Am Tue, 11 Nov 2008 10:55:45 -0800 > schrieb "Peter Wemm" : > >> Some bioses have a list of MBR partition id's and use that to >> determine what to do with the USB keyboard. One of my ol older amd64 >> motherboards worked but would always disable the usb keyboard right as >> loader started. I discovered the following: >> * If I put the freebsd bootblocks and loader on a floppy drive (no >> MBR), then the bios did not turn off the keyboard. It always >> continued to work for loader. >> * If i hacked the boot bootblocks and loader and kernel to recognize >> different MBR slice id nubmers as "ours", then changing the freebsd >> MBR to be "msdos" or "linux" also worked for that BIOS. It would no >> longer turn off the USB keyboard. I don't recall which Id number I >> used instead of 165 - it was about 4 years ago. >> * There were other consequences of using the partition ID hack - I >> think I remember it turning off the apic for msdos mode. >> >> Your problems may be different, but mine were caused by a BIOS >> whitelist of MBR partition id's. What a stupid problem. On that >> motherboard I ended up taking the path of least resistance and using >> the PS/2 adapter plug on the keyboard. > > Hello, > > I want to add some information about USB problems which occur for me > very frequently. > > I have found out that most of the problems are related to Gigabyte > mainboards. I have 2 of them now. One is "EP35C-DS3R". With this > mainboard sometimes my USB keyboard and USB mouse stop working (the > power is simply off). I can reattach them and they both power up again. > > The second mainboard is "EP45-DS3R". Here the problem is even worse. > The keyboard and mouse (both USB) lose power as soon as FreeBSD scans > the USB controllers. Here, I can also reattach the devices and they are > usable again. > > One further hint: it seems Vista (64 bit version) has the same problem > with this EP45-DS3R mainboard. After it boots into the login screen, I > have to reattach the devices to use them. The mainboard is not broken, > I have tried 3 so far and all have these strange effects. > > > And now... I want to remind you that I have already posted here about > (same) USB problems on my laptop (Lenovo Thinkpad T60p). Sometimes I > have to reattach my keyboard there, too. Of course, this is not > Gigabyte here, but the weird behaviour ressembles the one above. I have the same problem with my ukbd&ums: they are power off'ed during the boot and I should to re-attach them . MB: Asus p5k. -- wbr, pluknet From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 11:29:18 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30831065688; Wed, 12 Nov 2008 11:29:18 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A5F268FC0A; Wed, 12 Nov 2008 11:29:17 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA15544; Wed, 12 Nov 2008 13:29:10 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491ABE05.5080809@icyb.net.ua> Date: Wed, 12 Nov 2008 13:29:09 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Peter Wemm References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Volker , FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 11:29:18 -0000 on 11/11/2008 20:55 Peter Wemm said the following: > Some bioses have a list of MBR partition id's and use that to > determine what to do with the USB keyboard. One of my ol older amd64 > motherboards worked but would always disable the usb keyboard right as > loader started. I discovered the following: > * If I put the freebsd bootblocks and loader on a floppy drive (no > MBR), then the bios did not turn off the keyboard. It always > continued to work for loader. > * If i hacked the boot bootblocks and loader and kernel to recognize > different MBR slice id nubmers as "ours", then changing the freebsd > MBR to be "msdos" or "linux" also worked for that BIOS. It would no > longer turn off the USB keyboard. I don't recall which Id number I > used instead of 165 - it was about 4 years ago. > * There were other consequences of using the partition ID hack - I > think I remember it turning off the apic for msdos mode. > > Your problems may be different, but mine were caused by a BIOS > whitelist of MBR partition id's. What a stupid problem. On that > motherboard I ended up taking the path of least resistance and using > the PS/2 adapter plug on the keyboard. Foul play on BIOS part is definitely a big possibility. What puzzles me most is random/inconsistent behavior from boot to boot. Maybe there is some misalignment between how BIOS emulates legacy keyboard and how our boot chain interacts with it, some timing issue or something. Anyway, this is very hard to debug or guess. Most probably I will have to live with it (this system doesn't have PS/2 ports at all). -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 11:36:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 076D91065672; Wed, 12 Nov 2008 11:36:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 359878FC12; Wed, 12 Nov 2008 11:36:47 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA15684; Wed, 12 Nov 2008 13:36:46 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491ABFCD.3060309@icyb.net.ua> Date: Wed, 12 Nov 2008 13:36:45 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: FreeBSD Stable , freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org References: <4911BA93.9030006@icyb.net.ua> In-Reply-To: <4911BA93.9030006@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 11:36:50 -0000 on 05/11/2008 17:24 Andriy Gapon said the following: > System is FreeBSD 7.1-BETA2 amd64. > > Looking through my dmesg I see that relative order of ukbd attachment > and root mounting is not deterministic. Sometime keyboard is attached > first, sometimes root filesystem is mounted first. Quite more often root > is mounted first, though. > Example (with GENERIC kernel): > Nov 3 15:40:54 kernel: Trying to mount root from ufs:/dev/mirror/bootgm > Nov 3 15:40:54 kernel: GEOM_LABEL: Label ufs/bootfs removed. > Nov 3 15:40:54 kernel: GEOM_LABEL: Label for provider mirror/bootgm is > ufs/bootfs. > Nov 3 15:40:54 kernel: GEOM_LABEL: Label ufs/bootfs removed. > Nov 3 15:40:54 kernel: ukbd0: 1.10/1.10, addr 3> on uhub2 > Nov 3 15:40:54 kernel: kbd2 at ukbd0 > Nov 3 15:40:54 kernel: uhid0: 1.10/1.10, addr 3> on uhub2 > > Another (with custom kernel, zfs root): > Nov 4 17:54:03 odyssey kernel: Trying to mount root from zfs:tank/root > Nov 4 17:54:03 odyssey kernel: ukbd0: rev 1.10/1.10, addr 3> on uhub2 > Nov 4 17:54:03 odyssey kernel: kbd2 at ukbd0 > Nov 4 17:54:03 odyssey kernel: kbd2: ukbd0, generic (0), config:0x0, > flags:0x3d0000 > Nov 4 17:54:03 odyssey kernel: uhid0: rev 1.10/1.10, addr 3> on uhub2 > > I have a legacy-free system (no PS/2 ports, only USB) and I wanted to > try a kernel without atkbd and psm (with ums, ukbd, kbdmux), but was > bitten hard when I made a mistake and kernel could not find/mount root > filesystem. > > So I stuck at mountroot prompt without a keyboard to enter anything. > This was repeatable about 10 times after which I resorted to live cd. > > Since then I put back atkbdc into my kernel. I guess BIOS or USB > hardware emulate AT or PS/2 keyboard, so the USB keyboard works before > the driver attaches. I guess I need such emulation e.g. for loader or > boot0 configuration. But I guess I don't have to have atkbd driver in > kernel. This turned out not to be a complete solution as it seems that there are some quirks about legacy USB here, sometimes keyboard stops working even at loader prompt (this is described in a different thread). ukbd attachment still puzzles me a lot. I look at some older dmesg, e.g. this 7.0-RELEASE one: http://www.mavetju.org/mail/view_message.php?list=freebsd-usb&id=2709973 and see that ukbd attaches along with ums before mountroot. I look at newer dmesg and I see that ums attaches at about the same time as before but ukbd consistently attaches after mountroot. I wonder what might cause such behavior and how to fix it. I definitely would like to see ukbd attach before mountroot, I can debug this issue, but need some hints on where to start. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:00:21 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66551106579B; Wed, 12 Nov 2008 12:00:21 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 070258FC1E; Wed, 12 Nov 2008 12:00:19 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA16104; Wed, 12 Nov 2008 13:58:59 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491AC502.9000507@icyb.net.ua> Date: Wed, 12 Nov 2008 13:58:58 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Nate Eldredge References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:00:21 -0000 on 12/11/2008 13:53 Nate Eldredge said the following: > On Wed, 12 Nov 2008, Andriy Gapon wrote: > >> on 05/11/2008 17:24 Andriy Gapon said the following: > [...] >>> I have a legacy-free system (no PS/2 ports, only USB) and I wanted to >>> try a kernel without atkbd and psm (with ums, ukbd, kbdmux), but was >>> bitten hard when I made a mistake and kernel could not find/mount root >>> filesystem. >>> >>> So I stuck at mountroot prompt without a keyboard to enter anything. >>> This was repeatable about 10 times after which I resorted to live cd. >>> >>> Since then I put back atkbdc into my kernel. I guess BIOS or USB >>> hardware emulate AT or PS/2 keyboard, so the USB keyboard works before >>> the driver attaches. I guess I need such emulation e.g. for loader or >>> boot0 configuration. But I guess I don't have to have atkbd driver in >>> kernel. >> >> This turned out not to be a complete solution as it seems that there are >> some quirks about legacy USB here, sometimes keyboard stops working even >> at loader prompt (this is described in a different thread). >> >> ukbd attachment still puzzles me a lot. >> I look at some older dmesg, e.g. this 7.0-RELEASE one: >> http://www.mavetju.org/mail/view_message.php?list=freebsd-usb&id=2709973 >> and see that ukbd attaches along with ums before mountroot. >> >> I look at newer dmesg and I see that ums attaches at about the same time >> as before but ukbd consistently attaches after mountroot. >> I wonder what might cause such behavior and how to fix it. >> I definitely would like to see ukbd attach before mountroot, I can debug >> this issue, but need some hints on where to start. > > I haven't been following this thread, and I'm pretty sleepy right now, > so sorry if this is irrelevant, but I had a somewhat similar problem > that was fixed by adding > > hint.atkbd.0.flags="0x1" > > to /boot/device.hints . > I can try this, but I think this wouldn't help for two reasons: 1. I already tried kernel without atkb at all 2. if ukbd driver is not attached then I don't see any way USB keyboard would work in non-legacy way Anyway I will try this, thank you. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:18:36 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D98DC1065678; Wed, 12 Nov 2008 12:18:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id B9CD28FC12; Wed, 12 Nov 2008 12:18:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mACBrp611316; Wed, 12 Nov 2008 03:53:51 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mACBrpl17181; Wed, 12 Nov 2008 03:53:51 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Wed, 12 Nov 2008 03:53:51 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Andriy Gapon In-Reply-To: <491ABFCD.3060309@icyb.net.ua> Message-ID: References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:18:37 -0000 On Wed, 12 Nov 2008, Andriy Gapon wrote: > on 05/11/2008 17:24 Andriy Gapon said the following: [...] >> I have a legacy-free system (no PS/2 ports, only USB) and I wanted to >> try a kernel without atkbd and psm (with ums, ukbd, kbdmux), but was >> bitten hard when I made a mistake and kernel could not find/mount root >> filesystem. >> >> So I stuck at mountroot prompt without a keyboard to enter anything. >> This was repeatable about 10 times after which I resorted to live cd. >> >> Since then I put back atkbdc into my kernel. I guess BIOS or USB >> hardware emulate AT or PS/2 keyboard, so the USB keyboard works before >> the driver attaches. I guess I need such emulation e.g. for loader or >> boot0 configuration. But I guess I don't have to have atkbd driver in >> kernel. > > This turned out not to be a complete solution as it seems that there are > some quirks about legacy USB here, sometimes keyboard stops working even > at loader prompt (this is described in a different thread). > > ukbd attachment still puzzles me a lot. > I look at some older dmesg, e.g. this 7.0-RELEASE one: > http://www.mavetju.org/mail/view_message.php?list=freebsd-usb&id=2709973 > and see that ukbd attaches along with ums before mountroot. > > I look at newer dmesg and I see that ums attaches at about the same time > as before but ukbd consistently attaches after mountroot. > I wonder what might cause such behavior and how to fix it. > I definitely would like to see ukbd attach before mountroot, I can debug > this issue, but need some hints on where to start. I haven't been following this thread, and I'm pretty sleepy right now, so sorry if this is irrelevant, but I had a somewhat similar problem that was fixed by adding hint.atkbd.0.flags="0x1" to /boot/device.hints . -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:20:46 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 083F91065679; Wed, 12 Nov 2008 12:20:46 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5388FC08; Wed, 12 Nov 2008 12:20:44 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA16630; Wed, 12 Nov 2008 14:20:42 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491ACA19.2040008@icyb.net.ua> Date: Wed, 12 Nov 2008 14:20:41 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Jeremy Chadwick References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> In-Reply-To: <20081112121410.GA24629@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:20:46 -0000 on 12/11/2008 14:14 Jeremy Chadwick said the following: > On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: [snip] >> 2. if ukbd driver is not attached then I don't see any way USB keyboard >> would work in non-legacy way > > Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 > keyboard to work. None of these stages use ukbd(4) or anything -- there > is no kernel loaded at this point!! Meaning: if you have a USB keyboard, > your BIOS will need to have a "USB Legacy" option to cause it to act as > a PS/2 keyboard, for typing in boot0/boot2/loader to work. > > Device hints are for kernel drivers, once the kernel is loaded. Jeremy, I understand all of this. In subject line and earlier messages I say that I am interested in mountroot prompt - the prompt where kernel can ask about what device to use for root filesystem. Essentially I would like kernel to recognize USB keyboard (and disable all the legacy stuff if needed) before it prompts for the root device. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:30:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3441065674 for ; Wed, 12 Nov 2008 12:30:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id 4752D8FC18 for ; Wed, 12 Nov 2008 12:30:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id eBPA1a00Q0EPchoA8CEB4a; Wed, 12 Nov 2008 12:14:11 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA01.emeryville.ca.mail.comcast.net with comcast id eCEA1a0042P6wsM8MCEAlr; Wed, 12 Nov 2008 12:14:11 +0000 X-Authority-Analysis: v=1.0 c=1 a=aarVl-9CAAAA:8 a=QycZ5dHgAAAA:8 a=HTTBBloA31bZZr2vb6AA:9 a=JxNATzhhykdpcfkF6iVXLfSzFeMA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 6B14E5C1A; Wed, 12 Nov 2008 04:14:10 -0800 (PST) Date: Wed, 12 Nov 2008 04:14:10 -0800 From: Jeremy Chadwick To: Andriy Gapon Message-ID: <20081112121410.GA24629@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491AC502.9000507@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Nate Eldredge , freebsd-hackers@freebsd.org, FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:30:11 -0000 On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: > on 12/11/2008 13:53 Nate Eldredge said the following: > > On Wed, 12 Nov 2008, Andriy Gapon wrote: > > > >> on 05/11/2008 17:24 Andriy Gapon said the following: > > [...] > >>> I have a legacy-free system (no PS/2 ports, only USB) and I wanted to > >>> try a kernel without atkbd and psm (with ums, ukbd, kbdmux), but was > >>> bitten hard when I made a mistake and kernel could not find/mount root > >>> filesystem. > >>> > >>> So I stuck at mountroot prompt without a keyboard to enter anything. > >>> This was repeatable about 10 times after which I resorted to live cd. > >>> > >>> Since then I put back atkbdc into my kernel. I guess BIOS or USB > >>> hardware emulate AT or PS/2 keyboard, so the USB keyboard works before > >>> the driver attaches. I guess I need such emulation e.g. for loader or > >>> boot0 configuration. But I guess I don't have to have atkbd driver in > >>> kernel. > >> > >> This turned out not to be a complete solution as it seems that there are > >> some quirks about legacy USB here, sometimes keyboard stops working even > >> at loader prompt (this is described in a different thread). > >> > >> ukbd attachment still puzzles me a lot. > >> I look at some older dmesg, e.g. this 7.0-RELEASE one: > >> http://www.mavetju.org/mail/view_message.php?list=freebsd-usb&id=2709973 > >> and see that ukbd attaches along with ums before mountroot. > >> > >> I look at newer dmesg and I see that ums attaches at about the same time > >> as before but ukbd consistently attaches after mountroot. > >> I wonder what might cause such behavior and how to fix it. > >> I definitely would like to see ukbd attach before mountroot, I can debug > >> this issue, but need some hints on where to start. > > > > I haven't been following this thread, and I'm pretty sleepy right now, > > so sorry if this is irrelevant, but I had a somewhat similar problem > > that was fixed by adding > > > > hint.atkbd.0.flags="0x1" > > > > to /boot/device.hints . To those reading, the above setting enables the following option: bit 0 (FAIL_IF_NO_KBD) By default the atkbd driver will install even if a keyboard is not actually connected to the system. This option prevents the driver from being installed in this situation. > I can try this, but I think this wouldn't help for two reasons: > 1. I already tried kernel without atkb at all > 2. if ukbd driver is not attached then I don't see any way USB keyboard > would work in non-legacy way Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 keyboard to work. None of these stages use ukbd(4) or anything -- there is no kernel loaded at this point!! Meaning: if you have a USB keyboard, your BIOS will need to have a "USB Legacy" option to cause it to act as a PS/2 keyboard, for typing in boot0/boot2/loader to work. Device hints are for kernel drivers, once the kernel is loaded. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:33:16 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C08481065673 for ; Wed, 12 Nov 2008 12:33:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id A88688FC16 for ; Wed, 12 Nov 2008 12:33:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id eAXe1a00A0vp7WLA8CZGDW; Wed, 12 Nov 2008 12:33:16 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA05.emeryville.ca.mail.comcast.net with comcast id eCZF1a00B2P6wsM8RCZGvm; Wed, 12 Nov 2008 12:33:16 +0000 X-Authority-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=XZrmyMB4JYGd_-K7JrwA:9 a=tBf9LV8KMpQLkPyohSoA:7 a=cY6_MBOsBNGUNeLVBIN5XP9PPJ8A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id B20FB5C19; Wed, 12 Nov 2008 04:33:15 -0800 (PST) Date: Wed, 12 Nov 2008 04:33:15 -0800 From: Jeremy Chadwick To: Andriy Gapon Message-ID: <20081112123315.GA24907@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491ACA19.2040008@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:33:16 -0000 On Wed, Nov 12, 2008 at 02:20:41PM +0200, Andriy Gapon wrote: > on 12/11/2008 14:14 Jeremy Chadwick said the following: > > On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: > [snip] > >> 2. if ukbd driver is not attached then I don't see any way USB keyboard > >> would work in non-legacy way > > > > Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 > > keyboard to work. None of these stages use ukbd(4) or anything -- there > > is no kernel loaded at this point!! Meaning: if you have a USB keyboard, > > your BIOS will need to have a "USB Legacy" option to cause it to act as > > a PS/2 keyboard, for typing in boot0/boot2/loader to work. > > > > Device hints are for kernel drivers, once the kernel is loaded. > > Jeremy, > > I understand all of this. > In subject line and earlier messages I say that I am interested in > mountroot prompt - the prompt where kernel can ask about what device to > use for root filesystem. > Essentially I would like kernel to recognize USB keyboard (and disable > all the legacy stuff if needed) before it prompts for the root device. I fully understand that fact. However, I don't see the logic in that statement. You should be able to remove and add a keyboard at any time and be able to type immediately. Meaning: I don't see why when the keyboard recognition is performed (e.g. before printing mountroot or after) matters. It should not. I think this is a red herring. I've seen the problem where I have a fully functional USB keyboard in boot0/boot2/loader and in multi-user, but when booting into single-user or when getting a mountroot prompt, the keyboard does not function. When the mountroot prompt is printed (before or after ukbd attached) makes no difference for me in this scenario -- I tested it many times. It's very possible that "something" (kbdcontrol?) is getting run only during late stages of multi-user, which makes the keyboard work. But prior to that "something" being run (but AFTER boot2/loader), the keyboard is not truly usable. I hope everyone here is also aware of that fact that not all keyboards are created equal. Case in point (and this reason is exactly why I am purchasing a native PS/2 keyboard, as USB4BSD doesn't work with all USB keyboards right now): http://lists.freebsd.org/pipermail/freebsd-current/2008-November/000219.html The bottom line: FreeBSD cannot be reliably used with a USB keyboard in all circumstances. And that is a very sad reality, because 90% of the keyboards you find on the consumer and enterprise market are USB -- native PS/2 keyboards are now a scarcity. Do not even for a minute tell me "buy a USB-to-PS2 adapter", because the "green ones" that come with USB mice do not work with USB keyboards. I have even bought a "purple" USB-to-PS2 keyboard adapter from Amazon, specifically for this purpose, and it *does not work*. I found out weeks later the adapters only work on CERTAIN models of USB keyboards, depending upon how they're engineered. What really needs to happen here should be obvious: we need some form of inexpensive keyboard-only USB support in boot2/loader. I would *love* to know how Linux and Windows solve this problem. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:49:20 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFFE106567E; Wed, 12 Nov 2008 12:49:20 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 527958FC13; Wed, 12 Nov 2008 12:49:17 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA17199; Wed, 12 Nov 2008 14:49:16 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491AD0CB.8050309@icyb.net.ua> Date: Wed, 12 Nov 2008 14:49:15 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Jeremy Chadwick References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> In-Reply-To: <20081112123315.GA24907@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:49:20 -0000 on 12/11/2008 14:33 Jeremy Chadwick said the following: > On Wed, Nov 12, 2008 at 02:20:41PM +0200, Andriy Gapon wrote: >> on 12/11/2008 14:14 Jeremy Chadwick said the following: >>> On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: >> [snip] >>>> 2. if ukbd driver is not attached then I don't see any way USB keyboard >>>> would work in non-legacy way >>> Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 >>> keyboard to work. None of these stages use ukbd(4) or anything -- there >>> is no kernel loaded at this point!! Meaning: if you have a USB keyboard, >>> your BIOS will need to have a "USB Legacy" option to cause it to act as >>> a PS/2 keyboard, for typing in boot0/boot2/loader to work. >>> >>> Device hints are for kernel drivers, once the kernel is loaded. >> Jeremy, >> >> I understand all of this. >> In subject line and earlier messages I say that I am interested in >> mountroot prompt - the prompt where kernel can ask about what device to >> use for root filesystem. >> Essentially I would like kernel to recognize USB keyboard (and disable >> all the legacy stuff if needed) before it prompts for the root device. > > I fully understand that fact. However, I don't see the logic in that > statement. You should be able to remove and add a keyboard at any time > and be able to type immediately. Meaning: I don't see why when the > keyboard recognition is performed (e.g. before printing mountroot or > after) matters. It should not. I think this is a red herring. I think that this does matter because keyboard recognition is performed after the 'mounting from' log line *only if* root mount is done automatically. If there is an actual interactive prompt then recognition is not performed, at least I do not see any relevant lines on the screen and I am stuck at the prompt. > I've seen the problem where I have a fully functional USB keyboard in > boot0/boot2/loader For me it even randomly dies at these stages. I reported this in a different thread. But this should not be related to kernel behavior. >and in multi-user, For me this always works. > but when booting into single-user For me this always works. > or when getting a mountroot prompt, the keyboard does not function. > When the mountroot prompt is printed (before or after ukbd attached) > makes no difference for me in this scenario -- I tested it many times. For me ukbd lines are never printed if I get actual interactive mountroot prompt. > It's very possible that "something" (kbdcontrol?) is getting run only > during late stages of multi-user, which makes the keyboard work. But > prior to that "something" being run (but AFTER boot2/loader), the > keyboard is not truly usable. For me this is not true. My keyboard always works after ukbd lines appear on screen. > I hope everyone here is also aware of that fact that not all keyboards > are created equal. Case in point (and this reason is exactly why I > am purchasing a native PS/2 keyboard, as USB4BSD doesn't work with > all USB keyboards right now): For me this is not an option, no PS/2 ports. > http://lists.freebsd.org/pipermail/freebsd-current/2008-November/000219.html > > The bottom line: > > FreeBSD cannot be reliably used with a USB keyboard in all > circumstances.And that is a very sad reality, because 90% of the > keyboards you find on the consumer and enterprise market are USB -- > native PS/2 keyboards are now a scarcity. I agree that this is a sad reality but only for boot stages where we depend on external entity named BIOS to help us. This doesn't have to be a sad reality once kernel takes control. USB support in boot chain - I don't know - this would be great of course but that's a lot of code. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 13:21:25 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E709D106567F for ; Wed, 12 Nov 2008 13:21:25 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id CF50B8FC17 for ; Wed, 12 Nov 2008 13:21:25 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by QMTA09.emeryville.ca.mail.comcast.net with comcast id eCGN1a0061HpZEsA9DMR7i; Wed, 12 Nov 2008 13:21:25 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA14.emeryville.ca.mail.comcast.net with comcast id eDMQ1a00A2P6wsM8aDMQ4W; Wed, 12 Nov 2008 13:21:25 +0000 X-Authority-Analysis: v=1.0 c=1 a=_W5frmRxAAAA:8 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=2lWE_imY3XTQs1vxiW4A:9 a=1T7QYldBgFax1CoTx-0A:7 a=KfhU-U27iizIc1WJhpv8hk7dyfkA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id A0EE15C19; Wed, 12 Nov 2008 05:21:24 -0800 (PST) Date: Wed, 12 Nov 2008 05:21:24 -0800 From: Jeremy Chadwick To: Andriy Gapon Message-ID: <20081112132124.GA25637@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> <491AD0CB.8050309@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491AD0CB.8050309@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:21:26 -0000 On Wed, Nov 12, 2008 at 02:49:15PM +0200, Andriy Gapon wrote: > on 12/11/2008 14:33 Jeremy Chadwick said the following: > > On Wed, Nov 12, 2008 at 02:20:41PM +0200, Andriy Gapon wrote: > >> on 12/11/2008 14:14 Jeremy Chadwick said the following: > >>> On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: > >> [snip] > >>>> 2. if ukbd driver is not attached then I don't see any way USB keyboard > >>>> would work in non-legacy way > >>> Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 > >>> keyboard to work. None of these stages use ukbd(4) or anything -- there > >>> is no kernel loaded at this point!! Meaning: if you have a USB keyboard, > >>> your BIOS will need to have a "USB Legacy" option to cause it to act as > >>> a PS/2 keyboard, for typing in boot0/boot2/loader to work. > >>> > >>> Device hints are for kernel drivers, once the kernel is loaded. > >> Jeremy, > >> > >> I understand all of this. > >> In subject line and earlier messages I say that I am interested in > >> mountroot prompt - the prompt where kernel can ask about what device to > >> use for root filesystem. > >> Essentially I would like kernel to recognize USB keyboard (and disable > >> all the legacy stuff if needed) before it prompts for the root device. > > > > I fully understand that fact. However, I don't see the logic in that > > statement. You should be able to remove and add a keyboard at any time > > and be able to type immediately. Meaning: I don't see why when the > > keyboard recognition is performed (e.g. before printing mountroot or > > after) matters. It should not. I think this is a red herring. > > I think that this does matter because keyboard recognition is performed > after the 'mounting from' log line *only if* root mount is done > automatically. > If there is an actual interactive prompt then recognition is not > performed, at least I do not see any relevant lines on the screen and I > am stuck at the prompt. > > > I've seen the problem where I have a fully functional USB keyboard in > > boot0/boot2/loader > > For me it even randomly dies at these stages. > I reported this in a different thread. > But this should not be related to kernel behavior. > > >and in multi-user, > > For me this always works. > > > but when booting into single-user > > For me this always works. > > > or when getting a mountroot prompt, the keyboard does not function. > > When the mountroot prompt is printed (before or after ukbd attached) > > makes no difference for me in this scenario -- I tested it many times. > > For me ukbd lines are never printed if I get actual interactive > mountroot prompt. > > > It's very possible that "something" (kbdcontrol?) is getting run only > > during late stages of multi-user, which makes the keyboard work. But > > prior to that "something" being run (but AFTER boot2/loader), the > > keyboard is not truly usable. > > For me this is not true. My keyboard always works after ukbd lines > appear on screen. I've pointed you to evidence where this isn't true, especially when using the USB4BSD stack. There is something called "boot legacy protocol" which USB keyboards have to support to properly be interfaced with in FreeBSD using the USB4BSD stack; in the case of the Microsoft Natural Ergo 4000 keyboard, it does not play well with USB4BSD (it DOES work with the old USB stack, but none of the multimedia keys work, and worse, the F-Lock key does not work; this is because those keys use uhid(4) and not ukbd(4)). Linux has a __20 page Wiki document__ on **just this keyboard**. That should give you some idea of how complex the situation with USB keyboards is in general. http://www.gentoo-wiki.info/HOWTO_Microsoft_Natural_Ergonomic_Keyboard_4000 > > I hope everyone here is also aware of that fact that not all keyboards > > are created equal. Case in point (and this reason is exactly why I > > am purchasing a native PS/2 keyboard, as USB4BSD doesn't work with > > all USB keyboards right now): > > For me this is not an option, no PS/2 ports. I don't know what to say to ***ANY*** of the above, other than this: No one is doing anything about this problem because there does not appear to be a 100% reproducible always-screws-up-when-I-do-this scenario that happens to *every FreeBSD user*. Until we settle down, stop replying to Emails with one-liner injections, and compile a list of test scenarios/cases that people can perform, and get these people to provide both 1) full hardware details, 2) full kernel configuration files, 3) full loader.conf files, and 4) full device.hints files, we're not going to get anywhere. > > http://lists.freebsd.org/pipermail/freebsd-current/2008-November/000219.html > > > > The bottom line: > > > > FreeBSD cannot be reliably used with a USB keyboard in all > > circumstances.And that is a very sad reality, because 90% of the > > keyboards you find on the consumer and enterprise market are USB -- > > native PS/2 keyboards are now a scarcity. > > I agree that this is a sad reality but only for boot stages where we > depend on external entity named BIOS to help us. > This doesn't have to be a sad reality once kernel takes control. It's been confirmed by numerous people now, including #bsdports users, that "USB Legacy" does not work for some individuals. This is either because of BIOS bugs, or because the USB keyboards do not support tying into SMM. We don't know the true cause. One thing we do know: we have FreeBSD users stating they cannot type in boot0/boot2/loader, even with USB Legacy enabled, so going into single-user after a reboot is impossible. Another thing we do know: we have FreeBSD users who do not have fully functional USB keyboards in FreeBSD (some see ukbd attach, others do not; some are using USB4BSD, others are not). So, can someone take the time to come up with test scenarios/cases so that users can perform these tests, list off the exact hardware they have, and we can see if there is a consistent/common failure between everyone? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 13:33:35 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 170E8106564A; Wed, 12 Nov 2008 13:33:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EA11D8FC08; Wed, 12 Nov 2008 13:33:34 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from freefall.freebsd.org (cperciva@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mACDXY5h095226; Wed, 12 Nov 2008 13:33:34 GMT (envelope-from cperciva@freefall.freebsd.org) Received: (from cperciva@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mACDXYOZ095222; Wed, 12 Nov 2008 13:33:34 GMT (envelope-from cperciva) Date: Wed, 12 Nov 2008 13:33:34 GMT Message-Id: <200811121333.mACDXYOZ095222@freefall.freebsd.org> To: devet@devet.org, cperciva@FreeBSD.org, freebsd-usb@FreeBSD.org, cperciva@FreeBSD.org From: cperciva@FreeBSD.org Cc: Subject: Re: usb/128760: [ums] patch for Microsoft Comfort Optical Mouse 3000 (model 1043) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:33:35 -0000 Synopsis: [ums] patch for Microsoft Comfort Optical Mouse 3000 (model 1043) State-Changed-From-To: open->patched State-Changed-By: cperciva State-Changed-When: Wed Nov 12 13:32:58 UTC 2008 State-Changed-Why: Fixed in HEAD Responsible-Changed-From-To: freebsd-usb->cperciva Responsible-Changed-By: cperciva Responsible-Changed-When: Wed Nov 12 13:32:58 UTC 2008 Responsible-Changed-Why: Fixed in HEAD http://www.freebsd.org/cgi/query-pr.cgi?pr=128760 From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 13:33:52 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D45106564A; Wed, 12 Nov 2008 13:33:52 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E65A38FC24; Wed, 12 Nov 2008 13:33:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA17993; Wed, 12 Nov 2008 15:33:49 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <491ADB3B.2090000@icyb.net.ua> Date: Wed, 12 Nov 2008 15:33:47 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: Jeremy Chadwick References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> <491AD0CB.8050309@icyb.net.ua> <20081112132124.GA25637@icarus.home.lan> In-Reply-To: <20081112132124.GA25637@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:33:52 -0000 on 12/11/2008 15:21 Jeremy Chadwick said the following: > I don't know what to say to ***ANY*** of the above, other than this: > > No one is doing anything about this problem because there does not > appear to be a 100% reproducible always-screws-up-when-I-do-this > scenario that happens to *every FreeBSD user*. > > Until we settle down, stop replying to Emails with one-liner injections, > and compile a list of test scenarios/cases that people can perform, and > get these people to provide both 1) full hardware details, 2) full > kernel configuration files, 3) full loader.conf files, and 4) full > device.hints files, we're not going to get anywhere. Well I started two separate threads. This thread is about one very specific issue - ukbd attaching after mountroot code. Again, in this thread I am only interested in getting ukbd to attach before the mount root. I am not interested in BIOS, boot chain, etc. I am not even interested in speculations about whether keyboard would work or not at mountroot prompt if it were attaching before it. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 14:11:53 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89855106564A; Wed, 12 Nov 2008 14:11:53 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by mx1.freebsd.org (Postfix) with ESMTP id 687308FC0A; Wed, 12 Nov 2008 14:11:53 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from verizon.net ([63.28.162.53]) by vms173007.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KA8003HB1XVGIB9@vms173007.mailsrvcs.net>; Wed, 12 Nov 2008 07:10:46 -0600 (CST) Date: Wed, 12 Nov 2008 08:18:51 -0500 From: Sergey Babkin Sender: root To: Jeremy Chadwick Message-id: <491AD7BB.2EAA9AA0@verizon.net> MIME-version: 1.0 X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en, ru References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> X-Mailman-Approved-At: Wed, 12 Nov 2008 16:48:07 +0000 Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , Andriy Gapon , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 14:11:53 -0000 Jeremy Chadwick wrote: > > What really needs to happen here should be obvious: we need some form of > inexpensive keyboard-only USB support in boot2/loader. > > I would *love* to know how Linux and Windows solve this problem. If I remember right, UnixWare used(s) the BIOS calls in the loader. -SB From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 16:52:30 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54B451065698; Wed, 12 Nov 2008 16:52:30 +0000 (UTC) (envelope-from nakal@web.de) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by mx1.freebsd.org (Postfix) with ESMTP id 121B78FC2D; Wed, 12 Nov 2008 16:52:29 +0000 (UTC) (envelope-from nakal@web.de) Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 6A97DF456846; Wed, 12 Nov 2008 17:52:28 +0100 (CET) Received: from [217.236.27.27] (helo=zelda.local) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1L0IxA-000655-00; Wed, 12 Nov 2008 17:52:28 +0100 Date: Wed, 12 Nov 2008 17:52:17 +0100 From: Martin To: pluknet Message-ID: <20081112175217.1b37caf1@zelda.local> In-Reply-To: References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <20081111213344.6657548c@zelda.local> X-Mailer: Claws Mail 3.6.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/MjH/MToqh=oqojIix.cpuLL"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Sender: nakal@web.de X-Sender: nakal@web.de X-Provags-ID: V01U2FsdGVkX19UlOCxKlXLMxuXngazc8BiH2XMAsCg2h2cFc50 5KbUQEBFHypeYIOAS2TNabc3bfMqEvYdyK4GnPnsMHsaCROeoE /AXGhH6J4= Cc: Volker , Stable , freebsd-usb@freebsd.org, Peter Wemm , Andriy Gapon Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 16:52:30 -0000 --Sig_/MjH/MToqh=oqojIix.cpuLL Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Wed, 12 Nov 2008 12:36:19 +0300 schrieb pluknet : > I have the same problem with my ukbd&ums: > they are power off'ed during the boot and I should to re-attach them . > MB: Asus p5k. Hi, I've noticed one thing today. I can switch off USB-Keyboard support in my BIOS. In this case, I cannot use my keyboard during boot prompt, but FreeBSD at least initializes the USB-controller correctly, so I can use it later when entering my geli partition password. It seems the BIOS on some mainboards puts the USB controller in a state from which FreeBSD cannot initialize the hardware anymore. And, let's not forget, there is the second problem with devices that suddenly power off at apparently random times. -- Martin --Sig_/MjH/MToqh=oqojIix.cpuLL Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkbCckACgkQC3yNaKlBCg1YKgCfTRPG6yRo4bxA8GjPrHA02U45 d28AnA2r2gyaeiMtH6zFE0ri99TzUMT/ =gMbX -----END PGP SIGNATURE----- --Sig_/MjH/MToqh=oqojIix.cpuLL-- From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 17:30:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 638541065670; Wed, 12 Nov 2008 17:30:17 +0000 (UTC) (envelope-from nakal@web.de) Received: from fmmailgate01.web.de (fmmailgate01.web.de [217.72.192.221]) by mx1.freebsd.org (Postfix) with ESMTP id A56DA8FC0A; Wed, 12 Nov 2008 17:30:16 +0000 (UTC) (envelope-from nakal@web.de) Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id 101FEF97A08E; Wed, 12 Nov 2008 18:30:15 +0100 (CET) Received: from [217.236.27.27] (helo=zelda.local) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1L0JXi-00024g-00; Wed, 12 Nov 2008 18:30:14 +0100 Date: Wed, 12 Nov 2008 18:30:12 +0100 From: Martin To: Jeremy Chadwick Message-ID: <20081112183012.57af6eb5@zelda.local> In-Reply-To: <20081112132124.GA25637@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> <491AD0CB.8050309@icyb.net.ua> <20081112132124.GA25637@icarus.home.lan> X-Mailer: Claws Mail 3.6.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: nakal@web.de X-Sender: nakal@web.de X-Provags-ID: V01U2FsdGVkX1/acbvjZK9J7Loya0JHgQ2FU/HIdANhopoXZvEL /Yfr2grVu+T234KfGavKbd45/Be5PP0hgdDwVh5hN2IAFrfrDf sqxa8D3qs= Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , Andriy Gapon , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 17:30:17 -0000 Am Wed, 12 Nov 2008 05:21:24 -0800 schrieb Jeremy Chadwick : > Until we settle down, stop replying to Emails with one-liner > injections, and compile a list of test scenarios/cases that people > can perform, and get these people to provide both 1) full hardware > details, 2) full kernel configuration files, 3) full loader.conf > files, and 4) full device.hints files, we're not going to get > anywhere. Ok, I will add the details for the GA-EP45-DS3R based system. 1) dmesg Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.1-PRERELEASE #0: Mon Nov 10 08:23:21 CET 2008 root@kirby:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz (3166.32-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x10676 Stepping = 6 Features=0xbfebfbff Features2=0x8e3fd> AMD Features=0x20100800 AMD Features2=0x1 Cores per package: 2 usable memory = 8574255104 (8177 MB) avail memory = 8286810112 (7902 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, cfdb0000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0xa000-0xa0ff mem 0xd0000000-0xdfffffff,0xe5000000-0xe500ffff irq 16 at device 0.0 on pci1 pcm0: mem 0xe5010000-0xe5013fff irq 17 at device 0.1 on pci1 pcm0: [ITHREAD] uhci0: port 0xe000-0xe01f irq 16 at device 26.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xe100-0xe11f irq 21 at device 26.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xe200-0xe21f irq 18 at device 26.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered ehci0: mem 0xe9305000-0xe93053ff irq 18 at device 26.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb3: EHCI version 1.0 usb3: companion controllers, 2 ports each: usb0 usb1 usb2 usb3: on ehci0 usb3: USB revision 2.0 uhub3: on usb3 uhub3: 6 ports with 6 removable, self powered pcm1: mem 0xe9300000-0xe9303fff irq 22 at device 27.0 on pci0 pcm1: [ITHREAD] pcib2: irq 16 at device 28.0 on pci0 pci2: on pcib2 pcib3: irq 19 at device 28.3 on pci0 pci3: on pcib3 atapci0: port 0xb000-0xb007,0xb100-0xb103,0xb200-0xb207,0xb300-0xb303,0xb400-0xb40f irq 19 at device 0.0 on pci3 atapci0: [ITHREAD] ata2: on atapci0 ata2: [ITHREAD] pcib4: irq 16 at device 28.4 on pci0 pci4: on pcib4 re0: port 0xc000-0xc0ff mem Ethernet> 0xe9010000-0xe9010fff,0xe9000000-0xe900ffff irq 16 at device Ethernet> 0.0 on pci4 re0: Chip rev. 0x3c000000 re0: MAC rev. 0x00400000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re0: Ethernet address: 00:1f:d0:24:96:ab re0: [FILTER] pcib5: irq 17 at device 28.5 on pci0 pci5: on pcib5 re1: port 0xd000-0xd0ff mem Ethernet> 0xe9110000-0xe9110fff,0xe9100000-0xe910ffff irq 17 at device Ethernet> 0.0 on pci5 re1: Chip rev. 0x3c000000 re1: MAC rev. 0x00400000 miibus1: on re1 rgephy1: PHY 1 on miibus1 rgephy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re1: Ethernet address: 00:1f:d0:24:96:a9 re1: [FILTER] uhci3: port 0xe300-0xe31f irq 23 at device 29.0 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb4: on uhci3 usb4: USB revision 1.0 uhub4: on usb4 uhub4: 2 ports with 2 removable, self powered uhci4: port 0xe400-0xe41f irq 19 at device 29.1 on pci0 uhci4: [GIANT-LOCKED] uhci4: [ITHREAD] usb5: on uhci4 usb5: USB revision 1.0 uhub5: on usb5 uhub5: 2 ports with 2 removable, self powered uhci5: port 0xe500-0xe51f irq 18 at device 29.2 on pci0 uhci5: [GIANT-LOCKED] uhci5: [ITHREAD] usb6: on uhci5 usb6: USB revision 1.0 uhub6: on usb6 uhub6: 2 ports with 2 removable, self powered ehci1: mem 0xe9304000-0xe93043ff irq 23 at device 29.7 on pci0 ehci1: [GIANT-LOCKED] ehci1: [ITHREAD] usb7: EHCI version 1.0 usb7: companion controllers, 2 ports each: usb4 usb5 usb6 usb7: on ehci1 usb7: USB revision 2.0 uhub7: on usb7 uhub7: 6 ports with 6 removable, self powered pcib6: at device 30.0 on pci0 pci6: on pcib6 fwohci0: mem 0xe9204000-0xe92047ff,0xe9200000-0xe9203fff irq 23 at device 7.0 on pci6 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:2c:a1:59:00:00:1f:d0 fwohci0: Phy 1394a available S400, 3 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:2c:a1:00:1f:d0 fwe0: Ethernet address: 02:2c:a1:00:1f:d0 fwip0: on firewire0 fwip0: Firewire address: 00:2c:a1:59:00:00:1f:d0 @ 0xfffe00000000, S400, maxrec 2048 sbp0: on firewire0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0xcf2b4000 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode isab0: at device 31.0 on pci0 isa0: on isab0 atapci1: port 0xe600-0xe607,0xe700-0xe703,0xe800-0xe807,0xe900-0xe903,0xea00-0xea1f mem 0xe9306000-0xe93067ff irq 19 at device 31.2 on pci0 atapci1: [ITHREAD] atapci1: AHCI Version 01.20 controller with 6 ports detected ata3: on atapci1 ata3: [ITHREAD] ata4: on atapci1 ata4: [ITHREAD] ata5: on atapci1 ata5: [ITHREAD] ata6: on atapci1 ata6: [ITHREAD] ata7: on atapci1 ata7: [ITHREAD] ata8: on atapci1 ata8: [ITHREAD] pci0: at device 31.3 (no driver attached) fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 ppbus0: [ITHREAD] plip0: on ppbus0 plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ppc0: [ITHREAD] cpu0: on acpi0 est0: on cpu0 est: CPU supports Enhanced Speedstep, but is not recognized. est: cpu_vendor GenuineIntel, msr 61a492006004920 device_attach: est0 attach returned 6 p4tcc0: on cpu0 cpu1: on acpi0 est1: on cpu1 est: CPU supports Enhanced Speedstep, but is not recognized. est: cpu_vendor GenuineIntel, msr 61a492006004920 device_attach: est1 attach returned 6 p4tcc1: on cpu1 orm0: at iomem 0xd0000-0xd1fff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ukbd0: on uhub2 kbd2 at ukbd0 uhid0: on uhub2 ums0: on uhub2 ums0: 8 buttons and Z dir. Timecounters tick every 1.000 msec firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ad6: 476938MB at ata3-master SATA300 GEOM_JOURNAL: Journal 3939325718: ad6s1f contains data. GEOM_JOURNAL: Journal 3939325718: ad6s1f contains journal. GEOM_JOURNAL: Journal ad6s1f clean. acd0: DVDR at ata4-master SATA150 pcm0: pcm0: pcm1: pcm1: SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ad6s1a cryptosoft0: on motherboard GEOM_ELI: Device ad6s1g.eli created. GEOM_ELI: Encryption: Blowfish-CBC 448 GEOM_ELI: Crypto: software GEOM_JOURNAL: Journal 2001271740: ad6s1g.eli contains data. GEOM_JOURNAL: Journal 2001271740: ad6s1g.eli contains journal. GEOM_JOURNAL: Journal ad6s1g.eli clean. GEOM_ELI: Device ad6s1b.eli created. GEOM_ELI: Encryption: AES-CBC 256 GEOM_ELI: Crypto: software 2) As you can see above, GENERIC (here stable, but also occurs on BETA2). 3) loader.conf: acpi_load="YES" acpi_video_load="YES" beastie_disable="YES" geom_journal_load="YES" #smb_load="YES" #smbus_load="YES" #ichsmb_load="YES" snd_hda_load="YES" #aio_load="YES" #kqemu_load="YES" kern.cam.scsi_delay=1000 autoboot_delay=3 linux_load="YES" linprocfs_load="YES" linsysfs_load="YES" 4) device.hints unchanged. > It's been confirmed by numerous people now, including #bsdports users, > that "USB Legacy" does not work for some individuals. This is either > because of BIOS bugs, or because the USB keyboards do not support > tying into SMM. We don't know the true cause. I'm not sure, if every BIOS has got such a setting. I'm not fully sure, if this is a BIOS bug. It could be, of course. Gigabyte has released BIOS firmware updates that are not usable, until one installs Windows (the changes history does not mention any USB fixes though). It will take some time until I can patch the firmware. > One thing we do know: we have FreeBSD users stating they cannot type > in boot0/boot2/loader, even with USB Legacy enabled, so going into > single-user after a reboot is impossible. > > Another thing we do know: we have FreeBSD users who do not have fully > functional USB keyboards in FreeBSD (some see ukbd attach, others do > not; some are using USB4BSD, others are not). Yes. These are 3 different problems. 1) No keyboard in bootloader => missing BIOS USB support. 2) No keyboard after USB controller initialisation => missing quirks? 3) No keyboard spontaneously while working => bug? > So, can someone take the time to come up with test scenarios/cases so > that users can perform these tests, list off the exact hardware they > have, and we can see if there is a consistent/common failure between > everyone? If you need anything more, I can try to deliver the information. I sometimes run out of ideas how to avoid annoying the developers. :) (In other words, I have more problems to report waiting in the queue...) ;) -- Martin From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 18:04:37 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FFDA1065670; Wed, 12 Nov 2008 18:04:37 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 26DB98FC12; Wed, 12 Nov 2008 18:04:37 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 476836D43F; Wed, 12 Nov 2008 17:48:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 3391284493; Wed, 12 Nov 2008 18:48:29 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Sergey Babkin References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> <20081112123315.GA24907@icarus.home.lan> <491AD7BB.2EAA9AA0@verizon.net> Date: Wed, 12 Nov 2008 18:48:29 +0100 In-Reply-To: <491AD7BB.2EAA9AA0@verizon.net> (Sergey Babkin's message of "Wed, 12 Nov 2008 08:18:51 -0500") Message-ID: <86iqqsx2c2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Stable , freebsd-hackers@FreeBSD.org, Jeremy Chadwick , Andriy Gapon , freebsd-usb@FreeBSD.org, Nate Eldredge Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 18:04:37 -0000 Sergey Babkin writes: > Jeremy Chadwick writes: > > What really needs to happen here should be obvious: we need some > > form of inexpensive keyboard-only USB support in boot2/loader. > If I remember right, UnixWare used(s) the BIOS calls in the loader. So does FreeBSD. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-usb@FreeBSD.ORG Thu Nov 13 18:10:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1A81065689 for ; Thu, 13 Nov 2008 18:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 30F6D8FC22 for ; Thu, 13 Nov 2008 18:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mADIA7Vg043072 for ; Thu, 13 Nov 2008 18:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mADIA7a0043070; Thu, 13 Nov 2008 18:10:07 GMT (envelope-from gnats) Resent-Date: Thu, 13 Nov 2008 18:10:07 GMT Resent-Message-Id: <200811131810.mADIA7a0043070@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Patrick Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D22681065678 for ; Thu, 13 Nov 2008 18:09:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id BFFDA8FC13 for ; Thu, 13 Nov 2008 18:09:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mADI9iHd049797 for ; Thu, 13 Nov 2008 18:09:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mADI9ixq049795; Thu, 13 Nov 2008 18:09:44 GMT (envelope-from nobody) Message-Id: <200811131809.mADI9ixq049795@www.freebsd.org> Date: Thu, 13 Nov 2008 18:09:44 GMT From: Patrick To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/128847: Detachment of mounted USB flash drive causes system freeze X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 18:10:07 -0000 >Number: 128847 >Category: usb >Synopsis: Detachment of mounted USB flash drive causes system freeze >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 13 18:10:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Patrick >Release: 7.0 >Organization: >Environment: FreeBSD hostname 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: When I manually detach my USB flash drive that contains files in use on the system in question without umounting it, and then re-attach it, my system freezes. >How-To-Repeat: Mount the USB flash drive. Open one of the files located on the drive with a program such as Opera or leafpad (what I did). Manually remove the USB flash drive. Reinsert the flash drive. I then tried to save the file I had opened in leafpad, and it told me it could not open the file for saving. I opened up a terminal and ran 'su', and that's when my system froze. /var/log/messages showed this: Nov 13 17:16:10 kernel: GEOM_LABEL: Label msdosfs/WWMPCDD_USB removed. Nov 13 17:45:23 kernel: umass0: at uhub4 port 5 (addr 2) disconnected Nov 13 17:45:23 kernel: (da0:umass-sim0:0:0:0): lost device Nov 13 17:45:23 kernel: umass0: detached Nov 13 17:45:54 kernel: umass0: on uhub4 Nov 13 17:45:54 root: Unknown USB device: vendor 0x0781 product 0x5150 bus uhub4 Nov 13 17:45:55 kernel: da1 at umass-sim0 bus 0 target 0 lun 0 Nov 13 17:45:55 kernel: da1: Removable Direct Access SCSI-2 device Nov 13 17:45:55 kernel: da1: 40.000MB/s transfers Nov 13 17:45:55 kernel: da1: 244MB (501759 512 byte sectors: 64H 32S/T 244C) Nov 13 17:45:55 kernel: GEOM_LABEL: Label for provider da1s1 is msdosfs/WWMPCDD_USB. Nov 13 17:45:58 kernel: g_vfs_done():da0s1[WRITE(offset=22452224, length=2048)]error = 6 >Fix: Patch attached with submission follows: Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (1202.73-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Features2=0x4400 Logical CPUs per core: 2 real memory = 536805376 (511 MB) avail memory = 503001088 (479 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) hptrr: HPT RocketRAID controller driver v1.1 (Feb 24 2008 19:59:27) acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 1fef0000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: on acpi0 p4tcc0: on cpu0 cpu1: on acpi0 p4tcc1: on cpu1 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: on hostb0 pcib1: at device 1.0 on pci0 pci1: on pcib1 nvidia0: mem 0xf0000000-0xf0ffffff,0xe8000000-0xefffffff irq 16 at device 0.0 on pci1 nvidia0: [GIANT-LOCKED] nvidia0: [ITHREAD] uhci0: port 0xac00-0xac1f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xa000-0xa01f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xa400-0xa41f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xa800-0xa81f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xf4000000-0xf40003ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 fwohci0: mem 0xf3005000-0xf30057ff,0xf3000000-0xf3003fff irq 17 at device 1.0 on pci2 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:50:8d:00:00:f8:21:82 fwohci0: Phy 1394a available S400, 3 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0x1a68000 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:50:8d:f8:21:82 fwe0: Ethernet address: 02:50:8d:f8:21:82 fwip0: on firewire0 fwip0: Firewire address: 00:50:8d:00:00:f8:21:82 @ 0xfffe00000000, S400, maxrec 2048 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode rl0: port 0x9000-0x90ff mem 0xf3004000-0xf30040ff irq 18 at device 2.0 on pci2 miibus0: on rl0 rlphy0: PHY 0 on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:8d:f9:21:82 rl0: [ITHREAD] isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] ata1: on atapci0 ata1: [ITHREAD] pci0: at device 31.3 (no driver attached) pci0: at device 31.5 (no driver attached) acpi_tz0: on acpi0 acpi_tz0: _PSV value is absurd, ignored (-266.7C) fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model IntelliMouse, device ID 3 pmtimer0 on isa0 ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 ppbus0: [ITHREAD] plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ppc0: [ITHREAD] sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec hptrr: no controller detected. firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ad0: 286188MB at ata0-master UDMA100 acd0: CDRW at ata0-slave PIO4 acpi_tz0: _PSV value is absurd, ignored (-266.7C) acpi_tz0: _PSV value is absurd, ignored (-266.7C) SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ad0s3a WARNING: / was not properly dismounted WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted WARNING: /var was not properly dismounted umass0: on uhub4 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 244MB (501759 512 byte sectors: 64H 32S/T 244C) GEOM_LABEL: Label for provider da0s1 is msdosfs/WWMPCDD_USB. GEOM_LABEL: Label msdosfs/WWMPCDD_USB removed. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Thu Nov 13 18:29:48 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 063C31065674; Thu, 13 Nov 2008 18:29:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DA8B48FC12; Thu, 13 Nov 2008 18:29:47 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mADITlbV058251; Thu, 13 Nov 2008 18:29:47 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mADITlv5058247; Thu, 13 Nov 2008 18:29:47 GMT (envelope-from linimon) Date: Thu, 13 Nov 2008 18:29:47 GMT Message-Id: <200811131829.mADITlv5058247@freefall.freebsd.org> To: ntai@smartfruit.com, linimon@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/102096: [patch] usbd(8) does not handle multiple devices in one event [regression] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 18:29:48 -0000 Synopsis: [patch] usbd(8) does not handle multiple devices in one event [regression] State-Changed-From-To: feedback->closed State-Changed-By: linimon State-Changed-When: Thu Nov 13 18:28:48 UTC 2008 State-Changed-Why: Close due to feedback timeout. The recommended approach these days is to use devd. Thanks for the submission, however. http://www.freebsd.org/cgi/query-pr.cgi?pr=102096 From owner-freebsd-usb@FreeBSD.ORG Thu Nov 13 18:30:50 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7FB1065674; Thu, 13 Nov 2008 18:30:50 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AE0B38FC17; Thu, 13 Nov 2008 18:30:50 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mADIUos2066041; Thu, 13 Nov 2008 18:30:50 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mADIUoic066037; Thu, 13 Nov 2008 18:30:50 GMT (envelope-from linimon) Date: Thu, 13 Nov 2008 18:30:50 GMT Message-Id: <200811131830.mADIUoic066037@freefall.freebsd.org> To: walter@pelissero.de, linimon@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: bin/57255: [patch] usbd(8) and multi-function devices X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 18:30:50 -0000 Synopsis: [patch] usbd(8) and multi-function devices State-Changed-From-To: open->suspended State-Changed-By: linimon State-Changed-When: Thu Nov 13 18:30:17 UTC 2008 State-Changed-Why: These days, the recommended approach is to use devd, so mark this suspended unless someone takes an interest in usbd. http://www.freebsd.org/cgi/query-pr.cgi?pr=57255 From owner-freebsd-usb@FreeBSD.ORG Fri Nov 14 07:41:54 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1851065670; Fri, 14 Nov 2008 07:41:54 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from m12-12.163.com (m12-12.163.com [220.181.12.12]) by mx1.freebsd.org (Postfix) with SMTP id 44EFE8FC1A; Fri, 14 Nov 2008 07:41:53 +0000 (UTC) (envelope-from kevinxlinuz@163.com) Received: from [127.0.0.1] (unknown [60.191.86.3]) by smtp8 (Coremail) with SMTP id DMCowLCrs2W8Kx1JTuvCBA--.20989S2; Fri, 14 Nov 2008 15:41:49 +0800 (CST) Message-ID: <491D2BC0.2080604@163.com> Date: Fri, 14 Nov 2008 15:41:52 +0800 From: kevin User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Coremail-Antispam: 1Uf129KBjvdXoWrZr48Zw4fZr18ur18JFy3XFb_yoWDXFbEkr nFq3WDXrn0y3s7KFyFkFZ5Way5Ca4aqa4kCa17Ja4xXw4Fvr4FgFyUZFZ7XrWUtryUJF4j qw1UKFnrJrnakjkaLaAFLSUrUUUUUbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnRJUUU zEb7Iv0xC_Xr1lb4IE77IF4wAFF20E14v26r1j6r4UM7C26xCjj4IEI4klw4CSwwAFxVCa YxvI4VCIwcAKzIAtM7CIcVAFz4kK6r1j6r18M2kK67kvxFCE548m6r1fGryUXwAqx4xG64 xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r4j 6F4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6xAIw28IcVAK0I8IjxAxMx02cVAKzw CY0x0Ix7I2Y4AK6F4j6FyUMxCjnVAqn7xvrwC2zVAF1VAY17CE14v26r1Y6r17YxBIdaVF xhVjvjDU0xZFpf9x07U1a0PUUUUU= Cc: freebsd-usb@freebsd.org Subject: kernel panic of usb2 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 07:41:54 -0000 Hi , i can't write anything in usb flash devices.i can mount device well with usb2_storage_mss. db>bt Tracing pid 1367 tid 100147 td 0xffffff0004e756e0 kdb_enter() at kdb_enter+0x3d panic() at panic+0x176 vm_pfault() at vm_pfault+0x19ce trap_pfault() at trap_pfault+0x2a9 trap() at trap+0c327 calltrap() at calltrap+0x8 --- trap 0xc, rip = 0xffffffff80511166, rsp = 0xfffffffee962bac0, rdp = 0xffffff fee962bb00 --- bcopy() at bcopy+0x16 usb2_bdma_per_sync() at usb2_bdma_per_sync+0x35 usb2_bdma_work_loop() at usb2_bdma_work_loop+0x346 usb2_command_wrapper() at usb2_command_wrapper+0x76 usb2_callback_wrapper() at usb2_callback_wrapper+0x2d4 usb2_command_wrapper() at usb2_command_wrapper+0x76 usb2_callback_proc() at usb2_callback_proc+0x90 usb2_process() at usb2_process+0xd2 fork_exit() at fork_exit+0x118 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip =0, rsp=0xfffffffee962bd40, rbp = 0 --- Thanks, kevin From owner-freebsd-usb@FreeBSD.ORG Fri Nov 14 08:10:06 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCD6B1065670; Fri, 14 Nov 2008 08:10:06 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.tele2.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 307988FC16; Fri, 14 Nov 2008 08:10:05 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=aniA1o7mVp4QawOfT9qHqA==:17 a=6I5d2MoRAAAA:8 a=Mfjwkn1GKK2a2fjCjsYA:9 a=bLzyZGgf2zPVZdDwKY8A:7 a=viS567KgI-JeDvUAsyQ8LSLyuUsA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.1] (account mc467741@c2i.net [62.113.133.1] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 759817761; Fri, 14 Nov 2008 09:10:03 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 14 Nov 2008 09:12:10 +0100 User-Agent: KMail/1.9.7 References: <491D2BC0.2080604@163.com> In-Reply-To: <491D2BC0.2080604@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811140912.10665.hselasky@c2i.net> Cc: kevin , FreeBSD Current Subject: Re: kernel panic of usb2 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 08:10:06 -0000 On Friday 14 November 2008, kevin wrote: > Hi , > i can't write anything in usb flash devices.i can mount device well > with usb2_storage_mss. > db>bt > Tracing pid 1367 tid 100147 td 0xffffff0004e756e0 > kdb_enter() at kdb_enter+0x3d > panic() at panic+0x176 > vm_pfault() at vm_pfault+0x19ce > trap_pfault() at trap_pfault+0x2a9 > trap() at trap+0c327 > calltrap() at calltrap+0x8 > --- trap 0xc, rip = 0xffffffff80511166, rsp = 0xfffffffee962bac0, rdp = > 0xffffff > fee962bb00 --- > bcopy() at bcopy+0x16 > usb2_bdma_per_sync() at usb2_bdma_per_sync+0x35 > usb2_bdma_work_loop() at usb2_bdma_work_loop+0x346 > usb2_command_wrapper() at usb2_command_wrapper+0x76 > usb2_callback_wrapper() at usb2_callback_wrapper+0x2d4 > usb2_command_wrapper() at usb2_command_wrapper+0x76 > usb2_callback_proc() at usb2_callback_proc+0x90 > usb2_process() at usb2_process+0xd2 > fork_exit() at fork_exit+0x118 > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip =0, rsp=0xfffffffee962bd40, rbp = 0 --- > This issue has been fixed, but not in -current yet. See: http://perforce.freebsd.org/chv.cgi?CH=152624 --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Nov 14 10:55:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB3A3106567B for ; Fri, 14 Nov 2008 10:55:50 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from mail-chaos.rambler.ru (mail-chaos.rambler.ru [81.19.68.130]) by mx1.freebsd.org (Postfix) with ESMTP id 7B7DE8FC13 for ; Fri, 14 Nov 2008 10:55:50 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from cmb.rambler.ramblermedia.com (unknown [81.19.90.203]) (Authenticated sender: citrin@citrin.ru) by mail-chaos.rambler.ru (Postfix) with ESMTPSA id 31A571702A for ; Fri, 14 Nov 2008 13:45:20 +0300 (MSK) Message-ID: <491D56BF.8060303@citrin.ru> Date: Fri, 14 Nov 2008 13:45:19 +0300 From: Anton Yuzhaninov User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: new usb stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 10:55:50 -0000 I build kernel on fresh HEAD with options device usb2_core device usb2_controller device usb2_controller_ehci device usb2_controller_ohci device usb2_controller_uhci device usb2_serial device usb2_serial_plcom device usb2_input device usb2_input_hid device usb2_input_kbd device usb2_input_ms world also has been rebuilt. But it seems to not work: # usbdevs -v usbdevs: no USB controllers found # dmesg | fgrep usb usbus0: on uhci0 usbus1: on uhci1 usbus2: on uhci2 usbus3: on uhci3 usbus4: EHCI version 1.0 usbus4: on ehci0 usbus0: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 ushub0: on usbus0 usbus1: 12Mbps Full Speed USB v1.0 ugen1.1: at usbus1 ushub1: on usbus1 usbus2: 12Mbps Full Speed USB v1.0 ugen2.1: at usbus2 ushub2: on usbus2 usbus3: 12Mbps Full Speed USB v1.0 ugen3.1: at usbus3 ushub3: on usbus3 usbus4: 480Mbps High Speed USB v2.0 ugen4.1: at usbus4 ushub4: on usbus4 ugen2.2: at usbus2 ukbd0: on usbus2 uhid0: on usbus2 Symlink: uhid0 -> usb2.2.1.16 -- Anton Yuzhaninov From owner-freebsd-usb@FreeBSD.ORG Fri Nov 14 11:42:44 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C10411065676 for ; Fri, 14 Nov 2008 11:42:44 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-gx0-f13.google.com (mail-gx0-f13.google.com [209.85.217.13]) by mx1.freebsd.org (Postfix) with ESMTP id 552668FC0C for ; Fri, 14 Nov 2008 11:42:44 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: by gxk6 with SMTP id 6so125084gxk.19 for ; Fri, 14 Nov 2008 03:42:43 -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:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=sZt/Pn9wVYaQ1Q6dB3ockxj6nm5gXXLwRAIOX7wove4=; b=ZeQ+KAVTG0RSZ1Y8fQCNEHIo0pLdCQu7hFfxs32AiprzJm2KZ33KQLl+I5LayrOBFn UwsN5f7GW+6bY3DSyAjSPaw92Tk8UAXrmRWy7I/BR0CEGTwVg8mEHWkCNaBf5+chtN6a by2ixfTwJ/kMQBlFl2dXX0QejZx5yzVeqK9qg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OOX4J8InWxmURJQLtAshuWlcQKxzJSEoBGmSTEdQJvRTVfvNm148YVf+7U89Ls9zMK Vzh8AUpo95TE5tlG/n1wWFRIL++TRSCfxwRyA6CBoj5HvpQgsHZLxahR9xWGjLg1RvJ7 TaSqzQodoIGDs4OyvwyAWJjv9sv7igX0TwTGY= Received: by 10.150.216.3 with SMTP id o3mr1617420ybg.212.1226661081677; Fri, 14 Nov 2008 03:11:21 -0800 (PST) Received: by 10.150.98.4 with HTTP; Fri, 14 Nov 2008 03:11:21 -0800 (PST) Message-ID: Date: Fri, 14 Nov 2008 12:11:21 +0100 From: "Rene Ladan" To: usb@freebsd.org In-Reply-To: <200811140952.mAE9qW2k071739@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200811140952.mAE9qW2k071739@freefall.freebsd.org> Cc: Subject: Fwd: ports/128549: devel/libusb : fix runtime error X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 11:42:44 -0000 Case closed :) Rene ---------- Forwarded message ---------- From: Date: 2008/11/14 Subject: Re: ports/128549: devel/libusb : fix runtime error To: r.c.ladan@gmail.com, pav@freebsd.org, freebsd-ports-bugs@freebsd.org Synopsis: devel/libusb : fix runtime error State-Changed-From-To: open->closed State-Changed-By: pav State-Changed-When: Fri Nov 14 09:51:02 UTC 2008 State-Changed-Why: Committed, thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=128549 -- http://www.rene-ladan.nl/ GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 (subkeys.pgp.net) From owner-freebsd-usb@FreeBSD.ORG Fri Nov 14 15:45:30 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5B11065686 for ; Fri, 14 Nov 2008 15:45:30 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id D7E838FC12 for ; Fri, 14 Nov 2008 15:45:29 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=aniA1o7mVp4QawOfT9qHqA==:17 a=aZdB_hDTE1UCb2wo-RoA:9 a=PNhLcC76k8vYAyoLJzYA:7 a=rllvULYsk-lifsuYoOZFDoj588EA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.1] (account mc467741@c2i.net [62.113.133.1] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1150328051; Fri, 14 Nov 2008 16:45:28 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 14 Nov 2008 16:47:35 +0100 User-Agent: KMail/1.9.7 References: <491D56BF.8060303@citrin.ru> In-Reply-To: <491D56BF.8060303@citrin.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811141647.35733.hselasky@c2i.net> Cc: Subject: Re: new usb stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 15:45:30 -0000 On Friday 14 November 2008, Anton Yuzhaninov wrote: > I build kernel on fresh HEAD with options > > device usb2_core > device usb2_controller > device usb2_controller_ehci > device usb2_controller_ohci > device usb2_controller_uhci > device usb2_serial > device usb2_serial_plcom > device usb2_input > device usb2_input_hid > device usb2_input_kbd > device usb2_input_ms > > world also has been rebuilt. > > But it seems to not work: > > # usbdevs -v > usbdevs: no USB controllers found > > # dmesg | fgrep usb > usbus0: on uhci0 > usbus1: on uhci1 > usbus2: on uhci2 > usbus3: on uhci3 > usbus4: EHCI version 1.0 > usbus4: on ehci0 > usbus0: 12Mbps Full Speed USB v1.0 > ugen0.1: at usbus0 > ushub0: on usbus0 > usbus1: 12Mbps Full Speed USB v1.0 > ugen1.1: at usbus1 > ushub1: on usbus1 > usbus2: 12Mbps Full Speed USB v1.0 > ugen2.1: at usbus2 > ushub2: on usbus2 > usbus3: 12Mbps Full Speed USB v1.0 > ugen3.1: at usbus3 > ushub3: on usbus3 > usbus4: 480Mbps High Speed USB v2.0 > ugen4.1: at usbus4 > ushub4: on usbus4 > ugen2.2: at usbus2 > ukbd0: 1.10/1.01, addr 2> on usbus2 uhid0: Keyboard, class 0/0, rev 1.10/1.01, addr 2> on usbus2 Symlink: uhid0 -> > usb2.2.1.16 usbdevs has been replaced by src/usr.sbin/usbconfig, which is not installed by default yet, and depends on src/lib/libusb20 . If you can wait till over the weekend then I think this will be fixed in -current. --HPS