From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 05:05:42 2009 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 E69901065670; Sun, 27 Sep 2009 05:05:41 +0000 (UTC) (envelope-from pldrouin@pldrouin.net) Received: from smtp.cyberfingers.net (smtp.cyberfingers.net [198.177.254.227]) by mx1.freebsd.org (Postfix) with ESMTP id A349E8FC0A; Sun, 27 Sep 2009 05:05:41 +0000 (UTC) Received: from mdaemon.pldrouin.net (CPE0023695b905f-CM001a666aca96.cpe.net.cable.rogers.com [99.246.67.95]) by smtp.cyberfingers.net (Postfix) with ESMTP id 49350AB6C57; Sun, 27 Sep 2009 01:02:49 -0400 (EDT) Message-ID: <4ABEF2A6.6010801@pldrouin.net> Date: Sun, 27 Sep 2009 01:05:42 -0400 From: Pierre-Luc Drouin User-Agent: Thunderbird 2.0.0.23 (X11/20090824) MIME-Version: 1.0 To: Hans Petter Selasky , ed@freebsd.org, freebsd-usb@freebsd.org References: <4AB6DA79.7050209@pldrouin.net> <200909221847.26679.hselasky@c2i.net> <4AB915CE.8090503@pldrouin.net> <200909230851.03442.hselasky@c2i.net> In-Reply-To: <200909230851.03442.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: usb/138659: uftdi driver broken in RELENG_8/CURRENT 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, 27 Sep 2009 05:05:42 -0000 Hans Petter Selasky wrote: > On Tuesday 22 September 2009 20:22:06 Pierre-Luc Drouin wrote: > >> Hans Petter Selasky wrote: >> >>> On Tuesday 22 September 2009 18:40:40 Pierre-Luc Drouin wrote: >>> >>>> Hans Petter Selasky wrote: >>>> >>>>> On Tuesday 22 September 2009 18:15:19 Pierre-Luc Drouin wrote: >>>>> >>>>>> Hans Petter Selasky wrote: >>>>>> >>>>>>> On Tuesday 22 September 2009 17:21:28 Pierre-Luc Drouin wrote: >>>>>>> >>>>>>>>>> Thanks! >>>>>>>>>> >>>>>>>>> It indicates that your device is not sending any data. >>>>>>>>> >>>>>>>>> --HPS >>>>>>>>> >>>>>>>> So does it mean that the write statement (a status request) is not >>>>>>>> transmitted to the device either? >>>>>>>> >>>>>>> No, the "xxx_get()" message means that the data you write is sent and >>>>>>> transmitted. >>>>>>> >>>>>>> BTW: I have a FTDI adapter here, and it works fine with loopback when >>>>>>> the baudrate is set correctly. >>>>>>> >>>>>>> >>>>>>>> Because this write statement should be >>>>>>>> followed by data sent from the device and it effectively does on >>>>>>>> Linux. And about SIGIO, shouldn't this signal be generated only when >>>>>>>> there is data available to read? Why is it generated in asynchronous >>>>>>>> mode and then the read statement returns EINTR? >>>>>>>> >>>>>>> Ed has to answer these questions. This stuff is not handled in the >>>>>>> USB stack for FTDI devices. >>>>>>> >>>>>>> --HPS >>>>>>> >>>>>> In the manual page for the uftdi driver, the chip I am using (FT232BL) >>>>>> is not listed. According to the FTDI website, it is based on >>>>>> FT8U232AM, but it has extra functionalities. Have you had the chance >>>>>> to test an device that uses either a FT232BM, FT232BL or FT232BQ chip? >>>>>> I just tested the device on FreeBSD 7.2 and it does not work either... >>>>>> >>>>> No, I haven't. >>>>> >>>>> --HPS >>>>> >>>> Are there additional tests I can do in synchronous mode to try pinning >>>> down the problem? >>>> >>> Hi, >>> >>> If the device doesn't work, then there are probably some FTDI USB >>> registers which are not programmed correctly. >>> >>> If you could debug that it would be great. >>> >>> --HPS >>> >> ok, so yes I can probably try debugging the driver for the FT232BL chip, >> but the support for my device's manufacturer is very limited, so it >> might not be optimal to try doing debugging with that. Plus although I >> do programming all day (statistical data analysis), I've never done >> coding at the kernel level or driver programming, so I will need to get >> familiar with it first. >> > > Don't worry about your coding skills. If you can add the code that makes it > working, I will fix the rest for you. > > >> Would something like >> http://www.eurodesign.bg/eudesignbg/USB_RS232.html be the ideal tool for >> debugging? >> > > I don't know .... > > --HPS > Hi, so I compared the control commands sent by uftdi to the ones sent by ftdio_sio (linux kernel module) and I tried different hacks to finally realize that the problem was that FreeBSD was not sending the right baud rate to the device. FreeBSD uses c_ospeed (in termios struct) to get the baud rate while Linux uses c_cflag. So I removed the baud rate from c_cflag in my code and I am now using cfsetispeed and cfsetospeed. I though the termios structure and flags were Posix but it looks like it's not :S. So to conclude, it looks like uftdi is working fine :) Thanks for the support! From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 12:18:05 2009 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 60051106568D; Sun, 27 Sep 2009 12:18: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 303548FC13; Sun, 27 Sep 2009 12:18:03 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA14452; Sun, 27 Sep 2009 15:18:01 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MrshU-0004h6-Sv; Sun, 27 Sep 2009 15:18:01 +0300 Message-ID: <4ABF57F5.1050106@icyb.net.ua> Date: Sun, 27 Sep 2009 15:17:57 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: Hans Petter Selasky References: <4ABA36B1.9070706@icyb.net.ua> <200909241651.47850.hselasky@c2i.net> <4ABC646D.4070604@icyb.net.ua> <200909250928.51515.hselasky@c2i.net> In-Reply-To: <200909250928.51515.hselasky@c2i.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 27 Sep 2009 12:18:05 -0000 on 25/09/2009 10:28 Hans Petter Selasky said the following: > On Friday 25 September 2009 08:34:21 Andriy Gapon wrote: >> Not sure how to interpret this. > > In ohci_controller_init() try to disable the > > DPRINTF("SMM active, request owner change\n"); > > part of the code for !(ohci_unit == 0) or (ohci_unit == 2) and see what > happens. > > Your clue might also indicate that we should request owner change for all > OHCI's before resetting any of them. Possibly a BIOS bug! Haven't tried the suggested changes yet, but here is some more info. This is register dump of ohci0 just _before_ we start doing anything with it: ohci0: mem 0xfe02e000-0xfe02efff irq 16 at device 18.0 on pci0 ohci0: [ITHREAD] ohci_dumpregs:567: ohci_dumpregs: rev=0x00000110 control=0x00000184 command=0x00000000 ohci_dumpregs:571: intrstat=0x00000024 intre=0xc0000042 intrd=0xc0000042 ohci_dumpregs:575: hcca=0xbfdf1f00 percur=0x00000000 ctrlhd=0xbfdf1c50 ohci_dumpregs:579: ctrlcur=0x00000000 bulkhd=0x00000000 bulkcur=0x00000000 ohci_dumpregs:583: done=0xbfdf1ca0 fmival=0x27782edf fmrem=0x000009bd ohci_dumpregs:587: fmnum=0x00008e3a perst=0x00002a27 lsthrs=0x00000628 ohci_dumpregs:591: desca=0x02000b03 descb=0x00000000 stat=0x00000000 ohci_dumpregs:594: port1=0x00000303 port2=0x00000100 ohci_dumpregs:600: HCCA: frame_number=0x0000 done_head=0x00000000 This is dump just after we programmed it: ohci_controller_init:308: rewrite head regs ohci_dumpregs:567: ohci_dumpregs: rev=0x00000110 control=0x000000af command=0x00000000 ohci_dumpregs:571: intrstat=0x00000044 intre=0x8000005a intrd=0x8000005a ohci_dumpregs:575: hcca=0x06647000 percur=0x00000000 ctrlhd=0x06692000 ohci_dumpregs:579: ctrlcur=0x00000000 bulkhd=0x06693000 bulkcur=0x00000000 ohci_dumpregs:583: done=0x00000000 fmival=0xa7782edf fmrem=0x80001096 ohci_dumpregs:587: fmnum=0x0000000d perst=0x00002a2f lsthrs=0x00000628 ohci_dumpregs:591: desca=0x02000b03 descb=0x00000000 stat=0x00000000 ohci_dumpregs:594: port1=0x00010301 port2=0x00000100 ohci_dumpregs:600: HCCA: frame_number=0x000e done_head=0x00000000 This is dump of ohci0 registers just before we run takeover code of ohci1: ohci1: mem 0xfe02d000-0xfe02dfff irq 16 at device 18.1 on pci0 ohci1: [ITHREAD] ohci_controller_init:185: reread ohci0 regs: ohci_dumpregs:567: ohci_dumpregs: rev=0x00000110 control=0x000000af command=0x00000000 ohci_dumpregs:571: intrstat=0x00000044 intre=0x8000005a intrd=0x8000005a ohci_dumpregs:575: hcca=0x06647000 percur=0x00000000 ctrlhd=0x06692000 ohci_dumpregs:579: ctrlcur=0x00000000 bulkhd=0x06693000 bulkcur=0x00000000 ohci_dumpregs:583: done=0x00000000 fmival=0xa7782edf fmrem=0x800003b5 ohci_dumpregs:587: fmnum=0x00000012 perst=0x00002a2f lsthrs=0x00000628 ohci_dumpregs:591: desca=0x02000b03 descb=0x00000000 stat=0x00000000 ohci_dumpregs:594: port1=0x00010301 port2=0x00000100 ohci_dumpregs:600: HCCA: frame_number=0x0012 done_head=0x00000000 And this is dump of ohci0 right after we've taken over ohci1: ohci_controller_init:195: SMM active, request owner change ohci_controller_init:219: usbus1: resetting ohci_controller_init:246: reread ohci0 regs: ohci_dumpregs:567: ohci_dumpregs: rev=0x00000110 control=0x000000af command=0x00000000 ohci_dumpregs:571: intrstat=0x00000004 intre=0x8000005a intrd=0x8000005a ohci_dumpregs:575: hcca=0x06647000 percur=0x00000000 ctrlhd=0xbfdf1c50 ohci_dumpregs:579: ctrlcur=0x00000000 bulkhd=0x06693000 bulkcur=0x00000000 ohci_dumpregs:583: done=0xbfdf1ca0 fmival=0xa7782edf fmrem=0x80002122 ohci_dumpregs:587: fmnum=0x00000192 perst=0x00002a2f lsthrs=0x00000628 ohci_dumpregs:591: desca=0x02000b03 descb=0x00000000 stat=0x00000000 ohci_dumpregs:594: port1=0x00000303 port2=0x00000100 ohci_dumpregs:600: HCCA: frame_number=0x0192 done_head=0x00000000 As you can see, indeed, the register gets over-written right when we take over ohci1. Some additional observations: 1. frame_number seems to grow quite a lot for ohci0 2. before we touch ohci0 it has port1=0x00000303, after reset port1=0x00010301, after ohci1 takeover port1=0x00000303 again. I'd say that this is a pretty strong evidence that BIOS does something to ohci0 after we took over it and while we are taking over ohci1. Another idea of working around this: 1) in pci fixup code disable USB SMI for these chipsets 2) (optional) in ohci code skip takeover step Sounds messy. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 13:26:29 2009 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 55797106566C for ; Sun, 27 Sep 2009 13:26:29 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD3B8FC17 for ; Sun, 27 Sep 2009 13:26:27 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA14924; Sun, 27 Sep 2009 16:10:25 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MrtWC-0004l8-OQ; Sun, 27 Sep 2009 16:10:24 +0300 Message-ID: <4ABF643D.1080705@freebsd.org> Date: Sun, 27 Sep 2009 16:10:21 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: Hans Petter Selasky References: <4ABA36B1.9070706@icyb.net.ua> <200909241651.47850.hselasky@c2i.net> <4ABC646D.4070604@icyb.net.ua> <200909250928.51515.hselasky@c2i.net> <4ABF57F5.1050106@icyb.net.ua> In-Reply-To: <4ABF57F5.1050106@icyb.net.ua> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 27 Sep 2009 13:26:29 -0000 on 27/09/2009 15:17 Andriy Gapon said the following: > Another idea of working around this: > 1) in pci fixup code disable USB SMI for these chipsets > 2) (optional) in ohci code skip takeover step > Sounds messy. BTW, just for the sake of experiment I did exactly what I suggested. I've got the following messages: kernel: ohci_controller_init:195: SMM active, request owner change kernel: usbus0: SMM does not respond, resetting kernel: ohci_controller_init:195: SMM active, request owner change kernel: usbus1: SMM does not respond, resetting kernel: ohci_controller_init:195: SMM active, request owner change kernel: usbus3: SMM does not respond, resetting kernel: ohci_controller_init:195: SMM active, request owner change kernel: usbus4: SMM does not respond, resetting kernel: ohci_controller_init:195: SMM active, request owner change kernel: usbus6: SMM does not respond, resetting And the register value stayed intact after initial programming, so no re-programming was needed. Here is the (dirty) hack: diff --git a/sys/dev/pci/fixup_pci.c b/sys/dev/pci/fixup_pci.c index 566e503..1463c24 100644 --- a/sys/dev/pci/fixup_pci.c +++ b/sys/dev/pci/fixup_pci.c @@ -53,6 +53,7 @@ static int fixup_pci_probe(device_t dev); static void fixwsc_natoma(device_t dev); static void fixc1_nforce2(device_t dev); static void fixrtc_piix4(device_t dev); +static void fixsmi_usb(device_t dev); static device_method_t fixup_pci_methods[] = { /* Device interface */ @@ -84,6 +85,9 @@ fixup_pci_probe(device_t dev) case 0x01e010de: /* nVidia nForce2 */ fixc1_nforce2(dev); break; + case 0x96001022: /* AMD SB700 */ + fixsmi_usb(dev); + break; } return(ENXIO); } @@ -124,6 +128,21 @@ } +/* Disable USB SMI */ +static void +fixsmi_usb(device_t dev) +{ + uint32_t features; + + dev = pci_find_device(0x1002, 0x4385); + features = pci_read_config(dev, 0x64, 4); + if (features & (1 << 15)) { + printf("Disabling USB SMI on SB7xx\n"); + features &= ~(1 << 15); + pci_write_config(dev, 0x64, features, 4); + } +} + /* * Set the SYSTEM_IDLE_TIMEOUT to 80 ns on nForce2 systems to work * around a hang that is triggered when the CPU generates a very fast -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 13:31:34 2009 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 172B5106566B; Sun, 27 Sep 2009 13:31:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swipnet.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 733648FC08; Sun, 27 Sep 2009 13:31:32 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6U-Pe18MTAwA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=CYSLokR4CNBS_XcE7XMA:9 a=f6IJHl2MpA2Hw94bmnRBw_ySvnAA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1138292008; Sun, 27 Sep 2009 15:31:31 +0200 From: Hans Petter Selasky To: "Pierre-Luc Drouin" Date: Sun, 27 Sep 2009 15:32:10 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <4AB6DA79.7050209@pldrouin.net> <200909230851.03442.hselasky@c2i.net> <4ABEF2A6.6010801@pldrouin.net> In-Reply-To: <4ABEF2A6.6010801@pldrouin.net> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909271532.12237.hselasky@c2i.net> Cc: ed@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/138659: uftdi driver broken in RELENG_8/CURRENT 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, 27 Sep 2009 13:31:34 -0000 On Sunday 27 September 2009 07:05:42 Pierre-Luc Drouin wrote: > > So to conclude, it looks like uftdi is working fine :) > Great. Nothing better! --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 13:58:30 2009 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 19EBD1065672; Sun, 27 Sep 2009 13:58:30 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E71608FC23; Sun, 27 Sep 2009 13:58:28 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA15422; Sun, 27 Sep 2009 16:58:26 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MruGg-0004p1-KL; Sun, 27 Sep 2009 16:58:26 +0300 Message-ID: <4ABF6F7F.4050101@freebsd.org> Date: Sun, 27 Sep 2009 16:58:23 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: Hans Petter Selasky References: <4ABA36B1.9070706@icyb.net.ua> <200909241651.47850.hselasky@c2i.net> <4ABC646D.4070604@icyb.net.ua> <200909250928.51515.hselasky@c2i.net> <4ABF57F5.1050106@icyb.net.ua> <4ABF643D.1080705@freebsd.org> In-Reply-To: <4ABF643D.1080705@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 27 Sep 2009 13:58:30 -0000 on 27/09/2009 16:10 Andriy Gapon said the following: > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus0: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus1: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus3: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus4: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus6: SMM does not respond, resetting > > And the register value stayed intact after initial programming, so no > re-programming was needed. I think that I didn't finished what I was saying. I think that now we can be very sure what is the culprit here. Now we need to find the best strategy to work around the problem. (Of course, it would be just the second best with the best being fixing SMM code, but that's beyond our control). -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 14:12:12 2009 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 538E4106568D for ; Sun, 27 Sep 2009 14:12:12 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id B13758FC0A for ; Sun, 27 Sep 2009 14:12:11 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8REC5Bc020046; Sun, 27 Sep 2009 22:12:05 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8REC5nV020045; Sun, 27 Sep 2009 22:12:05 +0800 (KRAST) (envelope-from eugen) Date: Sun, 27 Sep 2009 22:12:05 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090927141205.GA19251@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090926081733.GA24121@svzserv.kemerovo.su> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 27 Sep 2009 14:12:12 -0000 > Could you check if these are due to device timeouts in the CAM layer? > There is some debugging you can turn on: > > sysctl hw.usb.umass.debug=-1 > > Probably it will flood the console. That's not a problem. Anyway, I rlogin to this system and use syslog to write all console/kernel logs to console.log and kernel.log So, I have done: %sysctl hw.usb.umass.debug=-1 hw.usb.umass.debug: 0 -> -1 Then used another terminal to ran: %iostat -d -K -w 10 da0 da0 KB/t tps MB/s 2.88 0 0.00 After it started, I switched back to first terminal and ran: %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 It started to work, meantime iostat output was: 63.62 17 1.05 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 64.00 2 0.15 62.31 83 5.06 0.25 0 0.00 0.00 0 0.00 0.00 0 0.00 ^C To this moment, dd has finished his work and printed: 1000+0 records in 1000+0 records out 65536000 bytes transferred in 78.627073 secs (833504 bytes/sec) One can see, it sent first chunk of data to the device than there was quite large period of time without any activity, more than 50 seconds. Then it has finished. As for debug log, its uncompressed size is over megabyte so I've made it available here (25KB compressed): http://www.grosbein.pp.ru/umass.log.gz I cannot read/understand it yet. > Maybe you could add some prints to > /sys/dev/usb/storage/umass.c in all the "default:" cases in the USB callbacks > and print out the "error" code. That would quickly indicate if your device has > an issue with timing, I.E. that the firmware in the USB device part is hanging. I still suppose the device is fine because it presents no such problem being connected to another box with the same 8.0-RC1 (same sources). Also, I don't feel myself confident with the code to debug it yet... Eugene Grosbein From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 14:31:40 2009 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 CE0C51065695; Sun, 27 Sep 2009 14:31:40 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 2566A8FC0A; Sun, 27 Sep 2009 14:31:39 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8REVcJW021085; Sun, 27 Sep 2009 22:31:38 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8REVckU021084; Sun, 27 Sep 2009 22:31:38 +0800 (KRAST) (envelope-from eugen) Date: Sun, 27 Sep 2009 22:31:38 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090927143138.GA20842@svzserv.kemerovo.su> References: <20090926081733.GA24121@svzserv.kemerovo.su> <20090927141205.GA19251@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090927141205.GA19251@svzserv.kemerovo.su> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 27 Sep 2009 14:31:40 -0000 > %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 > > It started to work, meantime iostat output was: > > 63.62 17 1.05 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 64.00 2 0.15 > 62.31 83 5.06 > 0.25 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > ^C > > To this moment, dd has finished his work and printed: > > 1000+0 records in > 1000+0 records out > 65536000 bytes transferred in 78.627073 secs (833504 bytes/sec) After some googling, I've tried sysctl hw.usb.ehci.no_hs=1, reconnected HDD and retried the test. iostat output was: %iostat -d -K -w 10 da0 da0 KB/t tps MB/s 2.88 0 0.00 63.19 8 0.49 64.00 11 0.69 64.00 11 0.69 64.00 11 0.68 64.00 11 0.69 64.00 11 0.69 64.00 11 0.69 64.00 11 0.68 64.00 11 0.69 41.81 7 0.28 0.00 0 0.00 ^C %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 1000+0 records in 1000+0 records out 65536000 bytes transferred in 91.364733 secs (717301 bytes/sec) So, this time no idle periods but I'm still not happy with the speed. Eugene Grosbein From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 14:43:52 2009 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 34D8D1065692 for ; Sun, 27 Sep 2009 14:43:52 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9051A8FC2F for ; Sun, 27 Sep 2009 14:43:51 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=pZqXNPWrx7QA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=RJzJ1XmNAAAA:8 a=E9OOGue6BBqRPtDuEKgA:9 a=nXSt2WG46QiWXVAgvlwA:7 a=0bPjovdrJUCA5ljWh_vxouZhDJ8A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1136536560; Sun, 27 Sep 2009 16:28:50 +0200 Received-SPF: softfail receiver=mailfe12.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 27 Sep 2009 16:29:29 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20090927141205.GA19251@svzserv.kemerovo.su> In-Reply-To: <20090927141205.GA19251@svzserv.kemerovo.su> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909271629.31368.hselasky@freebsd.org> Cc: Eugene Grosbein Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 27 Sep 2009 14:43:52 -0000 On Sunday 27 September 2009 16:12:05 Eugene Grosbein wrote: > > Could you check if these are due to device timeouts in the CAM layer? > > There is some debugging you can turn on: > > > > sysctl hw.usb.umass.debug=-1 > > > > Probably it will flood the console. > > That's not a problem. Anyway, I rlogin to this system > and use syslog to write all console/kernel logs to console.log > and kernel.log > > So, I have done: > > %sysctl hw.usb.umass.debug=-1 > hw.usb.umass.debug: 0 -> -1 > > Then used another terminal to ran: > > %iostat -d -K -w 10 da0 > da0 > KB/t tps MB/s > 2.88 0 0.00 > > After it started, I switched back to first terminal and ran: > > %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 > > It started to work, meantime iostat output was: > > 63.62 17 1.05 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > 64.00 2 0.15 > 62.31 83 5.06 > 0.25 0 0.00 > 0.00 0 0.00 > 0.00 0 0.00 > ^C > > To this moment, dd has finished his work and printed: > > 1000+0 records in > 1000+0 records out > 65536000 bytes transferred in 78.627073 secs (833504 bytes/sec) > > One can see, it sent first chunk of data to the device > than there was quite large period of time without any activity, > more than 50 seconds. Then it has finished. > > As for debug log, its uncompressed size is over megabyte > so I've made it available here (25KB compressed): > > http://www.grosbein.pp.ru/umass.log.gz > > I cannot read/understand it yet. > > > Maybe you could add some prints to > > /sys/dev/usb/storage/umass.c in all the "default:" cases in the USB > > callbacks and print out the "error" code. That would quickly indicate if > > your device has an issue with timing, I.E. that the firmware in the USB > > device part is hanging. > > I still suppose the device is fine because it presents no such problem > being connected to another box with the same 8.0-RC1 (same sources). > > Also, I don't feel myself confident with the code to debug it yet... > Hi, The following debug prints clearly show that your device does not respond. And the USB stack kicks in after a while to fetch the status of the drive. Previously when I have seen this kind of issues, it was always the USB device stack that was at failure. I've never seen that it was the fault of the USB host stack. You would need an USB analyser to figure out for sure. If the situation is that the USB device hardware is reponding with NAKs to the OUT or PING tokens (USB term), then the schedule on the USB host is setup correctly and it is a device problem. Have you tried contacting the manufacturer of your USB device about this? What is the CPU speed difference between the two boxes you are running tests on? Sep 27 21:50:13 gw kernel: umass0:umass_dump_buffer: 0x 00000000000000000000000000000000 ... Sep 27 21:50:13 gw kernel: umass0:umass_bbb_dump_cbw: CBW 208: cmd = 10b (0x2a0000005400...), data = 65536b, lun = 0, dir = out Sep 27 21:50:13 gw kernel: umass0:umass_transfer_start: transfer index = 6 Sep 27 21:50:13 gw kernel: umass0:umass_t_bbb_data_write_callback: max_bulk=131072, data_rem=65536 Sep 27 21:51:17 gw kernel: umass0:umass_transfer_start: transfer index = 7 Sep 27 21:51:17 gw kernel: umass0:umass_transfer_start: transfer index = 8 Sep 27 21:51:17 gw kernel: umass0:umass_bbb_dump_csw: CSW 208: sig = 0x53425355 (valid), tag = 0x000000d0, res = 65536, status = 0x01 (failed) Sep 27 21:51:17 gw kernel: umass0:umass_t_bbb_status_callback: Command failed, residue = 65536 --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 16:14:10 2009 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 DFA68106566B; Sun, 27 Sep 2009 16:14:10 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 4838E8FC0A; Sun, 27 Sep 2009 16:14:09 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8RGE8rO026131; Mon, 28 Sep 2009 00:14:08 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8RGE8dp026130; Mon, 28 Sep 2009 00:14:08 +0800 (KRAST) (envelope-from eugen) Date: Mon, 28 Sep 2009 00:14:08 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090927161407.GA25879@svzserv.kemerovo.su> References: <20090926081733.GA24121@svzserv.kemerovo.su> <20090927141205.GA19251@svzserv.kemerovo.su> <20090927143138.GA20842@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090927143138.GA20842@svzserv.kemerovo.su> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 27 Sep 2009 16:14:11 -0000 On Sun, Sep 27, 2009 at 10:31:38PM +0800, Eugene Grosbein wrote: > > %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 > > > > It started to work, meantime iostat output was: > > > > 63.62 17 1.05 > > 0.00 0 0.00 > > 0.00 0 0.00 > > 0.00 0 0.00 > > 0.00 0 0.00 > > 0.00 0 0.00 > > 64.00 2 0.15 > > 62.31 83 5.06 > > 0.25 0 0.00 > > 0.00 0 0.00 > > 0.00 0 0.00 > > ^C I've repeated the test with my USB flash drive formatted as FAT32. It gives the same result: for ICH7-based system I get 26 megabyte/s file writing speed and for AMD CS5536 it suffers from long periods of inactivity while writing data, hence very low awarage writing speed. It seems the root of the problem is in the interaction between USB stack and AMD CS5536 (Geode) USB 2.0 controller and not in media devices themselves. Any more hints please? Eugene Grosbein From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 17:50:15 2009 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 40BA5106568F; Sun, 27 Sep 2009 17:50:15 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 986158FC1E; Sun, 27 Sep 2009 17:50:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=7H_uI1Jp-TAA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=I8vkOwftpKyv8B4xJjkA:9 a=7aerLU9yPSJS8G4woOYcLmZ0aGgA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1309035787; Sun, 27 Sep 2009 19:50:12 +0200 Received-SPF: softfail receiver=mailfe04.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 27 Sep 2009 19:50:54 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200909251909.31503.hselasky@freebsd.org> <4ABD4EDF.4040807@acm.poly.edu> <4ABE2B4F.6080104@tomjudge.com> In-Reply-To: <4ABE2B4F.6080104@tomjudge.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909271950.55189.hselasky@freebsd.org> Cc: Tom Judge , freebsd-current@freebsd.org Subject: Re: Polling support for USB serial port adapters [patches] 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, 27 Sep 2009 17:50:15 -0000 Hi, Here is a patchset which you can try. http://perforce.freebsd.org/chv.cgi?CH=168932 You need to download at least: usb_serial.h and usb_serial.c Download serial port drivers as needed. You need to at least recompile all USB serial modules. To enable you set: hw.usb.ucom.cons_unit=0 hw.usb.ucom.cons_baud=9600 In /boot/loader.conf NOTE: The patches have not been tested yet, only carefully reviewed. If you experience any problems, please debug and send patch to me. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 18:39:54 2009 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 2B1CB1065679 for ; Sun, 27 Sep 2009 18:39:54 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe10.swip.net [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id AFD438FC0A for ; Sun, 27 Sep 2009 18:39:53 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=pZqXNPWrx7QA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=KB5axwVsmrnc1LXG-7sA:9 a=RuGn_q4dLqwLkd8h-wV-i2q9B2YA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1138317495; Sun, 27 Sep 2009 19:39:50 +0200 Received-SPF: softfail receiver=mailfe10.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: Eugene Grosbein Date: Sun, 27 Sep 2009 19:40:31 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20090926081733.GA24121@svzserv.kemerovo.su> <20090927143138.GA20842@svzserv.kemerovo.su> <20090927161407.GA25879@svzserv.kemerovo.su> In-Reply-To: <20090927161407.GA25879@svzserv.kemerovo.su> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909271940.32878.hselasky@freebsd.org> Cc: usb@freebsd.org Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 27 Sep 2009 18:39:54 -0000 On Sunday 27 September 2009 18:14:08 Eugene Grosbein wrote: > On Sun, Sep 27, 2009 at 10:31:38PM +0800, Eugene Grosbein wrote: > > > %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 > > > > > > It started to work, meantime iostat output was: > > > > > > 63.62 17 1.05 > > > 0.00 0 0.00 > > > 0.00 0 0.00 > > > 0.00 0 0.00 > > > 0.00 0 0.00 > > > 0.00 0 0.00 > > > 64.00 2 0.15 > > > 62.31 83 5.06 > > > 0.25 0 0.00 > > > 0.00 0 0.00 > > > 0.00 0 0.00 > > > ^C > > I've repeated the test with my USB flash drive formatted as FAT32. > It gives the same result: for ICH7-based system I get 26 megabyte/s > file writing speed and for AMD CS5536 it suffers from long periods of > inactivity while writing data, hence very low awarage writing speed. > > It seems the root of the problem is in the interaction > between USB stack and AMD CS5536 (Geode) USB 2.0 controller > and not in media devices themselves. > > Any more hints please? sysctl hw.usb.ehci.debug=15 If the USB stack puts the new job into the schedule and the USB controller does not pick it up, it is not an USB stack problem ... --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 19:39:08 2009 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 792F51065676; Sun, 27 Sep 2009 19:39:08 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vw0-f180.google.com (mail-vw0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id 115FC8FC16; Sun, 27 Sep 2009 19:39:07 +0000 (UTC) Received: by vws10 with SMTP id 10so3293058vws.7 for ; Sun, 27 Sep 2009 12:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=syEKJux2WaTnHd4+pis02EPvPDM2Dn2DINbGbnxQxcc=; b=mC+swJ9QRsBFRsWnsI385OJhvIeCFxIVO9nW8Sh/QKOojfA2swPRozSrE44o1YhfdL /cADJqWrv6GjfGawADSt0ptfSYyyATYmsvIJTbMU0kY67SxGkwbJ8+TOzeyxOHzLYXJ8 +3qmEER7g43LhPb3qBkGY7610tbpNslu4bsvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Gl22XJ2a4SdCzL/SgujdTGmPHcdfA7d0vY6ctJfcCEIKIPRjHLkqjJiTYdXsna6zNd JzpPM2RdwBnK/4CTT1XEc1QXy+BCmDAvmNxfwGLqclUgMEt2yCXzeLxxEDgr4kzf81f4 x24vHh4nVqav1WN3sUl7fzD67rFx59rB8LL6M= MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.220.78.13 with SMTP id i13mr4336756vck.36.1254078640001; Sun, 27 Sep 2009 12:10:40 -0700 (PDT) In-Reply-To: <200909260916.45106.hselasky@c2i.net> References: <200909252038.n8PKcEch066064@www.freebsd.org> <200909260916.45106.hselasky@c2i.net> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sun, 27 Sep 2009 21:10:19 +0200 X-Google-Sender-Auth: a51c955be8297f2b Message-ID: <3131aa530909271210j203238f0w67056025e08fc345@mail.gmail.com> To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/139142: [regression] ehci drivers (NVIDIA nForce4 USB 2.0 controller ) not working with 8.0-RC1 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, 27 Sep 2009 19:39:08 -0000 Hi, On Sat, Sep 26, 2009 at 9:16 AM, Hans Petter Selasky wrote: > Have you tried only disabling USB Legacy support? No change with USB Legacy support disabled on the BIOS: kernel still hang on the same place. > > There is another USB related thread going on: > > "sb600/sb700 ohci experimental patch" on -current. > > Have you tried any patches from there? No change with this patch: kernel still hang on the same place. I hope that my patched ohci.c h was correct because I need to "manualy" patch the file: the given patch file have an error: [root@d630]/usr/src/sys/dev/usb/controller#patch < patch-2.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c |index 30592c1..fb6ba34 100644 |--- a/sys/dev/usb/controller/ohci.c |+++ b/sys/dev/usb/controller/ohci.c -------------------------- Patching file ohci.c using Plan A... patch: **** malformed patch at line 12: OHCI_CLE | Thanks, Olivier From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 19:40:04 2009 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 8EED81065672 for ; Sun, 27 Sep 2009 19:40:04 +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 7CD968FC24 for ; Sun, 27 Sep 2009 19:40:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8RJe386069185 for ; Sun, 27 Sep 2009 19:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8RJe32U069184; Sun, 27 Sep 2009 19:40:03 GMT (envelope-from gnats) Date: Sun, 27 Sep 2009 19:40:03 GMT Message-Id: <200909271940.n8RJe32U069184@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Cc: Subject: Re: usb/139142: [regression] ehci drivers (NVIDIA nForce4 USB 2.0 controller ) not working with 8.0-RC1 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2009 19:40:04 -0000 The following reply was made to PR usb/139142; it has been noted by GNATS. From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org, freebsd-gnats-submit@freebsd.org Subject: Re: usb/139142: [regression] ehci drivers (NVIDIA nForce4 USB 2.0 controller ) not working with 8.0-RC1 Date: Sun, 27 Sep 2009 21:10:19 +0200 Hi, On Sat, Sep 26, 2009 at 9:16 AM, Hans Petter Selasky wrote: > Have you tried only disabling USB Legacy support? No change with USB Legacy support disabled on the BIOS: kernel still hang on the same place. > > There is another USB related thread going on: > > "sb600/sb700 ohci experimental patch" on -current. > > Have you tried any patches from there? No change with this patch: kernel still hang on the same place. I hope that my patched ohci.c h was correct because I need to "manualy" patch the file: the given patch file have an error: [root@d630]/usr/src/sys/dev/usb/controller#patch < patch-2.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c |index 30592c1..fb6ba34 100644 |--- a/sys/dev/usb/controller/ohci.c |+++ b/sys/dev/usb/controller/ohci.c -------------------------- Patching file ohci.c using Plan A... patch: **** malformed patch at line 12: OHCI_CLE | Thanks, Olivier From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 00:09:59 2009 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 1A7A21065672; Mon, 28 Sep 2009 00:09:59 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 791B98FC1D; Mon, 28 Sep 2009 00:09:58 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8S09ss0055657; Mon, 28 Sep 2009 08:09:54 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8S09sft055656; Mon, 28 Sep 2009 08:09:54 +0800 (KRAST) (envelope-from eugen) Date: Mon, 28 Sep 2009 08:09:54 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090928000954.GA55370@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909271629.31368.hselasky@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 00:09:59 -0000 > The following debug prints clearly show that your device does not respond. > And the USB stack kicks in after a while to fetch the status of the drive. > Previously when I have seen this kind of issues, it was always the USB device > stack that was at failure. I've never seen that it was the fault of the USB > host stack. Then I wonder why both devices (HDD and flash) do not respond being attached to this CS5536-system and work just fine with another systems. > You would need an USB analyser to figure out for sure. If the > situation is that the USB device hardware is reponding with NAKs to the OUT > or PING tokens (USB term), then the schedule on the USB host is setup correctly > and it is a device problem. What is USB analyser in first place? :-) > Have you tried contacting the manufacturer of your USB device about this? No, because it works with other boxes. > What is the CPU speed difference between the two boxes you are running > tests on? CS5536-based system is uniprocessor and has: CPU: Geode(TM) Integrated Processor by AMD PCS (499.90-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x5a2 Stepping = 2 Features=0x88a93d AMD Features=0xc0400000 The CPU is idle while dd is running: CPU: 0.4% user, 0.0% nice, 0.8% system, 1.2% interrupt, 97.7% idle My ICH7-based desktop is SMP and has: CPU: Intel(R) Pentium(R) D CPU 2.80GHz (2805.72-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf62 Stepping = 2 Features=0xbfebfbff Features2=0xe43d AMD Features=0x20100000 AMD Features2=0x1 TSC: P-state invariant Eugene Grosbein From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 03:42:11 2009 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 9B2A5106566B; Mon, 28 Sep 2009 03:42:11 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 063E08FC08; Mon, 28 Sep 2009 03:42:10 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8S3g8P1064974; Mon, 28 Sep 2009 11:42:08 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8S3g8sI064973; Mon, 28 Sep 2009 11:42:08 +0800 (KRAST) (envelope-from eugen) Date: Mon, 28 Sep 2009 11:42:08 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090928034208.GA64444@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909271940.32878.hselasky@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 03:42:11 -0000 >> I've repeated the test with my USB flash drive formatted as FAT32. >> It gives the same result: for ICH7-based system I get 26 megabyte/s >> file writing speed and for AMD CS5536 it suffers from long periods of >> inactivity while writing data, hence very low awarage writing speed. >> >> It seems the root of the problem is in the interaction >> between USB stack and AMD CS5536 (Geode) USB 2.0 controller >> and not in media devices themselves. >> >> Any more hints please? > > sysctl hw.usb.ehci.debug=15 For USB HDD: %sysctl hw.usb.ehci.debug=15 hw.usb.ehci.debug: 0 -> 15 %date; dd if=/dev/zero bs=64k of=/dev/da0 count=100; date Mon Sep 28 11:25:26 KRAST 2009 100+0 records in 100+0 records out 6553600 bytes transferred in 14.912198 secs (439479 bytes/sec) Mon Sep 28 11:25:43 KRAST 2009 The log is half-megabyte and is available here (13KB compressed): http://www.grosbein.pp.ru/ehci.log.gz > If the USB stack puts the new job into the schedule and the USB controller > does not pick it up, it is not an USB stack problem ... If so, any workarounds possible? Eugene Grisbeibn From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 04:48:37 2009 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 F231D1065670; Mon, 28 Sep 2009 04:48:37 +0000 (UTC) (envelope-from pldrouin@pldrouin.net) Received: from smtp.cyberfingers.net (smtp.cyberfingers.net [198.177.254.227]) by mx1.freebsd.org (Postfix) with ESMTP id CEBD28FC1A; Mon, 28 Sep 2009 04:48:37 +0000 (UTC) Received: from mdaemon.pldrouin.net (CPE0023695b905f-CM001a666aca96.cpe.net.cable.rogers.com [99.246.67.95]) by smtp.cyberfingers.net (Postfix) with ESMTP id D4359AB6C14; Mon, 28 Sep 2009 00:45:46 -0400 (EDT) Message-ID: <4AC04026.9090202@pldrouin.net> Date: Mon, 28 Sep 2009 00:48:38 -0400 From: Pierre-Luc Drouin User-Agent: Thunderbird 2.0.0.23 (X11/20090824) MIME-Version: 1.0 To: freebsd-usb@freebsd.org, ed@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Asynchronous Communications with uftdi/ucom (Is there a bug?) 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, 28 Sep 2009 04:48:38 -0000 Hi, I am trying to communicate with a fan controller that uses a FTDI FT232BL chip with uftdi/ucom and I am having troubles with asynchronous communications on FreeBSD (7.2 amd64 and 8.0-RC1 amd64, although what I present here has been obtained with 8.0-RC1 amd64). The exact same code works perfectly on Linux (amd64 on the same machine). I got synchronous communications working, but it seems that in asynchronous communications, SIGIO is generated randomly and read statements produce either junk or return the EINT, "Interrupted system call" error. What I did is to write simplified code where I only request the device to provide its status. I have a source file that performs this in synchronous mode (bigngtest.c) and another one that does this in asynchronous mode (bigngtestasync.c). I ran both codes while enabling debug mode for uftdi and ucom and I put the output to stdout and the output to dmesg in some files. I also created files where I put the output when running the same codes on Linux. These files can be found in a bzipped2 tar file here: http://download.yousendit.com/Y1Ryc0wwdGpVbTlFQlE9PQ To summarize, here is how I set asynchronous mode compared to synchronous mode, in a "diff" format > struct sigaction saio; < fd=open(DEV, O_RDWR | O_NOCTTY); > fd=open(DEV, O_RDWR | O_NOCTTY | O_NONBLOCK); ... > /* Install the signal handler before making the device asynchronous */ > saio.sa_handler = signal_handler_IO; > result = sigemptyset(&saio.sa_mask); > if(result<0) { > perror("sigemptyset"); > return 1; > } > saio.sa_flags = 0; > sigaction(SIGIO,&saio,NULL); > > /* Allow the process to receive SIGIO */ > fcntl(fd, F_SETOWN, getpid()); > /* Make the file descriptor asynchronous */ > fcntl(fd, F_SETFL, FASYNC); Please let me know if there are additional commands that are required to set asynchronous mode correctly on FreeBSD. Otherwise, it looks like there might be a bug somewhere in a kernel driver... Thank you! Pierre-Luc Drouin From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 06:48:46 2009 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 68829106566C for ; Mon, 28 Sep 2009 06:48:46 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe15.tele2.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id ED8CD8FC08 for ; Mon, 28 Sep 2009 06:48:45 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=pZqXNPWrx7QA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=RJzJ1XmNAAAA:8 a=LQyMY8Sc4IqIbjpJSDYA:9 a=Suxz-cYtk-KWjR0g9HAA:7 a=lSkjNPNBMQvaPkDaQj5tDxlHN0YA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 568888613; Mon, 28 Sep 2009 08:48:40 +0200 Received-SPF: softfail receiver=mailfe15.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: Eugene Grosbein Date: Mon, 28 Sep 2009 08:49:21 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20090928034208.GA64444@svzserv.kemerovo.su> In-Reply-To: <20090928034208.GA64444@svzserv.kemerovo.su> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909280849.22346.hselasky@freebsd.org> Cc: usb@freebsd.org Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 06:48:46 -0000 On Monday 28 September 2009 05:42:08 Eugene Grosbein wrote: > >> I've repeated the test with my USB flash drive formatted as FAT32. > >> It gives the same result: for ICH7-based system I get 26 megabyte/s > >> file writing speed and for AMD CS5536 it suffers from long periods of > >> inactivity while writing data, hence very low awarage writing speed. > >> > >> It seems the root of the problem is in the interaction > >> between USB stack and AMD CS5536 (Geode) USB 2.0 controller > >> and not in media devices themselves. > >> > >> Any more hints please? > > > > sysctl hw.usb.ehci.debug=15 > > For USB HDD: > > %sysctl hw.usb.ehci.debug=15 > hw.usb.ehci.debug: 0 -> 15 > %date; dd if=/dev/zero bs=64k of=/dev/da0 count=100; date > Mon Sep 28 11:25:26 KRAST 2009 > 100+0 records in > 100+0 records out > 6553600 bytes transferred in 14.912198 secs (439479 bytes/sec) > Mon Sep 28 11:25:43 KRAST 2009 > > The log is half-megabyte and is available here (13KB compressed): > > http://www.grosbein.pp.ru/ehci.log.gz I don't see any timeouts in there. You need to run the test until you see something about "timeout". > > > If the USB stack puts the new job into the schedule and the USB > > controller does not pick it up, it is not an USB stack problem ... > > If so, any workarounds possible? None which I know about. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 06:51:18 2009 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 8BD49106568B for ; Mon, 28 Sep 2009 06:51:18 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 1E5F78FC12 for ; Mon, 28 Sep 2009 06:51:17 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=pZqXNPWrx7QA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=sy2lhLmlTyR4mWlB2ccA:9 a=97ctHTKuoVU8YlLkptQOeuvSZXAA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1304089874; Mon, 28 Sep 2009 08:51:15 +0200 Received-SPF: softfail receiver=mailfe07.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 28 Sep 2009 08:51:57 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <20090928000954.GA55370@svzserv.kemerovo.su> In-Reply-To: <20090928000954.GA55370@svzserv.kemerovo.su> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909280851.58539.hselasky@freebsd.org> Cc: Eugene Grosbein Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 06:51:18 -0000 On Monday 28 September 2009 02:09:54 Eugene Grosbein wrote: > What is USB analyser in first place? :-) Search for beagle USB analyzer at google. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 07:27:29 2009 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 5F46C1065676; Mon, 28 Sep 2009 07:27:29 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id BCB758FC19; Mon, 28 Sep 2009 07:27:28 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8S7RQRj075769; Mon, 28 Sep 2009 15:27:26 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8S7RQL3075768; Mon, 28 Sep 2009 15:27:26 +0800 (KRAST) (envelope-from eugen) Date: Mon, 28 Sep 2009 15:27:26 +0800 From: Eugene Grosbein To: Hans Petter Selasky Message-ID: <20090928072726.GA75536@svzserv.kemerovo.su> References: <20090928034208.GA64444@svzserv.kemerovo.su> <200909280849.22346.hselasky@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909280849.22346.hselasky@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 07:27:29 -0000 On Mon, Sep 28, 2009 at 08:49:21AM +0200, Hans Petter Selasky wrote: > > For USB HDD: > > > > %sysctl hw.usb.ehci.debug=15 > > hw.usb.ehci.debug: 0 -> 15 > > %date; dd if=/dev/zero bs=64k of=/dev/da0 count=100; date > > Mon Sep 28 11:25:26 KRAST 2009 > > 100+0 records in > > 100+0 records out > > 6553600 bytes transferred in 14.912198 secs (439479 bytes/sec) > > Mon Sep 28 11:25:43 KRAST 2009 > > > > The log is half-megabyte and is available here (13KB compressed): > > > > http://www.grosbein.pp.ru/ehci.log.gz > > I don't see any timeouts in there. You need to run the test until you see > something about "timeout". It's so strange... While hw.usb.ehci.debug=15 idle periods are very seldom, iostat shows nearly constat (but very slow) data rate: KB/t tps MB/s 64.00 9 0.57 64.00 9 0.57 64.00 9 0.57 64.00 9 0.57 64.00 9 0.57 No 'timeout' word in the log. It seems that debugging changes something. Eugene Grosbein From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 07:50:02 2009 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 D3F84106566C for ; Mon, 28 Sep 2009 07:50: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 C40D78FC08 for ; Mon, 28 Sep 2009 07:50:02 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8S7o2wZ052339 for ; Mon, 28 Sep 2009 07:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8S7o2Kc052338; Mon, 28 Sep 2009 07:50:02 GMT (envelope-from gnats) Date: Mon, 28 Sep 2009 07:50:02 GMT Message-Id: <200909280750.n8S7o2Kc052338@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/138389: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 07:50:02 -0000 The following reply was made to PR usb/138389; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/138389: commit references a PR Date: Mon, 28 Sep 2009 07:40:07 +0000 (UTC) Author: thompsa Date: Mon Sep 28 07:39:51 2009 New Revision: 197558 URL: http://svn.freebsd.org/changeset/base/197558 Log: Fix NULL-pointer dereference in usb_endpoint_foreach(). PR: usb/138389 Submitted by: Patroklos Argyroudis at census, inc Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Mon Sep 28 07:32:11 2009 (r197557) +++ head/sys/dev/usb/usb_device.c Mon Sep 28 07:39:51 2009 (r197558) @@ -367,12 +367,14 @@ usb_init_endpoint(struct usb_device *ude struct usb_endpoint * usb_endpoint_foreach(struct usb_device *udev, struct usb_endpoint *ep) { - struct usb_endpoint *ep_end = udev->endpoints + udev->endpoints_max; + struct usb_endpoint *ep_end; /* be NULL safe */ if (udev == NULL) return (NULL); + ep_end = udev->endpoints + udev->endpoints_max; + /* get next endpoint */ if (ep == NULL) ep = udev->endpoints; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 07:50:04 2009 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 AA99C1065711 for ; Mon, 28 Sep 2009 07:50:04 +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 9A3BA8FC14 for ; Mon, 28 Sep 2009 07:50:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8S7o4Zk052370 for ; Mon, 28 Sep 2009 07:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8S7o4tZ052367; Mon, 28 Sep 2009 07:50:04 GMT (envelope-from gnats) Date: Mon, 28 Sep 2009 07:50:04 GMT Message-Id: <200909280750.n8S7o4tZ052367@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/138563: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 07:50:04 -0000 The following reply was made to PR usb/138563; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/138563: commit references a PR Date: Mon, 28 Sep 2009 07:41:31 +0000 (UTC) Author: thompsa Date: Mon Sep 28 07:41:17 2009 New Revision: 197559 URL: http://svn.freebsd.org/changeset/base/197559 Log: Add support for USB language selection. PR: usb/138563 Reported by: Bruce Cran Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Mon Sep 28 07:39:51 2009 (r197558) +++ head/sys/dev/usb/usb_bus.h Mon Sep 28 07:41:17 2009 (r197559) @@ -98,10 +98,14 @@ struct usb_bus { uint8_t devices_max; /* maximum number of USB devices */ uint8_t do_probe; /* set if USB BUS should be re-probed */ + /* + * The scratch area can only be used inside the explore thread + * belonging to the give serial bus. + */ union { struct usb_hw_ep_scratch hw_ep_scratch[1]; struct usb_temp_setup temp_setup[1]; - uint8_t data[128]; + uint8_t data[255]; } scratch[1]; }; Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Mon Sep 28 07:39:51 2009 (r197558) +++ head/sys/dev/usb/usb_device.c Mon Sep 28 07:41:17 2009 (r197559) @@ -105,9 +105,23 @@ static void usb_cdev_cleanup(void *); int usb_template = 0; +TUNABLE_INT("hw.usb.usb_template", &usb_template); SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RW, &usb_template, 0, "Selected USB device side template"); +/* English is default language */ + +static int usb_lang_id = 0x0009; +static int usb_lang_mask = 0x00FF; + +TUNABLE_INT("hw.usb.usb_lang_id", &usb_lang_id); +SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_id, CTLFLAG_RW, + &usb_lang_id, 0, "Preferred USB language ID"); + +TUNABLE_INT("hw.usb.usb_lang_mask", &usb_lang_mask); +SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_mask, CTLFLAG_RW, + &usb_lang_mask, 0, "Preferred USB language mask"); + static const char* statestr[USB_STATE_MAX] = { [USB_STATE_DETACHED] = "DETACHED", [USB_STATE_ATTACHED] = "ATTACHED", @@ -1436,7 +1450,7 @@ usb_alloc_device(device_t parent_dev, st struct usb_device *adev; struct usb_device *hub; uint8_t *scratch_ptr; - uint32_t scratch_size; + size_t scratch_size; usb_error_t err; uint8_t device_index; @@ -1682,8 +1696,35 @@ usb_alloc_device(device_t parent_dev, st if (err || (scratch_ptr[0] < 4)) { udev->flags.no_strings = 1; } else { - /* pick the first language as the default */ - udev->langid = UGETW(scratch_ptr + 2); + uint16_t langid; + uint16_t pref; + uint16_t mask; + uint8_t x; + + /* load preferred value and mask */ + pref = usb_lang_id; + mask = usb_lang_mask; + + /* align length correctly */ + scratch_ptr[0] &= ~1; + + /* fix compiler warning */ + langid = 0; + + /* search for preferred language */ + for (x = 2; (x < scratch_ptr[0]); x += 2) { + langid = UGETW(scratch_ptr + x); + if ((langid & mask) == pref) + break; + } + if (x >= scratch_ptr[0]) { + /* pick the first language as the default */ + DPRINTFN(1, "Using first language\n"); + langid = UGETW(scratch_ptr + 2); + } + + DPRINTFN(1, "Language selected: 0x%04x\n", langid); + udev->langid = langid; } /* assume 100mA bus powered for now. Changed when configured. */ @@ -2149,34 +2190,35 @@ usbd_set_device_strings(struct usb_devic #ifdef USB_VERBOSE const struct usb_knowndev *kdp; #endif - char temp[64]; + uint8_t *temp_ptr; + size_t temp_size; uint16_t vendor_id; uint16_t product_id; + temp_ptr = udev->bus->scratch[0].data; + temp_size = sizeof(udev->bus->scratch[0].data); + vendor_id = UGETW(udd->idVendor); product_id = UGETW(udd->idProduct); /* get serial number string */ - bzero(temp, sizeof(temp)); - usbd_req_get_string_any(udev, NULL, temp, sizeof(temp), + usbd_req_get_string_any(udev, NULL, temp_ptr, temp_size, udev->ddesc.iSerialNumber); - udev->serial = strdup(temp, M_USB); + udev->serial = strdup(temp_ptr, M_USB); /* get manufacturer string */ - bzero(temp, sizeof(temp)); - usbd_req_get_string_any(udev, NULL, temp, sizeof(temp), + usbd_req_get_string_any(udev, NULL, temp_ptr, temp_size, udev->ddesc.iManufacturer); - usb_trim_spaces(temp); - if (temp[0] != '\0') - udev->manufacturer = strdup(temp, M_USB); + usb_trim_spaces(temp_ptr); + if (temp_ptr[0] != '\0') + udev->manufacturer = strdup(temp_ptr, M_USB); /* get product string */ - bzero(temp, sizeof(temp)); - usbd_req_get_string_any(udev, NULL, temp, sizeof(temp), + usbd_req_get_string_any(udev, NULL, temp_ptr, temp_size, udev->ddesc.iProduct); - usb_trim_spaces(temp); - if (temp[0] != '\0') - udev->product = strdup(temp, M_USB); + usb_trim_spaces(temp_ptr); + if (temp_ptr[0] != '\0') + udev->product = strdup(temp_ptr, M_USB); #ifdef USB_VERBOSE if (udev->manufacturer == NULL || udev->product == NULL) { @@ -2202,12 +2244,12 @@ usbd_set_device_strings(struct usb_devic #endif /* Provide default strings if none were found */ if (udev->manufacturer == NULL) { - snprintf(temp, sizeof(temp), "vendor 0x%04x", vendor_id); - udev->manufacturer = strdup(temp, M_USB); + snprintf(temp_ptr, temp_size, "vendor 0x%04x", vendor_id); + udev->manufacturer = strdup(temp_ptr, M_USB); } if (udev->product == NULL) { - snprintf(temp, sizeof(temp), "product 0x%04x", product_id); - udev->product = strdup(temp, M_USB); + snprintf(temp_ptr, temp_size, "product 0x%04x", product_id); + udev->product = strdup(temp_ptr, M_USB); } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 11:07:06 2009 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 1188F106566B for ; Mon, 28 Sep 2009 11:07:06 +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 F1DD08FC16 for ; Mon, 28 Sep 2009 11:07:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SB75MN064200 for ; Mon, 28 Sep 2009 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8SB756S064196 for freebsd-usb@FreeBSD.org; Mon, 28 Sep 2009 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Sep 2009 11:07:05 GMT Message-Id: <200909281107.n8SB756S064196@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, 28 Sep 2009 11:07:06 -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/139142 usb [regression] ehci drivers (NVIDIA nForce4 USB 2.0 cont o usb/138915 usb [patch][usb8][usb67] add support for SheevaPlug serial o usb/138904 usb [rum] unpluging USB wifi card panics system f usb/138882 usb [ohci] [panic] Can't install FreeBSD 7.2 due to ohci p o usb/138879 usb [uftdi] [patch] Patch to add support for CTI USB-Mini o usb/138798 usb 8.0-BETA4 can't boot from USB flash drive o usb/138675 usb [usb8] [panic] page fault, perhaps in USB o usb/138659 usb [usb8][uftdi] driver broken in RELENG_8/CURRENT o usb/138563 usb [usb8] [patch] Increase buffer sizes to accomodate lon o usb/138389 usb [usb8] [patch] NULL pointer dereference in usb_endpoin o usb/138175 usb [usb67] [boot] System cannot boot, when USB reader wit o usb/138172 usb Additional dev id for u3g (Option mini PCIe) o usb/138138 usb Novatel U760 for u3g (Verizon and Bell Canada) o usb/138124 usb [usb8] Axed uaudio functionality in the usbng (alterna o usb/138119 usb MultiBay CDROM (propably on USB bus) is not recognized o usb/137872 usb slow booting on usb flash drive f usb/137848 usb Page fault when using an USB bluetooth adapter o usb/137806 usb [ukbd] USB keyboard doesn't work until it's unplugged o usb/137763 usb [usb67][ukbd] Logitech wireless keyboard media keys no o usb/137616 usb [usb67][usb8][usbdevs] [patch]: usbdevs update: Please o usb/137377 usb [usb8] Support for Huawei E180 o usb/137341 usb [usb8][rum] driver if_rum doesn't work at all and thro p usb/137226 usb [usb67][patch] quirk for Philips extern USB disk o usb/137191 usb [usb8][patch] export ums(4) output report parser data o usb/137190 usb [usb8][patch] inhibit spurious button releases for som o usb/137189 usb [usb8][patch] create and use sysctl nodes for HID repo p usb/137188 usb [usb8][patch] correctly handle USB report descriptors o usb/137129 usb SteelSeries Ikari USB laser mouse not attaching o usb/137035 usb Sony cyber-shot DSC-P72 not accessible - cam quirks p usb/136761 usb [usbdevs][usb67][patch] Teach usbdevs / u3g(4) about H o usb/135938 usb [aue] aue driver only passes traffic in promisc mode f usb/135857 usb RTL8187 Wireless Adapter o usb/135575 usb [usbdevs] [patch] Add HTC Wizard phone vid/pid informa o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa p usb/135372 usb [usb67][umass] Quirk report for Teclast TL-C300 usb me o usb/135348 usb [umass] USB Drive Hangs with ZFS (JMicron USB2/eSata) o usb/135206 usb machine reboots when inserted USB device o usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/135182 usb UMASS quirk - Olympus FE20 camera o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134633 usb Add support for WILLCOM03(SHARP smart phone) o usb/134631 usb [usbdevs] [patch] WiSPY DBx support requires usb tweak o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134117 usb [Patch] Add support for 'Option GlobeTrotter HSDPA Mod o usb/134085 usb [umass] Adding usb quirk for Sony USB flash drive o usb/133989 usb [newusb] [ukbd] USB keyboard dead at mountroot> prompt o usb/133712 usb [ural] [patch] RE: Fixed an issue with ural(4) that wa o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb [rum] driver not working properly in hostap mode p usb/132799 usb [usb][patch]GENESYS USB2IDE requires NO_SYNCHRONIZE_CA o usb/132785 usb [usb] [patch] Gemtech remote powersocket is classed as o usb/132594 usb USB subsystem causes page fault and crashes o usb/132312 usb Xorg 7.4 halts USB controller o usb/132080 usb [patch] [usb] [rum] Kernel panic after NOMEM caused by o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131912 usb [uslcom] [patch] New devices using Silicon Labs chips o usb/131900 usb [usbdevs] [patch] Additional product identification co o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c o usb/131123 usb [patch] re-add UQ_ASSUME_CM_OVER_DATA USB quirk o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130325 usb [usb] [patch] fix tools/tools/usb/print-usb-if-vids.sh o usb/130230 usb Samsung Electronics YP-U3 does not attach in 7.1-RELEA o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [newusb] DVD drive detects as 'da' device o usb/129945 usb [usbdevs] [patch] add u3g support for Longcheer WM66 U o usb/129766 usb [usb] plugging in usb modem HUAWEI E226 panics system o usb/129758 usb [uftdi] [patch] add Pyramid LCD usb support o usb/129673 usb [uhci] uhci (uhub) confused on replugging USB 1.1 scan o usb/129522 usb [ubsa] [patch] add support for ZTE AC8700 modem o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader o usb/129251 usb [usbdevs] [patch] Liebert UPS being assigned uhid and o usb/129173 usb [uplcom] [patch] Add support for Corega CG-USBRS232R a s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb] [patch] uaudio is not full duplex o usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive o usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/128324 usb [uplcom] [patch] remove baud rate restriction for PL23 o usb/127980 usb [umass] [patch] Fix Samsung YP U2 MP3 player on 7.x an o usb/127926 usb [boot] USB Timeout during bootup s usb/127549 usb [umass] [patch] Meizu MiniPlayer M6 (SL) requires some 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] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attaach and detach o usb/127222 usb [ohci] Regression in 7.0 usb storage generic driver o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c o usb/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 [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d o usb/125450 usb [panic] Removing USB flash card while being accessed c p usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125238 usb [ums] Habu Mouse turns off in X o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U 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] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124604 usb [ums] Microsoft combo wireless mouse doesn't work o kern/124130 usb [usb] gmirror fails to start usb devices that were pre o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l 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 [usbdevs] [patch] Add Option GTMAX3.6/7.2 and Quallcom o usb/123351 usb [usbdevs] [patch] Add Reiner SCT cyberJack, Omnikey [2 o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122956 usb [ubsa] [patch] add support for Novatel Wireless XU870 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 [usb] [patch] Patch to provide dynamic additions to th o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122621 usb [new driver] [patch] New driver for Sierra Wireless 3G 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 [uscanner] [patch] uscanner does not attach to Epson R 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] [panic] FreeBSD fails to boot with usb legacy s o usb/121232 usb [usb] [panic] USB CardBus card removal causes reboot s p 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 [usb] [panic] Kernel panic when forced umount of a det 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/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] 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/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/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a 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 [usb67] [usb8] [umass] [patch] Problem with connection o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/113060 usb [usb67] [ulpt] [patch] Samsung printer not working in o usb/110856 usb [usb67] [ugen] [patch] interrupt in msgs are truncated s usb/108344 usb [usb67] [atausb] [panic] kernel with atausb panics whe o usb/107935 usb [usb67] [uplcom] [panic] panic while accessing /dev/cu o usb/107924 usb [usb67] usbd(8) does not call detach o usb/107827 usb [usb67] [ohci] [panic] ohci_add_done addr not found o usb/107388 usb [usb67] [usb8] [new driver] [patch] add utoppy device o usb/107243 usb [usb67] [cam] [quirk] [patch] Apacer USB Flash Drive q o usb/106041 usb [usb67] [usb8] [request] FreeBSD does not recognise Mu o usb/105361 usb [usb67] [panic] Kernel panic during unmounting mass st s usb/103917 usb [usb67] [uhub] USB driver reports "Addr 0 should never o usb/103418 usb [usb67] [usb8] [patch] [request] usbhidctl(8) add abil o usb/103046 usb [usb67] [ulpt] [patch] ulpt event driven I/O with sele o usb/101775 usb [usb67] [usb8] [libusbhid] [patch] possible error in r o usb/101761 usb [usb67] [patch] [request] usb.h: increase maximal size o usb/100746 usb [usb67] [ukbd] system does not boot due to USB keyboar 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 kern/99200 usb [bluetooth] SMP-Kernel crashes reliably when Bluetooth 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/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 [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 [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/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 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 [sound] [hang] Use of sound mixer causes system freeze 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 [ums] 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] [regression] 5.3-STABLE(2005 1/4) detect USB h 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 s bin/57255 usb [patch] 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 usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 311 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 12:00:14 2009 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 AFAF510656D1 for ; Mon, 28 Sep 2009 12:00:14 +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 83C3B8FC1E for ; Mon, 28 Sep 2009 12:00:14 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SC0EdY021611 for ; Mon, 28 Sep 2009 12:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8SC0EIV021610; Mon, 28 Sep 2009 12:00:14 GMT (envelope-from gnats) Date: Mon, 28 Sep 2009 12:00:14 GMT Message-Id: <200909281200.n8SC0EIV021610@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: usb/138675: [usb8] [panic] page fault, perhaps in USB X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 12:00:14 -0000 The following reply was made to PR usb/138675; it has been noted by GNATS. From: Hans Petter Selasky To: bug-followup@freebsd.org, jhanna@pangolin-systems.com Cc: Subject: usb/138675: [usb8] [panic] page fault, perhaps in USB Date: Mon, 28 Sep 2009 13:56:38 +0200 I believe this issue has been fixed. Please close. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 13:10:58 2009 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 927141065672 for ; Mon, 28 Sep 2009 13:10:58 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id D92458FC28 for ; Mon, 28 Sep 2009 13:10:57 +0000 (UTC) Received: from inchoate.gsoft.com.au (ppp121-45-212-218.lns11.adl2.internode.on.net [121.45.212.218]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n8SDAtb4042791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 28 Sep 2009 22:40:56 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-usb@freebsd.org Date: Mon, 28 Sep 2009 22:40:52 +0930 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4978875.PjjCHLDXoW"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200909282240.53802.doconnor@gsoft.com.au> X-Spam-Score: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Subject: SANE vs USB scanner on 8.0 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, 28 Sep 2009 13:10:58 -0000 --nextPart4978875.PjjCHLDXoW Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I'm trying to get a USB scanner to work with FreeBSD 8.0, it did work=20 with 7.2 via uscanner. It's an AcerScan 620U and I have the firmware and=20 modified /usr/local/etc/sane.d/snapscan.conf. sane-find-scanner sees it, eg [midget 22:37] ~ >sudo sane-find-scanner -q found USB scanner (vendor=3D0x04a5 [Color], product=3D0x2060 [ FlatbedScann= er 13]) at libusb:/dev/usb:/dev/ugen0.5 found USB scanner (vendor=3D0x0403 [FTDI], product=3D0xee18 [MaxStream PKG-= U]) at libusb:/dev/usb:/dev/ugen1.2 I have no idea why the FTDI serial device appears there.. However scanimage -L doesn't show the scanner.. [midget 22:40] ~ >sudo env SANE_DEBUG_SNAPSCAN=3D255 scanimage -v -v -L [sanei_debug] Setting debug level of snapscan to 255. [snapscan] sane_snapscan_init [snapscan] sane_snapscan_init: Snapscan backend version 1.4.53 [snapscan] add_usb_device(libusb:/dev/usb:/dev/ugen0.5) [snapscan] add_usb_device: Detected (kind of) an USB device [snapscan] snapscani_usb_open(libusb:/dev/usb:/dev/ugen0.5) [snapscan] snapscani_mutex_open: could not parse device string: No such fil= e or directory [snapscan] snapscani_usb_open: Can't get semaphore [snapscan] add_usb_device: error opening device libusb:/dev/usb:/dev/ugen0.= 5: Invalid argument [snapscan] sane_snapscan_get_devices (0x7fffffffe200, 0) No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages). Calling sane_exit [snapscan] sane_snapscan_exit scanimage: finished Anyone have any suggestions? =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart4978875.PjjCHLDXoW Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBKwLXd5ZPcIHs/zowRAjcTAJ9hnTEqYLKzQ3VH4ugwsfjSJ0cf3gCcD7j3 WafzbpvDw1+sskI0C7lP+Tc= =LcKw -----END PGP SIGNATURE----- --nextPart4978875.PjjCHLDXoW-- From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 13:36:02 2009 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 BFB74106566B for ; Mon, 28 Sep 2009 13:36:02 +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 2A6448FC1B for ; Mon, 28 Sep 2009 13:36:01 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=l4keI1OFGxci5A2arUoA:9 a=xzo2I5gA7L3BDnc7GwEuXZcQc8kA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 924632657; Mon, 28 Sep 2009 15:35:58 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 28 Sep 2009 15:36:36 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200909282240.53802.doconnor@gsoft.com.au> In-Reply-To: <200909282240.53802.doconnor@gsoft.com.au> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909281536.38747.hselasky@c2i.net> Cc: Daniel O'Connor Subject: Re: SANE vs USB scanner on 8.0 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, 28 Sep 2009 13:36:02 -0000 On Monday 28 September 2009 15:10:52 Daniel O'Connor wrote: > Hi, > I'm trying to get a USB scanner to work with FreeBSD 8.0, it did work > with 7.2 via uscanner. > > It's an AcerScan 620U and I have the firmware and > modified /usr/local/etc/sane.d/snapscan.conf. > > sane-find-scanner sees it, eg > [midget 22:37] ~ >sudo sane-find-scanner -q > found USB scanner (vendor=0x04a5 [Color], product=0x2060 [ FlatbedScanner > 13]) at libusb:/dev/usb:/dev/ugen0.5 found USB scanner (vendor=0x0403 > [FTDI], product=0xee18 [MaxStream PKG-U]) at libusb:/dev/usb:/dev/ugen1.2 > > I have no idea why the FTDI serial device appears there.. > > However scanimage -L doesn't show the scanner.. > [midget 22:40] ~ >sudo env SANE_DEBUG_SNAPSCAN=255 scanimage -v -v -L > [sanei_debug] Setting debug level of snapscan to 255. > [snapscan] sane_snapscan_init > [snapscan] sane_snapscan_init: Snapscan backend version 1.4.53 > [snapscan] add_usb_device(libusb:/dev/usb:/dev/ugen0.5) > [snapscan] add_usb_device: Detected (kind of) an USB device > [snapscan] snapscani_usb_open(libusb:/dev/usb:/dev/ugen0.5) > [snapscan] snapscani_mutex_open: could not parse device string: No such > file or directory [snapscan] snapscani_usb_open: Can't get semaphore > [snapscan] add_usb_device: error opening device > libusb:/dev/usb:/dev/ugen0.5: Invalid argument [snapscan] > sane_snapscan_get_devices (0x7fffffffe200, 0) > > No scanners were identified. If you were expecting something different, > check that the scanner is plugged in, turned on and detected by the > sane-find-scanner tool (if appropriate). Please read the documentation > which came with this software (README, FAQ, manpages). > Calling sane_exit > [snapscan] sane_snapscan_exit > scanimage: finished > > Anyone have any suggestions? Hi, Try this patch: diff -u ./work/sane-backends-1.0.20/backend/snapscan-mutex.c ./snapscan- mutex.c --- ./work/sane-backends-1.0.20/backend/snapscan-mutex.c 2008-03-28 21:39:02.000000000 +0100 +++ ./snapscan-mutex.c 2009-09-28 15:33:41.000000000 +0200 @@ -130,7 +130,8 @@ return 0; } - if (sscanf(dev, "libusb:%d:%d", &busnum, &devnum) != 2) + if ((sscanf(dev, "libusb:%d:%d", &busnum, &devnum) != 2) && + (sscanf(dev, "libusb:/dev/usb:ugen%d.%d", &busnum, &devnum) != 2)) { DBG (DL_MAJOR_ERROR, "%s: could not parse device string: %s\n", me, strerror(errno)); return 0; If it works, get the patch sent to the sane developers. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 13:47:08 2009 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 F1B5A1065672; Mon, 28 Sep 2009 13:47:07 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id ABCC88FC1F; Mon, 28 Sep 2009 13:47:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 429EF46B0D; Mon, 28 Sep 2009 09:47:07 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 710ED8A027; Mon, 28 Sep 2009 09:47:06 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Mon, 28 Sep 2009 07:48:44 -0400 User-Agent: KMail/1.9.7 References: <4ABA36B1.9070706@icyb.net.ua> <4ABF57F5.1050106@icyb.net.ua> <4ABF643D.1080705@freebsd.org> In-Reply-To: <4ABF643D.1080705@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909280748.45528.john@baldwin.cx> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 28 Sep 2009 09:47:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.8 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 28 Sep 2009 13:47:08 -0000 On Sunday 27 September 2009 9:10:21 am Andriy Gapon wrote: > on 27/09/2009 15:17 Andriy Gapon said the following: > > Another idea of working around this: > > 1) in pci fixup code disable USB SMI for these chipsets > > 2) (optional) in ohci code skip takeover step > > Sounds messy. > > BTW, just for the sake of experiment I did exactly what I suggested. > I've got the following messages: > > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus0: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus1: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus3: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus4: SMM does not respond, resetting > kernel: ohci_controller_init:195: SMM active, request owner change > kernel: usbus6: SMM does not respond, resetting > > And the register value stayed intact after initial programming, so no > re-programming was needed. > > Here is the (dirty) hack: > diff --git a/sys/dev/pci/fixup_pci.c b/sys/dev/pci/fixup_pci.c > index 566e503..1463c24 100644 > --- a/sys/dev/pci/fixup_pci.c > +++ b/sys/dev/pci/fixup_pci.c > @@ -53,6 +53,7 @@ static int fixup_pci_probe(device_t dev); > static void fixwsc_natoma(device_t dev); > static void fixc1_nforce2(device_t dev); > static void fixrtc_piix4(device_t dev); > +static void fixsmi_usb(device_t dev); > > static device_method_t fixup_pci_methods[] = { > /* Device interface */ > @@ -84,6 +85,9 @@ fixup_pci_probe(device_t dev) > case 0x01e010de: /* nVidia nForce2 */ > fixc1_nforce2(dev); > break; > + case 0x96001022: /* AMD SB700 */ > + fixsmi_usb(dev); > + break; > } > return(ENXIO); > } > @@ -124,6 +128,21 @@ > } > > > +/* Disable USB SMI */ > +static void > +fixsmi_usb(device_t dev) > +{ > + uint32_t features; > + > + dev = pci_find_device(0x1002, 0x4385); > + features = pci_read_config(dev, 0x64, 4); > + if (features & (1 << 15)) { > + printf("Disabling USB SMI on SB7xx\n"); > + features &= ~(1 << 15); > + pci_write_config(dev, 0x64, features, 4); > + } > +} > + > /* > * Set the SYSTEM_IDLE_TIMEOUT to 80 ns on nForce2 systems to work > * around a hang that is triggered when the CPU generates a very fast I don't think you can do this because it is a "feature" to not disable SMM if ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't loaded via PS/2 emulation, even when the OS is running. I am curious if we really need to do the handover for each controller or if disabling it for ohci0 effectively disables it for all controllers? What do other OS's do? -- John Baldwin From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 13:55:49 2009 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 434AB106566B; Mon, 28 Sep 2009 13:55:49 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 50BFE8FC22; Mon, 28 Sep 2009 13:55:48 +0000 (UTC) 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 QAA09209; Mon, 28 Sep 2009 16:55:44 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4AC0C060.20109@freebsd.org> Date: Mon, 28 Sep 2009 16:55:44 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: John Baldwin References: <4ABA36B1.9070706@icyb.net.ua> <4ABF57F5.1050106@icyb.net.ua> <4ABF643D.1080705@freebsd.org> <200909280748.45528.john@baldwin.cx> In-Reply-To: <200909280748.45528.john@baldwin.cx> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 28 Sep 2009 13:55:49 -0000 on 28/09/2009 14:48 John Baldwin said the following: > I don't think you can do this because it is a "feature" to not disable SMM if > ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't > loaded via PS/2 emulation, even when the OS is running. Very good point. > I am curious if we > really need to do the handover for each controller or if disabling it for > ohci0 effectively disables it for all controllers? What do other OS's do? > Don't have an answer about other OSes. But OHCI controllers have individual "used by SMM" bits and taking over one controller doesn't affect the bits of the other controllers - they remain set. Not that it means that SMM code actually keeps on controlling them. Actually, just checked - Linux also does it per controller: http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/ohci-hcd.c#L495 -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 14:11:06 2009 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 20B95106566C; Mon, 28 Sep 2009 14:11:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E5D678FC27; Mon, 28 Sep 2009 14:11:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8D77F46B06; Mon, 28 Sep 2009 10:11:05 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 905418A024; Mon, 28 Sep 2009 10:11:04 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 28 Sep 2009 10:10:49 -0400 User-Agent: KMail/1.9.7 References: <4ABA36B1.9070706@icyb.net.ua> <200909280748.45528.john@baldwin.cx> <4AC0C060.20109@freebsd.org> In-Reply-To: <4AC0C060.20109@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909281010.50427.jhb@FreeBSD.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 28 Sep 2009 10:11:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-usb@freebsd.org, Andriy Gapon Subject: Re: sb600/sb700 ohci experimental patch 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, 28 Sep 2009 14:11:06 -0000 On Monday 28 September 2009 9:55:44 am Andriy Gapon wrote: > on 28/09/2009 14:48 John Baldwin said the following: > > I don't think you can do this because it is a "feature" to not disable SMM if > > ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't > > loaded via PS/2 emulation, even when the OS is running. > > Very good point. > > > I am curious if we > > really need to do the handover for each controller or if disabling it for > > ohci0 effectively disables it for all controllers? What do other OS's do? > > > > Don't have an answer about other OSes. > But OHCI controllers have individual "used by SMM" bits and taking over one > controller doesn't affect the bits of the other controllers - they remain set. > Not that it means that SMM code actually keeps on controlling them. > > Actually, just checked - Linux also does it per controller: > http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/ohci-hcd.c#L495 Hmm, it seems Linux now disables SMM for USB controllers (ohci, ehci, and uhci) via PCI quirks rather than doing it in the device drivers themselves, which matches your original suggestion. I'm not sure how best to fix that while also allowing USB to work w/o drivers loaded. -- John Baldwin From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 14:28:25 2009 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 4D779106566B; Mon, 28 Sep 2009 14:28:25 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 284138FC1A; Mon, 28 Sep 2009 14:28:23 +0000 (UTC) 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 RAA10037; Mon, 28 Sep 2009 17:28:22 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4AC0C805.6070909@freebsd.org> Date: Mon, 28 Sep 2009 17:28:21 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: John Baldwin References: <4ABA36B1.9070706@icyb.net.ua> <200909280748.45528.john@baldwin.cx> <4AC0C060.20109@freebsd.org> <200909281010.50427.jhb@FreeBSD.org> In-Reply-To: <200909281010.50427.jhb@FreeBSD.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: sb600/sb700 ohci experimental patch 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, 28 Sep 2009 14:28:25 -0000 on 28/09/2009 17:10 John Baldwin said the following: > On Monday 28 September 2009 9:55:44 am Andriy Gapon wrote: >> on 28/09/2009 14:48 John Baldwin said the following: >>> I don't think you can do this because it is a "feature" to not disable SMM if >>> ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't >>> loaded via PS/2 emulation, even when the OS is running. >> Very good point. >> >>> I am curious if we >>> really need to do the handover for each controller or if disabling it for >>> ohci0 effectively disables it for all controllers? What do other OS's do? >>> >> Don't have an answer about other OSes. >> But OHCI controllers have individual "used by SMM" bits and taking over one >> controller doesn't affect the bits of the other controllers - they remain set. >> Not that it means that SMM code actually keeps on controlling them. >> >> Actually, just checked - Linux also does it per controller: >> http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/ohci-hcd.c#L495 > > Hmm, it seems Linux now disables SMM for USB controllers (ohci, ehci, and uhci) > via PCI quirks rather than doing it in the device drivers themselves, which > matches your original suggestion. I'm not sure how best to fix that while also > allowing USB to work w/o drivers loaded. > I looked at the quirk code (for OHCI only) and they don't disable SMI - they do exactly the same takeover dance, only earlier: http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/pci-quirks.c#L169 I.e. this actually matches what Hans suggested before - first early takeover of all controllers, then probe/attach pass. Not sure how to implement this best in our architecture - also using quirks or perhaps something along the lines of multi-pass? :-) -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Mon Sep 28 17:29:54 2009 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 A329F10656AE; Mon, 28 Sep 2009 17:29:54 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0EF888FC23; Mon, 28 Sep 2009 17:29:53 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8SHTobJ007217; Tue, 29 Sep 2009 01:29:50 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8SHToLO007216; Tue, 29 Sep 2009 01:29:50 +0800 (KRAST) (envelope-from eugen) Date: Tue, 29 Sep 2009 01:29:50 +0800 From: Eugene Grosbein To: Hans Petter Selasky Message-ID: <20090928172950.GA6865@svzserv.kemerovo.su> References: <20090928034208.GA64444@svzserv.kemerovo.su> <200909280849.22346.hselasky@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909280849.22346.hselasky@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour 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, 28 Sep 2009 17:29:54 -0000 On Mon, Sep 28, 2009 at 08:49:21AM +0200, Hans Petter Selasky wrote: > > > If the USB stack puts the new job into the schedule and the USB > > > controller does not pick it up, it is not an USB stack problem ... > > > > If so, any workarounds possible? > > None which I know about. I've just found one. I noticed that USB controller here uses IRQ10 and shares it with NIC and FireWire. This system does not support IO-APIC. I've disabled ACPI and NIC has moved to another IRQ, USB and FireWire still share one IRQ but now there are no stalled transfers. I get stable 16.2 megabyte/s writing speed to USB HDD. Now I wonder if there is another way to assign distinct IRQ for USB, BIOS Setup does not help. Eugene Grosbein. From owner-freebsd-usb@FreeBSD.ORG Wed Sep 30 13:14:05 2009 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 F2720106568F for ; Wed, 30 Sep 2009 13:14:05 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 8640D8FC2A for ; Wed, 30 Sep 2009 13:14:04 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,480,1249250400"; d="scan'208";a="225054032" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 30 Sep 2009 15:14:03 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 9E9F11B0750; Wed, 30 Sep 2009 15:14:03 +0200 (CEST) Date: Wed, 30 Sep 2009 15:14:03 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: mouse behaving strange on high cpu load and rapid movements 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, 30 Sep 2009 13:14:06 -0000 hi there, i'm running -CURRENT (i386, r197623). on heavy cpu load i get random copy&pastes when moving my mouse rapidly. this happens under X as well as on the console. these are the moused options i have in my rc.conf: moused_enable="NO" moused_ums0_enable="YES" moused_flags="-z4 -a 0.2,0.2" moused_port="/dev/ums0" moused_type="auto" this also happens with if i add -F 1000 or -F 500 to the moused_flags. cheers. alex From owner-freebsd-usb@FreeBSD.ORG Wed Sep 30 13:23:36 2009 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 3C36B106568D for ; Wed, 30 Sep 2009 13:23:36 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id C45918FC18 for ; Wed, 30 Sep 2009 13:23:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,480,1249250400"; d="scan'208";a="14651691" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay3.uni-muenster.de with ESMTP; 30 Sep 2009 15:23:18 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 58A961B0750; Wed, 30 Sep 2009 15:23:18 +0200 (CEST) Date: Wed, 30 Sep 2009 15:23:18 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: mouse behaving strange on high cpu load and rapid movements 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, 30 Sep 2009 13:23:36 -0000 here's some debug output: ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 f6 1a 00 f6 ff 1a 00 ums_intr_callback:291: x:-10 y:-26 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 fd 19 00 fd ff 19 00 ums_intr_callback:291: x:-3 y:-25 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 04 18 00 04 00 18 00 ums_intr_callback:291: x:4 y:-24 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 0b 17 00 0b 00 17 00 ums_intr_callback:291: x:11 y:-23 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 13 15 00 13 00 15 00 ums_intr_callback:291: x:19 y:-21 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 16 12 00 16 00 12 00 ums_intr_callback:291: x:22 y:-18 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 1c 0e 00 1c 00 0e 00 ums_intr_callback:291: x:28 y:-14 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 54 c5 00 54 00 c5 ff ums_intr_callback:291: x:84 y:59 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 fb f8 00 fb ff f8 ff ums_intr_callback:291: x:-5 y:8 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 fd fa 00 fd ff fa ff ums_intr_callback:291: x:-3 y:6 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 fe fc 00 fe ff fc ff ums_intr_callback:291: x:-2 y:4 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 ff fd 00 ff ff fd ff ums_intr_callback:291: x:-1 y:3 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 ff 01 00 ff ff 01 00 ums_intr_callback:291: x:-1 y:-1 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 00 03 00 00 00 03 00 ums_intr_callback:291: x:0 y:-3 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 ums_intr_callback:207: sc=0xc95f1800 actlen=8 ums_intr_callback:225: data = 00 ff 00 00 ff ff 00 00 ums_intr_callback:291: x:-1 y:0 z:0 t:0 w:0 buttons:0x00000000 cheers. alex From owner-freebsd-usb@FreeBSD.ORG Wed Sep 30 14:12:01 2009 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 E063E1065670 for ; Wed, 30 Sep 2009 14:12:01 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 13B918FC1C for ; Wed, 30 Sep 2009 14:12:00 +0000 (UTC) Received: from inchoate.gsoft.com.au (ppp121-45-212-218.lns11.adl2.internode.on.net [121.45.212.218]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n8UEBivP055801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 30 Sep 2009 23:41:45 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Hans Petter Selasky Date: Wed, 30 Sep 2009 23:41:20 +0930 User-Agent: KMail/1.9.10 References: <200909282240.53802.doconnor@gsoft.com.au> <200909281536.38747.hselasky@c2i.net> In-Reply-To: <200909281536.38747.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1406691.RQCrTKn7kK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200909302341.40232.doconnor@gsoft.com.au> X-Spam-Score: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-usb@freebsd.org Subject: Re: SANE vs USB scanner on 8.0 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, 30 Sep 2009 14:12:02 -0000 --nextPart1406691.RQCrTKn7kK Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 28 Sep 2009, Hans Petter Selasky wrote: > - if (sscanf(dev, "libusb:%d:%d", &busnum, &devnum) !=3D 2) > + if ((sscanf(dev, "libusb:%d:%d", &busnum, &devnum) !=3D 2) && > + (sscanf(dev, "libusb:/dev/usb:ugen%d.%d", &busnum, > &devnum) !=3D 2)) { > DBG (DL_MAJOR_ERROR, "%s: could not parse device string: > %s\n", me, strerror(errno)); > return 0; > > If it works, get the patch sent to the sane developers. Unfortunately no (I reworked it to match the path it uses) and now it=20 segfaults. I rebuilt sane with debugging (is there some way to make libtool not strip on install? It's so tedious manually editing makefiles to remove =2Ds..) as well as libusb. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 801b021c0 (LWP 100292)] 0x000000080140e715 in libusb20_dev_open (pdev=3D0x801b13d00, nTransferMax= =3D32) at /usr/src/lib/libusb/libusb20.c:550 550 error =3D pdev->beMethods->open_device(pdev, nTransferMax); (gdb) bt #0 0x000000080140e715 in libusb20_dev_open (pdev=3D0x801b13d00, nTransferM= ax=3D32) at /usr/src/lib/libusb/libusb20.c:550 #1 0x0000000801408f15 in usb_open (dev=3D0x801b1ae00) at /usr/src/lib/libusb/libusb20_compat01.c:150 #2 0x000000080065c34f in sanei_usb_open ( devname=3D0x801b09380 "libusb:/dev/usb:/dev/ugen0.5", dn=3D0x7fffffffdc= 0c) at sanei_usb.c:1143 #3 0x00000008025e5ad3 in snapscani_usb_open ( dev=3D0x801b09380 "libusb:/dev/usb:/dev/ugen0.5", fdp=3D0x7fffffffdc0c, sense_handler=3D0x8025df7c0 , pss=3D0x0) at snapscan-usb= =2Ec:178 #4 0x00000008025eb985 in add_usb_device ( full_name=3D0x801b09080 "libusb:/dev/usb:/dev/ugen0.5") at snapscan.c:5= 90 #5 0x000000080065c0ed in sanei_usb_find_devices (vendor=3D1189, product=3D= 8288, attach=3D0x8025eb880 ) at sanei_usb.c:1091 #6 0x000000080065bb3e in sanei_usb_attach_matching_devices (name=3D0x7ffff= fffdcc1 "", attach=3D0x8025eb880 ) at sanei_usb.c:965 #7 0x00000008025ebdac in sane_snapscan_init (version_code=3D0x7fffffffe0f8, authorize=3D0x401b50 ) at snapscan.c:735 #8 0x000000080066579b in init (be=3D0x801b0da00) at dll.c:613 #9 0x000000080066621b in sane_dll_get_devices (device_list=3D0x7fffffffea0= 0, =2D--Type to continue, or q to quit--- local_only=3D0) at dll.c:1034 #10 0x0000000800658bbb in sane_get_devices (dl=3D0x7fffffffea00, local=3D0)= at dll-s.c:17 #11 0x0000000000405a11 in main (argc=3D4, argv=3D0x7fffffffeb30) at scanima= ge.c:1771 (gdb) print *pdev $1 =3D {ddesc =3D {LIBUSB20_DEVICE_DESC_FORMAT =3D 0x0, bLength =3D 0 '\0', bDescriptorType =3D 0 '\0', bcdUSB =3D 0, bDeviceClass =3D 0 '\0', bDeviceSubClass =3D 0 '\0', bDeviceProtocol =3D 0 '\0', bMaxPacketSize0= =3D 0 '\0', idVendor =3D 0, idProduct =3D 0, bcdDevice =3D 0, iManufacturer =3D 0 '= \0', iProduct =3D 0 '\0', iSerialNumber =3D 0 '\0', bNumConfigurations =3D 0= '\0'}, session_data =3D {session_data =3D 0, tv =3D {tv_sec =3D 0, tv_nsec =3D 0= }, plugtime =3D 0}, dev_entry =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}, methods =3D 0x0, beMe= thods =3D 0x0, pTransfer =3D 0x801b48500, privBeData =3D 0x0, privLuData =3D 0x0, claimed_interface =3D 0 '\0', file =3D 0, file_ctrl =3D 0, debug =3D 0, n= Transfer =3D 32, bus_number =3D 0 '\0', device_address =3D 0 '\0', usb_mode =3D 0 '\0', usb_speed =3D 0 '\0', is_opened =3D 0 '\0', usb_desc =3D '\0' } (gdb) up #1 0x0000000801408f15 in usb_open (dev=3D0x801b1ae00) at /usr/src/lib/libusb/libusb20_compat01.c:150 150 err =3D libusb20_dev_open(dev->dev, 16 * 2); (gdb) print *dev $2 =3D {next =3D 0x0, prev =3D 0x0, filename =3D "/dev/ugen0.5", '\0' , bus =3D 0x801510020, descriptor =3D {bLength =3D 18 '\022', bDescriptorTy= pe =3D 1 '\001', bcdUSB =3D 256, bDeviceClass =3D 255 '=FF', bDeviceSubClass =3D 255 '= =FF', bDeviceProtocol =3D 255 '=FF', bMaxPacketSize0 =3D 8 '\b', idVendor =3D= 1189, idProduct =3D 8288, bcdDevice =3D 256, iManufacturer =3D 1 '\001', iProduct =3D 2 '\002', iSerialNumber =3D 0 '\0', bNumConfigurations =3D= 1 '\001'}, config =3D 0x801b23280, dev =3D 0x801b13d00, devnum =3D 0 '\0', num_child= ren =3D 0 '\0', children =3D 0x0} (gdb) print dev->dev $3 =3D (void *) 0x801b13d00 (gdb) up #2 0x000000080065c34f in sanei_usb_open ( devname=3D0x801b09380 "libusb:/dev/usb:/dev/ugen0.5", dn=3D0x7fffffffdc= 0c) at sanei_usb.c:1143 1143 devices[devcount].libusb_handle =3D (gdb) list 1138 #ifdef HAVE_LIBUSB 1139 struct usb_device *dev; 1140 struct usb_interface_descriptor *interface; 1141 int result, num; 1142 1143 devices[devcount].libusb_handle =3D 1144 usb_open (devices[devcount].libusb_device); 1145 if (!devices[devcount].libusb_handle) 1146 { 1147 SANE_Status status =3D SANE_STATUS_INVAL; (gdb) print *devices[devcount].libusb_device $4 =3D {next =3D 0x0, prev =3D 0x0, filename =3D "/dev/ugen0.5", '\0' , bus =3D 0x801510020, descriptor =3D {bLength =3D 18 '\022', bDescriptorTy= pe =3D 1 '\001', bcdUSB =3D 256, bDeviceClass =3D 255 '=FF', bDeviceSubClass =3D 255 '= =FF', bDeviceProtocol =3D 255 '=FF', bMaxPacketSize0 =3D 8 '\b', idVendor =3D= 1189, idProduct =3D 8288, bcdDevice =3D 256, iManufacturer =3D 1 '\001', iProduct =3D 2 '\002', iSerialNumber =3D 0 '\0', bNumConfigurations =3D= 1 '\001'}, config =3D 0x801b23280, dev =3D 0x801b13d00, devnum =3D 0 '\0', num_child= ren =3D 0 '\0', children =3D 0x0} =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1406691.RQCrTKn7kK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBKw2cc5ZPcIHs/zowRAvcbAKCb7NH8BMwNdzMmCARA2kSCrKPd/QCgguUa ALyjYF5nC0yzDxQ5L+rAEKU= =YUVw -----END PGP SIGNATURE----- --nextPart1406691.RQCrTKn7kK-- From owner-freebsd-usb@FreeBSD.ORG Wed Sep 30 16:10:02 2009 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 BAE99106568F; Wed, 30 Sep 2009 16:10:02 +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 913528FC15; Wed, 30 Sep 2009 16:10:02 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8UGA265026114; Wed, 30 Sep 2009 16:10:02 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8UGA24c026103; Wed, 30 Sep 2009 16:10:02 GMT (envelope-from linimon) Date: Wed, 30 Sep 2009 16:10:02 GMT Message-Id: <200909301610.n8UGA24c026103@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/139243: [uhci] unplug prolific USB serial -> uhci_abort_xfer: not in process context 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, 30 Sep 2009 16:10:02 -0000 Old Synopsis: unplug prolific USB serial -> uhci_abort_xfer: not in process context New Synopsis: [uhci] unplug prolific USB serial -> uhci_abort_xfer: not in process context Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Wed Sep 30 16:09:43 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=139243 From owner-freebsd-usb@FreeBSD.ORG Thu Oct 1 13:35:28 2009 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 8BEAA1065676 for ; Thu, 1 Oct 2009 13:35:28 +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 E55F58FC18 for ; Thu, 1 Oct 2009 13:35:27 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=8YK_f-J1wT4A:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=P9OlCKc48zjhetnP-T8A:9 a=DQj2N_l32m11q0aK7pT_87qM-skA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 926338970; Thu, 01 Oct 2009 15:35:25 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 1 Oct 2009 15:36:07 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: In-Reply-To: X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910011536.08436.hselasky@c2i.net> Cc: Alexander Best Subject: Re: mouse behaving strange on high cpu load and rapid movements 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, 01 Oct 2009 13:35:28 -0000 On Wednesday 30 September 2009 15:23:18 Alexander Best wrote: > here's some debug output: > > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 f6 1a 00 f6 ff 1a 00 > ums_intr_callback:291: x:-10 y:-26 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fd 19 00 fd ff 19 00 > ums_intr_callback:291: x:-3 y:-25 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 04 18 00 04 00 18 00 > ums_intr_callback:291: x:4 y:-24 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 0b 17 00 0b 00 17 00 > ums_intr_callback:291: x:11 y:-23 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 13 15 00 13 00 15 00 > ums_intr_callback:291: x:19 y:-21 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 16 12 00 16 00 12 00 > ums_intr_callback:291: x:22 y:-18 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 1c 0e 00 1c 00 0e 00 > ums_intr_callback:291: x:28 y:-14 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 54 c5 00 54 00 c5 ff > ums_intr_callback:291: x:84 y:59 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fb f8 00 fb ff f8 ff > ums_intr_callback:291: x:-5 y:8 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fd fa 00 fd ff fa ff > ums_intr_callback:291: x:-3 y:6 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fe fc 00 fe ff fc ff > ums_intr_callback:291: x:-2 y:4 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff fd 00 ff ff fd ff > ums_intr_callback:291: x:-1 y:3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff > ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff > ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 > ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 > ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 01 00 ff ff 01 00 > ums_intr_callback:291: x:-1 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 03 00 00 00 03 00 > ums_intr_callback:291: x:0 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 > ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 > ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 00 00 ff ff 00 00 > ums_intr_callback:291: x:-1 y:0 z:0 t:0 w:0 buttons:0x00000000 > The debug trace looks normal. Maybe there is a bug in your mouse, if your CPU is so busy that there is no bandwidth left for the USB hostcontroller schedule. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Oct 2 08:11:49 2009 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 E0F571065697 for ; Fri, 2 Oct 2009 08:11:49 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 74A578FC27 for ; Fri, 2 Oct 2009 08:11:49 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=Ez03xRz7Z_xCJ0HJ29YA:9 a=DmVYCLICwL1ebnsJ7nwA:7 a=4h6ZIMSVZOROGpogrJ9k9rYj0VQA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1322594996 for freebsd-usb@freebsd.org; Fri, 02 Oct 2009 10:11:47 +0200 Received-SPF: softfail receiver=mailfe02.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 2 Oct 2009 10:12:24 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910021012.25775.hselasky@freebsd.org> Subject: Mass Storage related patch committed 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, 02 Oct 2009 08:11:50 -0000 Hi, The following patch was committed to FreeBSD-9 yesterday, and people having mass storage problems are requested to give it a try. http://perforce.freebsd.org/chv.cgi?CH=169085 --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Oct 2 14:28:09 2009 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 136021065672 for ; Fri, 2 Oct 2009 14:28:09 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by mx1.freebsd.org (Postfix) with ESMTP id E0CE98FC17 for ; Fri, 2 Oct 2009 14:28:08 +0000 (UTC) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.14.3/8.14.3) with ESMTP id n92ES6tt031519; Fri, 2 Oct 2009 10:28:07 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <200910021428.n92ES6tt031519@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 02 Oct 2009 10:28:09 -0400 To: freebsd-usb@freebsd.org From: Mike Tancsa Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: help setting u3g speed and help with new device 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, 02 Oct 2009 14:28:09 -0000 I am having problems getting the later Option GTM378, 380 and 382 3g modems to work properly with the u3g driver on FreeBSD. Older generation 378s work just fine, but I can crazy slow speeds when using the newer ones. (21kbps vs about 1.5Mb based on the signal here at the office) On an older generation 378, all I did was add the device ID and all works just fine Not sure if it makes a difference, but the connect speed on the "working" 378 shows Jan 1 08:38:33 alix ppp[1758]: tun10: Chat: Received: CONNECT 3600000 vs Oct 2 10:11:37 378n ppp[1085]: tun10: Chat: Received: CONNECT 7200000 How do I find out what the "right" speed is and set it for the device ? Despite the higher connect speed, I get a transfer rate of about 21Kbps. On the older gen modem, I get 1,376Kbps also, on the newer 378s I need to do a mode switch for it to work. On RELENG_7, I made the following changes based on what was in usb_modeswitch MessageContent="55534243123456780000000000000601000000000000000000000000000000" --- usbdevs 2009-07-10 02:55:30.000000000 -0400 +++ /tmp/usbdevs 2009-10-02 10:19:16.000000000 -0400 @@ -1917,6 +1917,10 @@ product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage product OPTION GTMAX36 0x6701 GlobeTrotter Max 3.6 Modem product OPTION GTMAXHSUPA 0x7001 GlobeTrotter HSUPA +product OPTION GTMAXHSUPAE 0x6901 GlobeTrotter HSUPA PCIe /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface @@ -2039,6 +2043,7 @@ product QUALCOMM CDMA_MSM 0x6000 CDMA Technologies MSM phone product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem +product QUALCOMM2 GTM3782005 0x1000 CDMA Technologies MSM modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC ZTE_MSM 0x0031 CDMA Technologies MSM modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage --- u3g.c 2009-08-13 03:19:43.000000000 -0400 +++ /tmp/u3g.c 2009-10-02 10:20:07.000000000 -0400 @@ -52,7 +52,7 @@ #endif #include "usbdevs.h" -static int u3gdebug = 0; +static int u3gdebug = 1; SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g"); SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, &u3gdebug, 0, "u3g debug level"); @@ -123,6 +123,7 @@ #define U3GINIT_ZTESTOR 4 // Requires SCSI command (ZTE STOR) #define U3GINIT_CMOTECH 5 // Requires init command (CMOTECH) #define U3GINIT_WAIT 6 // Device reappears after a short delay (none) +#define U3GINIT_GTM3782005 7 // Option GlobeSurfer Icon 7.2 }; // Note: The entries marked with XXX should be checked for the correct speed @@ -134,9 +135,13 @@ {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS }, U3GSP_UMTS, U3GINIT_NONE }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, U3GSP_HSDPA, U3GINIT_NONE }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPAE }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX380HSUPAE }, U3GSP_HSPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX382HSUPAE }, U3GSP_HSPA, U3GINIT_EJECT }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, U3GSP_UMTS, U3GINIT_NONE }, /* OEM: Qualcomm, Inc. */ {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR }, U3GSP_CDMA, U3GINIT_ZTESTOR }, + {{ USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_GTM3782005 }, U3GSP_HSPA, U3GINIT_GTM3782005 }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MSM }, U3GSP_CDMA, U3GINIT_NONE }, /* OEM: Huawei */ @@ -144,6 +149,7 @@ {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GINIT_HUAWEI }, /* OEM: Novatel */ {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U760 }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX @@ -513,6 +519,25 @@ 0x00, 0x00 }; +static unsigned char gtm3782005stor_cmd[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x12, 0x34, 0x56, 0x78, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x00, /* 12: CBW Flag: input */ + 0x00, /* 13: CBW Lun */ + 0x06, /* 14: CBW Length */ + + 0x01, /* 15+0: opcode */ + 0x00, /* 15+1: byte2 */ + 0x00, 0x00, /* 15+2..3 */ + 0x00, /* 15+4: */ + 0x00, /* 15+5: */ + 0x00, 0x00, 0x00, 0x00, /* 15+6..15: */ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 +}; + + static unsigned char cmotech_cmd[31] = { 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ @@ -683,6 +708,12 @@ "changing ZTE STOR modem to modem mode\n"); u3gstub_BBB_cmd(sc, ztestor_cmd); break; + case U3GINIT_GTM3782005: + if (bootverbose || u3gdebug) + device_printf(sc->sc_dev, + "changing GTM378 STOR modem to modem mode\n"); + u3gstub_BBB_cmd(sc, gtm3782005stor_cmd); + break; case U3GINIT_CMOTECH: if (bootverbose || u3gdebug) device_printf(sc->sc_dev, -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From owner-freebsd-usb@FreeBSD.ORG Fri Oct 2 15:34:02 2009 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 B37D010656A4 for ; Fri, 2 Oct 2009 15:34:02 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1EC8FC2C for ; Fri, 2 Oct 2009 15:34:02 +0000 (UTC) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.14.3/8.14.3) with ESMTP id n92FY1qi031868 for ; Fri, 2 Oct 2009 11:34:01 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <200910021534.n92FY1qi031868@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 02 Oct 2009 11:34:03 -0400 To: freebsd-usb@freebsd.org From: Mike Tancsa In-Reply-To: <200910021428.n92ES6tt031519@lava.sentex.ca> References: <200910021428.n92ES6tt031519@lava.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: help setting u3g speed and help with new device 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, 02 Oct 2009 15:34:02 -0000 At 10:28 AM 10/2/2009, Mike Tancsa wrote: >I am having problems getting the later Option GTM378, 380 and 382 3g >modems to work properly with the u3g driver on FreeBSD. Older >generation 378s work just fine, but I can crazy slow speeds when >using the newer ones. (21kbps vs about 1.5Mb based on the signal >here at the office) > >On an older generation 378, all I did was add the device ID and all >works just fine >Not sure if it makes a difference, but the connect speed on the >"working" 378 shows >Jan 1 08:38:33 alix ppp[1758]: tun10: Chat: Received: CONNECT 3600000 >vs >Oct 2 10:11:37 378n ppp[1085]: tun10: Chat: Received: CONNECT 7200000 > >How do I find out what the "right" speed is and set it for the device ? > >Despite the higher connect speed, I get a transfer rate of about >21Kbps. On the older gen modem, I get 1,376Kbps > >also, on the newer 378s I need to do a mode switch for it to >work. On RELENG_7, I made the following changes based on what was >in usb_modeswitch Here is the dmesg from RELENG_7 and RELENG_8. Not sure what the CSW error is about. I use the usb_modeswitch on RELENG_8 for now as I havent figured out how to best patch in the commands into the RELENG_8 version of the driver. u3g0: on uhub0 u3g0: opening bulk-in pipe on endpoint 132 u3g0: opening bulk-in pipe on endpoint 5 Timecounter "TSC" frequency 498054012 Hz quality 800 Timecounters tick every 1.000 msec IPsec: Initialized Security Association Processing. u3g0: changing GTM378 STOR modem to modem mode u3g0: Sending CBW ad0: 1953MB at ata0-master PIO4 u3g0: Reading CSW u3g0: Failed to retrieve CSW to change to modem mode: IOERROR Trying to mount root from ufs:/dev/ad0s1a u3g0: at uhub0 port 2 (addr 2) disconnected u3g0: detached ucom0: