Other USB sticks problem

I have long lasting USB-flash drives (thumb-, or -sticks) on FreeBSD. May be some misconfiguration (may be even in custom kernel?). Would be glad if you guide me.
The problem is. After reboot I have usable USB ports, but after inserting USB stick, mount, unmount, detach cycle the port where was that stick becomes unusable till the next reboot. Fortunately, other USB devices stay working (mouse or WiFi dongle). Motherboard chipset is AMD 760G (780L)/SB710. FreeBSD-11.2 stable amd64 (althogh te problem is long lasting, was there in 10.3 vesion and earlier, it sometimes said me that I do not have pass device in kernel after eventualy refusing to work (and having worked some minuter earlier), which I definitely have).
dmesg part:
Code:
umass0 on uhub4
umass0: <JetFlash Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on usbus6
da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
da0: <JetFlash Transcend 8GB 8.07> Removable Direct Access SCSI-2 device
da0: Serial Number R8UFYNML
da0: 40.000MB/s transfers
da0: 7658MB (15683584 512 byte sectors)
da0: quirks=0x12<NO_6_BYTE,NO_RC16>
ugen6.2: <JetFlash Mass Storage Device> at usbus6 (disconnected)
umass0: at uhub4, port 5, addr 2 (disconnected)
da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
da0: <JetFlash Transcend 8GB 8.07> s/n R8UFYNML detached

g_access(944): provider da0 has error 6 set
g_access(944): provider da0 has error 6 set

