I have a USB 802.11n capable dongle that works fine in a netbook[3] but not
in a server[2], which is where it was intended. The sypmtom is a cessation
of packet traffic followed by device timeout as described in urtwn(4).
A similar problem was mentioned last year[1] on misc@, though the specific
Realtek chipset involved was not posted.
I built a kernel with USB_DEBUG which enables URTWN_DEBUG, and while running
with that test kernel I could not replicate the problem. From that test, I
understand that timing or a race condition are likely areas of research. It
aligns also with the slower system [3] not being able to replicate either.
I could use some help as I am unsure how to investigate further. I tried
doubling the sc_tx_timer in if_urtwn.c from 5 to 10, with no effect, but
that was just a stab in the dark. Any suggestions for futher tests, or
a whack with a cluestick would be welcome.
Thanks!
-Josh Grosse-
[1] http://marc.info/?t=13466680111&r=1&w=2
[2] System that displays the timeout problem:
OpenBSD 5.4-current (GENERIC.MP) #82: Tue Oct 15 01:02:02 MDT 2013
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 Duo CPU E7200 @ 2.53GHz ("GenuineIntel" 686-class)
1.60 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,LAHF,PERF
real mem = 1072951296 (1023MB)
avail mem = 1043644416 (995MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/26/08, BIOS32 rev. 0 @ 0xf0010, SMBIOS
rev. 2.4 @ 0xfb450 (24 entries)
bios0: vendor American Megatrends Inc. version "P1.90" date 02/26/2008
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB
acpi0: wakeup devices PCI0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) EHCI(S4)
PS2K(S4) PS2M(S4) UAR1(S4) SLAN(S4) P0PA(S4) SLPB(S4) HDAC(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU E7200 @ 2.53GHz ("GenuineIntel" 686-class)
2.53 GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,LAHF,PERF
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 3, 24 pins
ioapic1 at mainbus0: apid 3 pa 0xfecc, version 3, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P9)
acpiprt2 at acpi0: bus 3 (P0PA)
acpiprt3 at acpi0: bus 2 (NBPG)
acpiprt4 at acpi0: bus 128 (PCI1)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
bios0: ROM list: 0xc/0xec00
cpu0: Enhanced SpeedStep disabled by BIOS
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "VIA PT894 Host" rev 0x00
viaagp0 at pchb0: v3
agp0 at viaagp0: aperture at 0xf800, size 0xf00
pchb1 at pci0 dev 0 function 1 "VIA PT894 Host" rev 0x00
pchb2 at pci0 dev 0 function 2 "VIA PT894 Host" rev 0x00
pchb3 at pci0 dev 0 function 3 "VIA PT890 Host" rev 0x00
pchb4 at pci0 dev 0 function 4 "VIA PT894 Host" rev 0x00
"VIA PT894 IOAPIC" rev 0x00 at pci0 dev 0 function 5 not configured
pchb5 at pci0 dev 0 function 7 "VIA PT894 Host" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8377 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 7600 GT" rev 0xa2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 2 function 0 vendor "VIA", unknown product 0xa208 rev 0x00:
apic 3 int 3
pci2 at ppb1 bus 2
pciide0 at pci0 dev 15 function 0 "VIA VT8237S SATA" rev 0x00: DMA
pciide0: using apic 2 int 21 for native-PCI interrupt
pciide1 at pci0 dev 15 function 1 "VIA VT82C571 IDE" rev 0x07: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide1 channel 0 drive 0:
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd1 at pciide1 channel 0 drive 1:
wd1: 16-sector PIO, LBA48, 715404MB, 1465149168 sectors
wd0(pciide1:0:0): using PIO mode 4, DMA mode 2
wd1(pciide1:0:1): using PIO mode 4, DMA mode 2
wd2 at pciide1 channel 1 drive 0:
wd2: 16-sector PIO, LBA48, 78533MB, 160836480 sectors
wd3 at pciide1 channel 1 drive 1:
wd3: 8-sector PIO, LBA, 38172MB, 78177792 sectors
wd2(pciide1:1:0): using PIO mode 4, DMA mode 2
wd3(pciide1:1:1): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 16 function 0 "VIA VT83C572 USB" rev 0xb0: apic 2 int 20
uhci1 at pci0 dev 16 function 1 "VIA VT83C572 USB" rev 0xb0: apic 2 int 22
uhci2 at pci0 dev 16 function 2 "VIA VT83C572 USB" rev 0xb0: apic 2 int 21
uhci3 at pci0 dev 16 function 3 "VIA VT83C572 USB" rev