From owner-freebsd-current@FreeBSD.ORG Mon Sep 25 21:05:27 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2E9E16A403; Mon, 25 Sep 2006 21:05:27 +0000 (UTC) (envelope-from freebsd.ruomad@free.fr) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12E3743D76; Mon, 25 Sep 2006 21:05:24 +0000 (GMT) (envelope-from freebsd.ruomad@free.fr) Received: from [192.168.0.100] (vln78-1-82-238-160-33.fbx.proxad.net [82.238.160.33]) by smtp1-g19.free.fr (Postfix) with ESMTP id 202AF10584; Mon, 25 Sep 2006 23:05:23 +0200 (CEST) Message-ID: <45184486.3080906@free.fr> Date: Mon, 25 Sep 2006 23:05:10 +0200 From: Bruno Damour User-Agent: Thunderbird 1.5.0.7 (X11/20060916) MIME-Version: 1.0 To: Vladimir Kushnir References: <45166CB4.000004.01220@camay.yandex.ru> <20060925014415.S1442@kushnir1.kiev.ua> In-Reply-To: <20060925014415.S1442@kushnir1.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Andrey V. Elsukov" , freebsd-usb@freebsd.org, freebsd-current@freebsd.org Subject: Re: Problems with USB on CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2006 21:05:27 -0000 Vladimir Kushnir wrote: > Hi, All! > > On Sun, 24 Sep 2006, Andrey V. Elsukov wrote: > >> Hi, All! >> >> I have notebook Maxselect Mission GT3000. >> A hardware configuration description (russian): >> http://www.maxselect.ru/catalog/models.html?id=4024&template=normal >> >> o Mobile AMD Sempron >> o NVIDIA C51MV+MCP51M >> o PCI Express nVidia Geforce Go 6100 >> o Realtek HDA >> >> I have several problems. One is with USB. >> When i attach USB Flash disk it's not work. >> >> usbd_new_device: addr=2, getting first desc failed >> uhub_explore: usb_new_device failed, error=IOERROR >> uhub1: device problem (IOERROR), disabling port 4 >> >> http://butcher.heavennet.ru/dmesg.txt >> http://butcher.heavennet.ru/pciconf.txt >> I've attached dmesg and pciconf. >> Any suggestions? >> -- >> WBR, Andrey V. Elsukov >> > > I had precisely the same problem with USB-2 flash (both old USB-1.1 > flash and digital camera - Kodak C340, uses ugen) work perfectly all > right. MB: Asus A8N (nForce4 based). The problem went away with > retrying to get device descriptor in usbd_new_device (see patch below). > I've submitted PR (usb/103167) but so far there's been no reaction at > all :-( > > Hope this helps, > Vladimir > > /* ----------- patch begins here -------------- */ > > *** dev/usb/usb_subr.c.orig Mon Sep 11 19:28:35 2006 > --- dev/usb/usb_subr.c Mon Sep 11 20:05:38 2006 > *************** > *** 1112,1118 **** > > dd = &dev->ddesc; > /* Get the first 8 bytes of the device descriptor. */ > ! err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); > if (err) { > DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc " > "failed\n", addr)); > --- 1112,1123 ---- > > dd = &dev->ddesc; > /* Get the first 8 bytes of the device descriptor. */ > ! for (i = 0; i < 3; i++) { > ! err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); > ! if (!err) > ! break; > ! usbd_delay_ms(dev, USB_SET_ADDRESS_SETTLE); > ! } > if (err) { > DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc " > "failed\n", addr)); > > /* -------------- end ----------------- */ > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" Well, it _WORKS_ !! After applying your patch and recompiling my kernel, I plug my usb key and it works ! umass creates /dev/da0 and I'm able to mount my disk and work... Thank you very much !! I still have an error in dmesg though, but it might be something else. This patch should be discussed and tested ASAP with other hardware. Bruno PS : see my dmesg : Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 7.0-CURRENT #4: Mon Sep 25 22:27:26 CEST 2006 root@vil1.ruomad.net:/usr/obj/usr/src/sys/VIL1 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Sempron(tm) Processor 2800+ (1607.42-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x40ff2 Stepping = 2 Features=0x78bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x19 real memory = 1039073280 (990 MB) avail memory = 1007489024 (960 MB) ACPI APIC Table: ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi0: Power Button (fixed) acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.0 (no driver attached) pci0: at device 0.1 (no driver attached) pci0: at device 0.2 (no driver attached) pci0: at device 0.3 (no driver attached) pci0: at device 0.4 (no driver attached) pci0: at device 0.5 (no driver attached) pci0: at device 0.6 (no driver attached) pci0: at device 0.7 (no driver attached) pcib1: at device 2.0 on pci0 pci1: on pcib1 pcib2: at device 3.0 on pci0 pci2: on pcib2 pcib3: at device 4.0 on pci0 pci3: on pcib3 vgapci0: mem 0xfc000000-0xfcffffff,0xe0000000-0xefffffff,0xfb000000-0xfbffffff irq 16 at device 5.0 on pci0 pci0: at device 9.0 (no driver attached) isab0: at device 10.0 on pci0 isa0: on isab0 pci0: at device 10.1 (no driver attached) pci0: at device 10.2 (no driver attached) ohci0: mem 0xfe02f000-0xfe02ffff irq 21 at device 11.0 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 8 ports with 8 removable, self powered ehci0: mem 0xfe02e000-0xfe02e0ff irq 22 at device 11.1 on pci0 ehci0: [GIANT-LOCKED] usb1: EHCI version 1.0 usb1: companion controller, 8 ports each: usb0 usb1: on ehci0 usb1: USB revision 2.0 uhub1: on usb1 uhub1: 8 ports with 8 removable, self powered atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfd00-0xfd0f at device 13.0 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xf800-0xf80f mem 0xfe02d000-0xfe02dfff irq 23 at device 14.0 on pci0 ata2: on atapci1 ata3: on atapci1 atapci2: port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xf300-0xf30f mem 0xfe02c000-0xfe02cfff irq 20 at device 15.0 on pci0 ata4: on atapci2 ata5: on atapci2 pcib4: at device 16.0 on pci0 pci4: on pcib4 fwohci0: mem 0xfdbff000-0xfdbff7ff,0xfdbf8000-0xfdbfbfff irq 19 at device 5.0 on pci4 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:11:d8:00:00:bc:4e:88 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 sbp0: on firewire0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:11:d8:bc:4e:88 fwe0: Ethernet address: 02:11:d8:bc:4e:88 fwe0: if_start running deferred for Giant fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ndis0: mem 0xfdbfc000-0xfdbfdfff irq 17 at device 9.0 on pci4 ndis0: NDIS API version: 5.0 ndis0: Ethernet address: 00:0c:41:64:3c:2a pcm0: mem 0xfe024000-0xfe027fff irq 21 at device 16.1 on pci0 nfe0: port 0xf200-0xf207 mem 0xfe02b000-0xfe02bfff irq 22 at device 20.0 on pci0 miibus0: on nfe0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto nfe0: Ethernet address: 00:17:31:d8:c7:55 acpi_tz0: on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FAST] sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A sio1: [FAST] atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] pmtimer0 on isa0 orm0: at iomem 0xd0000-0xd3fff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ums0: on uhub0 ums0: 3 buttons and Z dir. uhub0: device problem (SET_ADDR_FAILED), disabling port 6 Timecounter "TSC" frequency 1607419447 Hz quality 800 Timecounters tick every 1.000 msec acd0: DMA limited to UDMA33, device found non-ATA66 cable acd0: DVDR at ata1-master UDMA33 ad4: 238475MB at ata2-master SATA300 ad8: 238475MB at ata4-master SATA150 ad10: 238475MB at ata5-master SATA150 pcm0: pcm0: ar0: 238475MB status: READY ar0: disk0 READY (master) using ad10 at ata5-master ar0: disk1 READY (mirror) using ad8 at ata4-master Trying to mount root from ufs:/dev/ad4s2a plip0: [GIANT-LOCKED] fuse4bsd: version 0.3.0, FUSE ABI 7.5 umass0: on uhub1 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C)