Re: Problems with USB on CURRENT

From: Bruno Damour <freebsd.ruomad_at_free.fr>
Date: Mon, 25 Sep 2006 23:05:10 +0200
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_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to 
> "freebsd-current-unsubscribe_at_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_at_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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x19<LAHF,ExtAPIC,CR8>
real memory  = 1039073280 (990 MB)
avail memory = 1007489024 (960 MB)
ACPI APIC Table: <Nvidia AWRDACPI>
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <Nvidia AWRDACPI> 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: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
pci0: <memory, RAM> at device 0.1 (no driver attached)
pci0: <memory, RAM> at device 0.2 (no driver attached)
pci0: <memory, RAM> at device 0.3 (no driver attached)
pci0: <memory, RAM> at device 0.4 (no driver attached)
pci0: <memory, RAM> at device 0.5 (no driver attached)
pci0: <memory, RAM> at device 0.6 (no driver attached)
pci0: <memory, RAM> at device 0.7 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci3: <ACPI PCI bus> on pcib3
vgapci0: <VGA-compatible display> mem 
0xfc000000-0xfcffffff,0xe0000000-0xefffffff,0xfb000000-0xfbffffff irq 16 
at device 5.0 on pci0
pci0: <memory, RAM> at device 9.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 10.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 10.1 (no driver attached)
pci0: <memory, RAM> at device 10.2 (no driver attached)
ohci0: <OHCI (generic) USB controller> 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: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 8 ports with 8 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> 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: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 8 ports with 8 removable, self powered
atapci0: <nVidia nForce MCP51 UDMA133 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfd00-0xfd0f at device 13.0 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
atapci1: <nVidia nForce MCP51 SATA300 controller> port 
0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xf800-0xf80f mem 
0xfe02d000-0xfe02dfff irq 23 at device 14.0 on pci0
ata2: <ATA channel 0> on atapci1
ata3: <ATA channel 1> on atapci1
atapci2: <nVidia nForce MCP51 SATA300 controller> port 
0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xf300-0xf30f mem 
0xfe02c000-0xfe02cfff irq 20 at device 15.0 on pci0
ata4: <ATA channel 0> on atapci2
ata5: <ATA channel 1> on atapci2
pcib4: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci4: <ACPI PCI bus> on pcib4
fwohci0: <Texas Instruments TSB43AB22/A> 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: <IEEE1394(FireWire) bus> on fwohci0
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwe0: <Ethernet over FireWire> 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: <Wireless-G PCI Adapter> 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: <NVidia MCP51 High Definition Audio Controller> mem 
0xfe024000-0xfe027fff irq 21 at device 16.1 on pci0
nfe0: <NVIDIA nForce 430 Networking Adapter> port 0xf200-0xf207 mem 
0xfe02b000-0xfe02bfff irq 22 at device 20.0 on pci0
miibus0: <MII bus> on nfe0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
nfe0: Ethernet address: 00:17:31:d8:c7:55
acpi_tz0: <Thermal Zone> on acpi0
fdc0: <floppy drive controller> 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: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xd0000-0xd3fff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ums0: <Logitech USB Mouse, class 0/0, rev 1.10/4.10, addr 2> 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 <DVDRW IDE 16X/VER A091> at ata1-master UDMA33
ad4: 238475MB <Seagate ST3250624AS 3.AAE> at ata2-master SATA300
ad8: 238475MB <Seagate ST3250823AS 3.03> at ata4-master SATA150
ad10: 238475MB <Seagate ST3250823AS 3.03> at ata5-master SATA150
pcm0: <HDA Codec: Analog Device AD1986A>
pcm0: <HDA Driver Revision: 20060924_023>
ar0: 238475MB <nVidia MediaShield RAID1> 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: <SMI Corporation USB DISK, class 0/0, rev 2.00/11.00, addr 2> on 
uhub1
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <USB Flash Disk 1100> Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C)
Received on Mon Sep 25 2006 - 19:05:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:00 UTC