ugen3.3: <vendor 0x1005 USB FLASH DRIVE> at usbus3
umass1 on uhub1
umass1: <vendor 0x1005 USB FLASH DRIVE, class 0/0, rev 2.00/1.00, addr 3> on usbus3
da1 at umass-sim1 bus 1 scbus8 target 0 lun 0
da1: < USB FLASH DRIVE PMAP> Removable Direct Access SCSI device
da1: Serial Number 07AA03804BF7FE97
da1: 40.000MB/s transfers
da1: 7632MB (15630336 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
g_dev_taste: make_dev_p() failed (gp->name=diskid/DISK-07AA03804BF7FE97s1, error=17)
g_dev_taste: make_dev_p() failed (gp->name=da1s1, error=17)
You see, the same dongle, could not be inserted in the same port (hub?). So, I have only 2—3 insertions/detachments of USB sticks before next reboot.

dmesg.boot part
Code:
Copyright (c) 1992-2019 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 11.2-STABLE #12 r346801: Sun Apr 28 23:52:25 +07 2019
    root@94.180.119.80:/usr/obj/usr/src/sys/GJA822M amd64
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
sysctl: OID number(131) is already in use for 'me'
VT(vga): resolution 640x480
CPU: AMD FX(tm)-8300 Eight-Core Processor            (3314.95-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x600f20  Family=0x15  Model=0x2  Stepping=0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x1ebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,Topology,PCXC,PNXC>
  Structured Extended Features=0x8<BMI1>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16330686464 (15574 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <120214 APIC0955>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20171214/tbfadt-796)
Firmware Warning (ACPI): 32/64X length mismatch in FADT/Gpe0Block: 64/32 (20171214/tbfadt-748)
ioapic0: Changing APIC ID to 24
ioapic0 <Version 2.1> irqs 0-23 on motherboard
Cuse v0.1.36 @ /dev/cuse
random: entropy device external interface
wlan: mac acl policy registered
module_register_init: MOD_LOAD (vesa, 0xffffffff80944c50, 0) error 19
000.000049 [4213] netmap_init               netmap: loaded module
nexus0
vtvga0: <VT VGA driver> on motherboard
smbios0: <System Management BIOS> at iomem 0xfbf40-0xfbf5e on motherboard
smbios0: Version: 2.5
cryptosoft0: <software crypto> on motherboard
aesni0: <AES-CBC,AES-XTS,AES-GCM,AES-ICM> on motherboard
acpi0: <120214 XSDT0955> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
cpu4: <ACPI CPU> on acpi0
cpu5: <ACPI CPU> on acpi0
cpu6: <ACPI CPU> on acpi0
cpu7: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 350
Event timer "HPET1" frequency 14318180 Hz quality 350
Event timer "HPET2" frequency 14318180 Hz quality 350
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc0ff mem 0xd0000000-0xdfffffff,0xfe9f0000-0xfe9fffff,0xfe800000-0xfe8fffff irq 18 at device 5.0 on pci1
vgapci0: Boot video device
hdac0: <ATI RS780 HDA Controller> mem 0xfe9e8000-0xfe9ebfff irq 19 at device 5.1 on pci1
pcib2: <ACPI PCI-PCI bridge> irq 19 at device 7.0 on pci0
pci2: <ACPI PCI bus> on pcib2
xhci0: <ASMedia ASM1042A USB 3.0 controller> mem 0xfeaf0000-0xfeaf7fff irq 19 at device 0.0 on pci2
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Unable to map MSI-X table 
usbus0 on xhci0
pcib3: <ACPI PCI-PCI bridge> irq 18 at device 10.0 on pci0
pci3: <ACPI PCI bus> on pcib3

ahci0: <AMD SB7x0/SB8x0/SB9x0 AHCI SATA controller> port 0xb000-0xb007,0xa000-0xa003,0x9000-0x9007,0x8000-0x8003,0x7000-0x700f mem 0xfe7ffc00-0xfe7fffff irq 22 at device 17.0 on pci0
ahci0: AHCI v1.10 with 6 3Gbps ports, Port Multiplier supported
ahci0: quirks=0x22000<ATI_PMP_BUG,1MSI>
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich4: <AHCI channel> at channel 4 on ahci0
ahcich5: <AHCI channel> at channel 5 on ahci0
ohci0: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe7fe000-0xfe7fefff irq 16 at device 18.0 on pci0
usbus1 on ohci0
ohci1: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe7fd000-0xfe7fdfff irq 16 at device 18.1 on pci0
usbus2 on ohci1
ehci0: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfe7ff800-0xfe7ff8ff irq 17 at device 18.2 on pci0
usbus3: EHCI version 1.0
usbus3 on ehci0
ohci2: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe7fc000-0xfe7fcfff irq 18 at device 19.0 on pci0
usbus4 on ohci2
ohci3: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe7fb000-0xfe7fbfff irq 18 at device 19.1 on pci0
usbus5 on ohci3
ehci1: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfe7ff400-0xfe7ff4ff irq 19 at device 19.2 on pci0
usbus6: EHCI version 1.0
usbus6 on ehci1
pci0: <mass storage, ATA> at device 20.1 (no driver attached)
hdac1: <ATI SB600 HDA Controller> mem 0xfe7f4000-0xfe7f7fff irq 16 at device 20.2 on pci0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib4: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci4: <ACPI PCI bus> on pcib4

ohci4: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe7fa000-0xfe7fafff irq 18 at device 20.5 on pci0
usbus7 on ohci4
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
acpi_button0: <Power Button> on acpi0
aibs0: <ASUSTeK AI Booster (ACPI ASOC ATK0110)> on acpi0
aibs0: v0: 0x06020000        Vcore Voltage   850 /  1600
aibs0: v1: 0x06020001         +3.3 Voltage  2970 /  3630
aibs0: v2: 0x06020002           +5 Voltage  4500 /  5500
aibs0: v3: 0x06020003          +12 Voltage 10200 / 13800
aibs0: t0: 0x06030000      CPU Temperature   600 /   950
aibs0: t1: 0x06030001       MB Temperature   450 /   750
aibs0: f0: 0x06040000        CPU FAN Speed   600 /  7200
aibs0: f1: 0x06040001    CHASSIS FAN Speed   600 /  7200
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
orm0: <ISA Option ROM> at iomem 0xcf000-0xcffff on isa0
amdsbwd0: Previous Reset was caused by Watchdog
amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem 0xfec000f0-0xfec000f3,0xfec000f4-0xfec000f7 on isa0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
fuse-freebsd: version 0.4.4, FUSE ABI 7.8
Timecounters tick every 1.428 msec
ipfw2 (+ipv6) initialized, divert enabled, nat loadable, default to accept, logging disabled

usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 12Mbps Full Speed USB v1.0
usbus6: 480Mbps High Speed USB v2.0
usbus7: 12Mbps Full Speed USB v1.0

ugen1.1: <ATI OHCI root HUB> at usbus1
uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen3.1: <ATI EHCI root HUB> at usbus3
uhub1: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
ugen2.1: <ATI OHCI root HUB> at usbus2
uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen4.1: <ATI OHCI root HUB> at usbus4
uhub3: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen6.1: <ATI EHCI root HUB> at usbus6
uhub4: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus6
ugen5.1: <ATI OHCI root HUB> at usbus5
uhub5: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5
ugen7.1: <ATI OHCI root HUB> at usbus7
uhub6: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus7
ugen0.1: <0x1b21 XHCI root HUB> at usbus0
uhub7: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0

pmc: Unknown AMD64 CPU.
pmc: Unknown AMD CPU.
hwpmc: SOFT/16/64/0x67<INT,USR,SYS,REA,WRI>

random: unblocking device.
ugen3.2: <Ralink 802.11 n WLAN> at usbus3
run0 on uhub1
run0: <1.0> on usbus3
 
I had similar issues years ago with a Gigabyte motherboard and upgrading the BIOS fixed the issue. Is your motherboard BIOS updated to the most recent available?
 
Your basic problem is this: "provider da0 has error 6 set". Which looks familiar; I've had similar problems. Matter-of-fact, if you google search for "provider has error 6 set", you find a post from me from a few years ago. Unfortunately for you, I never solved the problem, but side-stepped it by replacing USB with eSATA.

What happens is that disk da0 is connected to a USB port. When you disconnect it, you correctly get the message "ugen...disconnected". The next message is "provider ... has error 6 set". And error 6 is ENXIO, which means that someone (maybe in the kernel) tried to access a device that is still in memory, but no longer exists in hardware. So some process thinks the disk is still there, and that probably blocks the USB port from being completely freed.

This is probably a bizarre bug in some low-level FreeBSD code (once it says "disconnected", it should have known better), but as trev said, probably triggered by another bizarre bug in the USB implementation. Try upgrading things, it might get better.
 
Your basic problem is this: "provider da0 has error 6 set". Which looks familiar; I've had similar problems. Matter-of-fact, if you google search for "provider has error 6 set", you find a post from me from a few years ago. Unfortunately for you, I never solved the problem, but side-stepped it by replacing USB with eSATA.

What happens is that disk da0 is connected to a USB port. When you disconnect it, you correctly get the message "ugen...disconnected". The next message is "provider ... has error 6 set". And error 6 is ENXIO, which means that someone (maybe in the kernel) tried to access a device that is still in memory, but no longer exists in hardware. So some process thinks the disk is still there, and that probably blocks the USB port from being completely freed.

This is probably a bizarre bug in some low-level FreeBSD code (once it says "disconnected", it should have known better), but as trev said, probably triggered by another bizarre bug in the USB implementation. Try upgrading things, it might get better.
No. I think I was not clear enough. This "provider has error 6 set" occurs only when I desperately try to mount the stick, although it has not emerged in devices. (I've inserted it in the same USB-port, nothing emerged in /dev/da* or in dmesg but just for a second indicator led on the stick flashed (it lights all the time a stick is inserted when all goes O.K.), so I tried the same device that vanished seconds ago.) So, I suppose the "provider" error is not a problem in my case.
 
I had similar issues years ago with a Gigabyte motherboard and upgrading the BIOS fixed the issue. Is your motherboard BIOS updated to the most recent available?
Yes, it is the most recent that was available from Asus.
 
Did you test it on another USB ports? sometimes this happens of USB ports.
type of USB can make a problem like this.
 
Did you test it on another USB ports? sometimes this happens of USB ports.
type of USB can make a problem like this.
What another USB ports? I tried all USB sockets of my machine with different USB sticks with no luck. Only amount of "hubs" times I am allowed to insert USB stick.
 
Apologies for jumping into this thread a year later.. but I'm having the same problem as far as I can tell (except I run into the issue with a yubikey more often than anything else). I'm on 12.1-RELEASE-p4.
 
Back
Top