Date: Tue, 8 Feb 2011 15:52:10 GMT From: Artem <softwaredev@live.com> To: freebsd-gnats-submit@FreeBSD.org Subject: usb/154593: Input/output error writing to external USB drive Message-ID: <201102081552.p18FqA8D097389@red.freebsd.org> Resent-Message-ID: <201102081600.p18G0KtG019519@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 154593 >Category: usb >Synopsis: Input/output error writing to external USB drive >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 08 16:00:19 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Artem >Release: 8.1-RELEASE >Organization: >Environment: FreeBSD storage.lan 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When writing to an external USB driver using dd, it fails with Input/output error. It seems the smaller the block the faster it fails, so could be some kind of race condition. Tried # usbconfig add_quirk UQ_MSC_NO_SYNC_CACHE, but it did not have any effect. The same USB driver works fine under Windows XP and Linux 64bit. # dd if=/dev/random of=/dev/da2 dd: /dev/da2: Input/output error 50+0 records in 49+0 records out 25088 bytes transferred in 0.610338 secs (41105 bytes/sec) # dd if=/dev/random of=/dev/da2 dd: /dev/da2: Input/output error 5+0 records in 4+0 records out 2048 bytes transferred in 0.591235 secs (3464 bytes/sec) # dd if=/dev/random of=/dev/da2 bs=8192 dd: /dev/da2: Input/output error 2779+0 records in 2778+0 records out 22757376 bytes transferred in 23.276072 secs (977715 bytes/sec) # dd if=/dev/random of=/dev/da2 bs=65536 dd: /dev/da2: Input/output error 2067+0 records in 2066+0 records out 135397376 bytes transferred in 32.066219 secs (4222430 bytes/sec) relevant /var/log/messages Feb 8 07:04:13 storage root: Unknown USB device: vendor 0x2116 product 0x0320 bus uhub4 Feb 8 07:04:13 storage kernel: ugen4.4: <Prolific Technology Inc.> at usbus4 Feb 8 07:04:13 storage kernel: umass2: <Prolific Technology Inc. ATAPI-6 Bridge Controller, class 0/0, rev 2.00/0.01, addr 4> on usbus4 Feb 8 07:04:13 storage kernel: umass2: SCSI over Bulk-Only; quirks = 0x0000 Feb 8 07:04:15 storage kernel: umass2:2:2:-1: Attached to scbus2 Feb 8 07:04:15 storage kernel: da2 at umass-sim2 bus 2 scbus2 target 0 lun 0 Feb 8 07:04:15 storage kernel: da2: <Maxtor 6 Y160P0 YAR4> Fixed Direct Access SCSI-0 device Feb 8 07:04:15 storage kernel: da2: 40.000MB/s transfers Feb 8 07:04:15 storage kernel: da2: 156334MB (320173057 512 byte sectors: 255H 63S/T 19929C) Feb 8 07:06:28 storage kernel: (da2:umass-sim2:2:0:0): AutoSense failed Feb 8 07:09:09 storage kernel: (da2:umass-sim2:2:0:0): AutoSense failed Feb 8 07:10:29 storage last message repeated 2 times relevant device is ugen4.4: <ATAPI-6 Bridge Controller Prolific Technology Inc.> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON, the other one is usb flash, which seems to work fine. # usbconfig ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.1: <UHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1: <EHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.2: <USB2.0-CRW Generic> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.3: <Generic USB2.0 card Silicon Motion, Inc.> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.4: <ATAPI-6 Bridge Controller Prolific Technology Inc.> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON >How-To-Repeat: >Fix: Patch attached with submission follows: Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Genuine Intel(R) CPU 230 @ 1.60GHz (1596.01-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Family = 6 Model = 1c Stepping = 2 Features=0xbfe9fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x40e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE> AMD Features=0x20100800<SYSCALL,NX,LM> AMD Features2=0x1<LAHF> TSC: P-state invariant real memory = 2147483648 (2048 MB) avail memory = 2044645376 (1949 MB) ACPI APIC Table: <091908 APIC1843> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP/HT): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0 <Version 2.0> irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: <091908 XSDT1843> on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 7f700000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: <ACPI CPU> on acpi0 cpu1: <ACPI CPU> on acpi0 acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 vgapci0: <VGA-compatible display> port 0xdc00-0xdc07 mem 0xfe980000-0xfe9fffff,0xe0000000-0xefffffff,0xfe940000-0xfe97ffff irq 16 at device 2.0 on pci0 agp0: <Intel 82945G (945G GMCH) SVGA controller> on vgapci0 agp0: detected 7932k stolen memory agp0: aperture size is 256M hdac0: <Intel 82801G High Definition Audio Controller> mem 0xfe938000-0xfe93bfff irq 16 at device 27.0 on pci0 hdac0: HDA Driver Revision: 20100226_0142 hdac0: [ITHREAD] pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0 pci1: <ACPI PCI bus> on pcib1 re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem 0xfeaff000-0xfeafffff,0xfdff0000-0xfdffffff irq 16 at device 0.0 on pci1 re0: Using 1 MSI messages re0: Chip rev. 0x3c000000 re0: MAC rev. 0x00400000 miibus0: <MII bus> on re0 rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re0: Ethernet address: 00:21:85:9c:63:23 re0: [FILTER] pcib2: <ACPI PCI-PCI bridge> irq 17 at device 28.1 on pci0 pci2: <ACPI PCI bus> on pcib2 iwn0: <Intel(R) PRO/Wireless 4965BGN> mem 0xfebfe000-0xfebfffff irq 17 at device 0.0 on pci2 iwn0: MIMO 2T3R, MoW1, address 00:21:5c:5f:89:87 iwn0: [ITHREAD] iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0 pci3: <ACPI PCI bus> on pcib3 pcib4: <ACPI PCI-PCI bridge> irq 19 at device 28.3 on pci0 pci4: <ACPI PCI bus> on pcib4 uhci0: <Intel 82801G (ICH7) USB controller USB-A> port 0xd880-0xd89f irq 23 at device 29.0 on pci0 uhci0: [ITHREAD] usbus0: <Intel 82801G (ICH7) USB controller USB-A> on uhci0 uhci1: <Intel 82801G (ICH7) USB controller USB-B> port 0xd800-0xd81f irq 19 at device 29.1 on pci0 uhci1: [ITHREAD] usbus1: <Intel 82801G (ICH7) USB controller USB-B> on uhci1 uhci2: <Intel 82801G (ICH7) USB controller USB-C> port 0xd480-0xd49f irq 18 at device 29.2 on pci0 uhci2: [ITHREAD] usbus2: <Intel 82801G (ICH7) USB controller USB-C> on uhci2 uhci3: <Intel 82801G (ICH7) USB controller USB-D> port 0xd400-0xd41f irq 16 at device 29.3 on pci0 uhci3: [ITHREAD] usbus3: <Intel 82801G (ICH7) USB controller USB-D> on uhci3 ehci0: <Intel 82801GB/R (ICH7) USB 2.0 controller> mem 0xfe937c00-0xfe937fff irq 23 at device 29.7 on pci0 ehci0: [ITHREAD] usbus4: EHCI version 1.0 usbus4: <Intel 82801GB/R (ICH7) USB 2.0 controller> on ehci0 pcib5: <ACPI PCI-PCI bridge> at device 30.0 on pci0 pci5: <ACPI PCI bus> on pcib5 isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 atapci0: <Intel ICH7 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0 ata0: <ATA channel 0> on atapci0 ata0: [ITHREAD] atapci1: <Intel ICH7 SATA300 controller> port 0xd080-0xd087,0xd000-0xd003,0xcc00-0xcc07,0xc880-0xc883,0xc800-0xc80f irq 19 at device 31.2 on pci0 atapci1: [ITHREAD] ata2: <ATA channel 0> on atapci1 ata2: [ITHREAD] ata3: <ATA channel 1> on atapci1 ata3: [ITHREAD] ichsmb0: <Intel 82801GB (ICH7) SMBus controller> port 0x400-0x41f irq 19 at device 31.3 on pci0 ichsmb0: [ITHREAD] smbus0: <System Management Bus> on ichsmb0 acpi_button0: <Power Button> on acpi0 atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0 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 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] ppc0: cannot reserve I/O port range p4tcc0: <CPU Frequency Thermal Control> on cpu0 p4tcc1: <CPU Frequency Thermal Control> on cpu1 ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present; to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf. ZFS filesystem version 3 ZFS storage pool version 14 Timecounters tick every 1.000 msec usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 480Mbps High Speed USB v2.0 ata0: DMA limited to UDMA33, controller found non-ATA66 cable ad0: 7695MB <CF Card Ver2.34> at ata0-master UDMA33 ugen0.1: <Intel> at usbus0 uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0 ugen1.1: <Intel> at usbus1 uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1 ugen2.1: <Intel> at usbus2 uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2 ugen3.1: <Intel> at usbus3 uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3 ugen4.1: <Intel> at usbus4 uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4 ad4: 476940MB <SAMSUNG HD502IJ 1AA01110> at ata2-master UDMA100 SATA ad6: 476940MB <SAMSUNG HD502IJ 1AA01110> at ata3-master UDMA100 SATA hdac0: HDA Codec #0: Realtek ALC888 pcm0: <HDA Realtek ALC888 PCM #0 Analog> at cad 0 nid 1 on hdac0 pcm1: <HDA Realtek ALC888 PCM #1 Analog> at cad 0 nid 1 on hdac0 SMP: AP CPU #1 Launched! Root mount waiting for: usbus4 usbus3 usbus2 usbus1 usbus0 uhub1: 2 ports with 2 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered Root mount waiting for: usbus4 Root mount waiting for: usbus4 Root mount waiting for: usbus4 uhub4: 8 ports with 8 removable, self powered ugen4.2: <Generic> at usbus4 umass0: <Bulk-In, Bulk-Out, Interface> on usbus4 umass0: SCSI over Bulk-Only; quirks = 0x0000 Root mount waiting for: usbus4 umass0:0:0:-1: Attached to scbus0 Root mount waiting for: usbus4 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI status: Check Condition (probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: <Generic- Multi-Card 1.00> Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present ugen4.3: <Silicon Motion, Inc.> at usbus4 umass1: <Silicon Motion, Inc. Generic USB2.0 card, class 0/0, rev 2.00/1.00, addr 3> on usbus4 umass1: SCSI over Bulk-Only; quirks = 0x0000 Root mount waiting for: usbus4 umass1:1:1:-1: Attached to scbus1 Trying to mount root from ufs:/dev/gpt/sdc0 da1 at umass-sim1 bus 1 scbus1 target 0 lun 0 da1: <Generic USB SD Reader 1.00> Removable Direct Access SCSI-0 device da1: 40.000MB/s transfers da1: 1946MB (3985408 512 byte sectors: 255H 63S/T 248C) ipfw2 (+ipv6) initialized, divert loadable, nat loadable, rule-based forwarding disabled, default to deny, logging disabled re0: link state changed to UP ugen4.4: <Prolific Technology Inc.> at usbus4 umass2: <Prolific Technology Inc. ATAPI-6 Bridge Controller, class 0/0, rev 2.00/0.01, addr 4> on usbus4 umass2: SCSI over Bulk-Only; quirks = 0x4000 umass2:2:2:-1: Attached to scbus2 da2 at umass-sim2 bus 2 scbus2 target 0 lun 0 da2: <Maxtor 6 Y160P0 YAR4> Fixed Direct Access SCSI-0 device da2: 40.000MB/s transfers da2: 156334MB (320173057 512 byte sectors: 255H 63S/T 19929C) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102081552.p18FqA8D097389>