On 09/10/15 11:11, Martin Pieuchot wrote:
On 10/09/15(Thu) 08:46, Mike Larkin wrote:
On Thu, Sep 10, 2015 at 08:17:39AM -0500, Aaron Poffenberger wrote:
On 09/10/15 03:59, Stefan Sperling wrote:
On Wed, Sep 09, 2015 at 09:43:44PM -0500, Aaron Poffenberger wrote:
Occasional problems with loading firmware for urtwn as seen near the end of
this dmesg:
  urtwn0: could not load firmware page 1

I've also seen the same message for page 0.

Interesting. I don't think I've seen this before. How often does it occur?
Can you please apply the following patch and show us what it prints now?

Index: if_urtwn.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.50
diff -u -p -r1.50 if_urtwn.c
--- if_urtwn.c  24 Aug 2015 04:07:38 -0000      1.50
+++ if_urtwn.c  10 Sep 2015 08:49:45 -0000
@@ -2575,8 +2575,8 @@ urtwn_load_firmware(struct urtwn_softc *
                mlen = MIN(len, R92C_FW_PAGE_SIZE);
                error = urtwn_fw_loadpage(sc, page, ptr, mlen);
                if (error != 0) {
-                       printf("%s: could not load firmware page %d\n",
-                           sc->sc_dev.dv_xname, page);
+                       printf("%s: could not load firmware page %d "
+                           "(error %d)\n", sc->sc_dev.dv_xname, page, error);
                        goto fail;
                }
                ptr += mlen;


It usually happens after suspend/resume. Not after every resume but usually
after the second or third.

The dmesg I sent was the first time I saw it at boot.

I'm setting up source on this system. I'll try the patch as soon as all the
bits are in place.


Is firmware trying to be loaded during DVACT_RESUME by mistake?

I looked (quickly) but couldn't tell since we usually don't have _activate(..)
functions for USB (since we detach and reattach on suspend/resume).

Firmware should be loaded during DVACT_WAKEUP, not DVACT_RESUME. When do we
do the USB bus explore? during _WAKEUP or _RESUME?

USB bus explore is done by a specific thread, the usb task thread
(usbtask).  During DVACT_RESUME an explore task is schedule, which
means the usb task thread is ``wakeup(9)''.

Since preemption is re-enabled before DVACT_WAKEUP runs, this
thread might end up running before DVACT_WAKEUP, but I can't say
if it matters or not.  Does the diff below help?

I'd be interested to see *which* error the function is returning in
this case, especially if it's timeout related...

Index: usb.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usb.c,v
retrieving revision 1.108
diff -u -p -r1.108 usb.c
--- usb.c       1 Sep 2015 10:00:26 -0000       1.108
+++ usb.c       10 Sep 2015 16:09:22 -0000
@@ -927,7 +927,7 @@ usb_activate(struct device *self, int ac
                if (sc->sc_bus->root_hub != NULL)
                        usb_detach_roothub(sc);
                break;
-       case DVACT_RESUME:
+       case DVACT_WAKEUP:
                sc->sc_bus->dying = 0;

                /*


Sorry for the delay. It's error 15:
urtwn0: could not load firmware page 1 (error 15)

Dmesg below. Do you want me to still try the patch above?

OpenBSD 5.8-current (GENERIC.MP) #1: Thu Sep 10 14:10:19 CDT 2015
r...@thorin.poffenberger.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error ff<clock_battery,ROM_cksum,config_unit,memory_size,fixed_disk,invalid_time>
real mem = 4180746240 (3987MB)
avail mem = 4050083840 (3862MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT DMAR MCFG acpi0: wakeup devices P0P2(S4) PEG2(S4) EC__(S4) HDEF(S4) RP02(S4) ARPT(S4) RP05(S4) EHC1(S4) EHC2(S4) XHC1(S4) ADP1(S4) LID0(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz, 1696.42 MHz
cpu0: FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz, 1696.15 MHz
cpu1: FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz, 1696.15 MHz
cpu2: FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz, 1696.15 MHz
cpu3: FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-153
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P2)
acpiprt2 at acpi0: bus -1 (PEG2)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP05)
acpicpu0 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C3(200@198 mwait.1@0x30), C2(500@148 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpibat0 at acpi0: BAT0 model "3545797981023400290" type 3545797981528607052 oem "3545797981528673619"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1696 MHz: speeds: 1801, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
memory map conflict 0xe00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xffe70000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1440x900
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 7 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: Cirrus Logic CS4206, Intel/0x2806, using Cirrus Logic CS4206
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4: msi
pci2 at ppb1 bus 2
"Broadcom BCM43224" rev 0x01 at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 4 "Intel 7 Series PCIE" rev 0xc4: msi
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 vendor "Intel", unknown product 0x1547 rev 0x03
pci4 at ppb3 bus 4
ppb4 at pci4 dev 0 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci5 at ppb4 bus 5
vendor "Intel", unknown product 0x1547 (class system subclass miscellaneous, rev 0x03) at pci5 dev 0 function 0 not configured ppb5 at pci4 dev 3 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci6 at ppb5 bus 6
ppb6 at pci4 dev 4 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci7 at ppb6 bus 55
ppb7 at pci4 dev 5 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci8 at ppb7 bus 104
ppb8 at pci4 dev 6 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci9 at ppb8 bus 105
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 22
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel QS77 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, APPLE SSD TS128E, TQAA> SCSI3 0/direct fixed naa.0000000000000000
sd0: 115712MB, 512 bytes/sector, 236978176 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
iic0: addr 0x2c 03=fc 05=6d 06=c0 71=06 72=80 86=86 90=37 91=1c 92=26 93=3b 94=68 95=8c 96=65 97=87 98=3d 9a=9f 9f=7c a0=7f a1=b5 a2=bf a3=7b a4=28 a5=cf a6=64 a7=2d words 00=0000 01=0000 02=00fc 03=fc00 04=006d 05=6dc0 06=c000 07=0000
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
nvram: invalid checksum
urtwn0 at uhub0 port 1 configuration 1 interface 0 "Realtek Belkin Wireless Adapter" rev 2.00/2.00 addr 2
urtwn0: MAC/BB RTL8192CU, RF 6052 2T2R, address b4:75:0e:1e:38:05
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/5.00 addr 3
uhidev0: no report descriptor
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Logitech product 0xc526" rev 2.00/5.00 addr 3
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uvideo0 at uhub3 port 1 configuration 1 interface 0 "Apple Inc. FaceTime HD Camera (Built-in)" rev 2.00/80.25 addr 3
video0 at uvideo0
ugen0 at uhub3 port 1 configuration 1 "Apple Inc. FaceTime HD Camera (Built-in)" rev 2.00/80.25 addr 3
uhub4 at uhub2 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhub5 at uhub4 port 8 "Standard Microsystems Hub" rev 2.00/b.b3 addr 3
uhub6 at uhub5 port 1 "Apple Inc. BRCM20702 Hub" rev 2.00/1.00 addr 4
uhidev2 at uhub6 port 1 configuration 1 interface 0 "Apple Computer product 0x820a" rev 2.00/1.00 addr 5
uhidev2: iclass 3/1, 1 report id
ukbd0 at uhidev2 reportid 1: 8 variable keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev3 at uhub6 port 2 configuration 1 interface 0 "Apple Computer product 0x820b" rev 2.00/1.00 addr 6
uhidev3: iclass 3/1, 2 report ids
ums0 at uhidev3 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ugen1 at uhub6 port 3 "Apple Inc. Bluetooth USB Host Controller" rev 2.00/1.47 addr 7 uhidev4 at uhub5 port 2 configuration 1 interface 0 "Apple Inc. Apple Internal Keyboard / Trackpad" rev 2.00/2.19 addr 8
uhidev4: iclass 3/1, 9 report ids
ukbd1 at uhidev4 reportid 1: 8 variable keys, 6 key codes, country code 33
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhid3 at uhidev4 reportid 9: input=0, output=0, feature=3
uhidev5 at uhub5 port 2 configuration 1 interface 1 "Apple Inc. Apple Internal Keyboard / Trackpad" rev 2.00/2.19 addr 8
uhidev5: iclass 3/0, 68 report ids
uhid4 at uhidev5 reportid 68: input=511, output=0, feature=0
ubcmtp0 at uhub5 port 2 configuration 1 interface 2 "Apple Inc. Apple Internal Keyboard / Trackpad" rev 2.00/2.19 addr 8
wsmouse1 at ubcmtp0 mux 0
umass0 at uhub5 port 3 configuration 1 interface 0 "Apple Card Reader" rev 2.00/3.10 addr 9
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <APPLE, SD Card Reader, 2.00> SCSI0 0/direct removable serial.05ac8404000000000310
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd2 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd2: 115710MB, 512 bytes/sector, 236974223 sectors
root on sd2a (baf0ef9518f9d306.a) swap on sd2b dump on sd2b
clock: unknown CMOS layout
urtwn0: could not load firmware page 1 (error 15)
uhidev0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhidev1 detached
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/5.00 addr 3
uhidev0: iclass 3/1
ums1 at uhidev0: 16 buttons, Z dir
wsmouse2 at ums1 mux 0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/5.00 addr 3
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
hw.sensors.cpu0.temp0=49.00 degC
hw.sensors.acpibat0.volt0=7.50 VDC (voltage)
hw.sensors.acpibat0.volt1=8.33 VDC (current voltage)
hw.sensors.acpibat0.power0=0.00 W (rate)
hw.sensors.acpibat0.watthour0=64.95 Wh (last full capacity)
hw.sensors.acpibat0.watthour1=0.25 Wh (warning capacity)
hw.sensors.acpibat0.watthour2=0.10 Wh (low capacity)
hw.sensors.acpibat0.watthour3=63.95 Wh (remaining capacity), OK
hw.sensors.acpibat0.watthour4=67.00 Wh (design capacity)
hw.sensors.acpibat0.raw0=0 (battery idle), OK
hw.sensors.acpiac0.indicator0=On (power supply)
hw.sensors.acpibtn0.indicator0=On (lid open)
hw.sensors.softraid0.drive0=online (sd2), OK

Reply via email to