Re: xhci dead after resume

2015-01-08 Thread Remi Locherer
On Mon, Jan 05, 2015 at 01:40:10PM +0100, Martin Pieuchot wrote:
> On 02/01/15(Fri) 13:42, Martin Pieuchot wrote:
> > On 02/01/15(Fri) 09:47, Remi Locherer wrote:
> > > On Thu, Jan 01, 2015 at 09:32:20PM +0100, Remi Locherer wrote:
> > > > >Synopsis:  xhci dead after resume
> > > > >Category:  kernel
> > > > >Environment:
> > > > System  : OpenBSD 5.6
> > > > Details : OpenBSD 5.6-current (GENERIC.MP) #735: Sat Dec 27 
> > > > 13:55:58 MST 2014
> > > >  
> > > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > > 
> > > > Architecture: OpenBSD.amd64
> > > > Machine : amd64
> > > > 
> > > > >Description:
> > > > After resuming the notebook devices do not attach to the xhci 
> > > > port
> > > > anymore while devices on the ehci port still work fine. I tried
> > > > a mouse, usb stick and cdrom. The cdrom gets power from the port
> > > > so I can open the tray but it does not attach.
> > > > 
> > > > >Fix:
> > > > After a reboot the xhci port works again
> > >  
> > > dmesg from a kernel compiled with XHCI_DEBUG including a suspend-resume
> > > cycle:
> > 
> > Apparently Renesas HC need to be completely reconfigure upon resume.
> > Linux have a quirk for such piece of hardware.  I'll try to bake a diff
> > unless someone... ok I can dream :)
> 
> I just committed a workaround for this issue as I couldn't find any
> documentation for a proper fix.  Anyway I can no longer reproduce the
> problem.
> 
> Let me know if it still does not work on your machine.
> 
> Regards,
> Martin
> 
I tested with the snapshot from January 7. Now the xhci port works fine
after resume. Thanks!

Remi



Re: xhci dead after resume

2015-01-05 Thread Martin Pieuchot
On 02/01/15(Fri) 13:42, Martin Pieuchot wrote:
> On 02/01/15(Fri) 09:47, Remi Locherer wrote:
> > On Thu, Jan 01, 2015 at 09:32:20PM +0100, Remi Locherer wrote:
> > > >Synopsis:xhci dead after resume
> > > >Category:kernel
> > > >Environment:
> > >   System  : OpenBSD 5.6
> > >   Details : OpenBSD 5.6-current (GENERIC.MP) #735: Sat Dec 27 
> > > 13:55:58 MST 2014
> > >
> > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > 
> > >   Architecture: OpenBSD.amd64
> > >   Machine : amd64
> > > 
> > > >Description:
> > >   After resuming the notebook devices do not attach to the xhci port
> > >   anymore while devices on the ehci port still work fine. I tried
> > >   a mouse, usb stick and cdrom. The cdrom gets power from the port
> > >   so I can open the tray but it does not attach.
> > > 
> > > >Fix:
> > >   After a reboot the xhci port works again
> >  
> > dmesg from a kernel compiled with XHCI_DEBUG including a suspend-resume
> > cycle:
> 
> Apparently Renesas HC need to be completely reconfigure upon resume.
> Linux have a quirk for such piece of hardware.  I'll try to bake a diff
> unless someone... ok I can dream :)

I just committed a workaround for this issue as I couldn't find any
documentation for a proper fix.  Anyway I can no longer reproduce the
problem.

Let me know if it still does not work on your machine.

Regards,
Martin



Re: xhci dead after resume

2015-01-02 Thread Martin Pieuchot
On 02/01/15(Fri) 09:47, Remi Locherer wrote:
> On Thu, Jan 01, 2015 at 09:32:20PM +0100, Remi Locherer wrote:
> > >Synopsis:  xhci dead after resume
> > >Category:  kernel
> > >Environment:
> > System  : OpenBSD 5.6
> > Details : OpenBSD 5.6-current (GENERIC.MP) #735: Sat Dec 27 
> > 13:55:58 MST 2014
> >  
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > 
> > Architecture: OpenBSD.amd64
> > Machine : amd64
> > 
> > >Description:
> > After resuming the notebook devices do not attach to the xhci port
> > anymore while devices on the ehci port still work fine. I tried
> > a mouse, usb stick and cdrom. The cdrom gets power from the port
> > so I can open the tray but it does not attach.
> > 
> > >Fix:
> > After a reboot the xhci port works again
>  
> dmesg from a kernel compiled with XHCI_DEBUG including a suspend-resume
> cycle:

Apparently Renesas HC need to be completely reconfigure upon resume.
Linux have a quirk for such piece of hardware.  I'll try to bake a diff
unless someone... ok I can dream :)

> 
> OpenBSD 5.7-beta (GENERIC.MP.XHCI_DEBUG) #0: Fri Jan  2 09:16:12 CET 2015
> r...@mistral.relo.ch:/usr/src/sys/arch/amd64/compile/GENERIC.MP.XHCI_DEBUG
> real mem = 3881746432 (3701MB)
> avail mem = 3774537728 (3599MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe0970 (63 entries)
> bios0: vendor Phoenix Technologies Ltd. version "P00ACX" date 04/26/2013
> bios0: SAMSUNG ELECTRONICS CO., LTD. 900X3F
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SLIC SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI 
> MSDM UEFI UEFI
> acpi0: wakeup devices P0P1(S4) GLAN(S4) XHC_(S4) HDEF(S4) PXSX(S4) RP01(S4) 
> PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP06(S4) 
> PXSX(S4) RP07(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz, 1696.41 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
> 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 1 (application processor)
> cpu1: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 1, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> acpimcfg0 at acpi0 addr 0xf800, bus 0-63
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (P0P1)
> acpiprt2 at acpi0: bus 1 (RP01)
> acpiprt3 at acpi0: bus -1 (RP02)
> acpiprt4 at acpi0: bus -1 (RP03)
> acpiprt5 at acpi0: bus 2 (RP04)
> acpiprt6 at acpi0: bus 3 (RP05)
> acpiprt7 at acpi0: bus -1 (RP06)
> acpiprt8 at acpi0: bus -1 (RP07)
> acpiprt9 at acpi0: bus -1 (RP08)
> acpiprt10 at acpi0: bus -1 (PEG0)
> acpiprt11 at acpi0: bus -1 (PEG1)
> acpiprt12 at acpi0: bus -1 (PEG2)
> acpiprt13 at acpi0: bus -1 (PEG3)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C3, C2, C1, PSS
> acpicpu1 at acpi0: C3, C2, C1, PSS
> acpicpu2 at acpi0: C3, C2, C1, PSS
> acpicpu3 at acpi0: C3, C2, C1, PSS
> acpipwrres0 at acpi0: FN00, resource for FAN0
> acpipwrres1 at acpi0: FN01, reso

Re: xhci dead after resume

2015-01-02 Thread Remi Locherer
On Thu, Jan 01, 2015 at 09:32:20PM +0100, Remi Locherer wrote:
> >Synopsis:xhci dead after resume
> >Category:kernel
> >Environment:
>   System  : OpenBSD 5.6
>   Details : OpenBSD 5.6-current (GENERIC.MP) #735: Sat Dec 27 
> 13:55:58 MST 2014
>
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>   Architecture: OpenBSD.amd64
>   Machine : amd64
> 
> >Description:
>   After resuming the notebook devices do not attach to the xhci port
>   anymore while devices on the ehci port still work fine. I tried
>   a mouse, usb stick and cdrom. The cdrom gets power from the port
>   so I can open the tray but it does not attach.
> 
> >Fix:
>   After a reboot the xhci port works again
 
dmesg from a kernel compiled with XHCI_DEBUG including a suspend-resume
cycle:

OpenBSD 5.7-beta (GENERIC.MP.XHCI_DEBUG) #0: Fri Jan  2 09:16:12 CET 2015
r...@mistral.relo.ch:/usr/src/sys/arch/amd64/compile/GENERIC.MP.XHCI_DEBUG
real mem = 3881746432 (3701MB)
avail mem = 3774537728 (3599MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe0970 (63 entries)
bios0: vendor Phoenix Technologies Ltd. version "P00ACX" date 04/26/2013
bios0: SAMSUNG ELECTRONICS CO., LTD. 900X3F
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI MSDM 
UEFI UEFI
acpi0: wakeup devices P0P1(S4) GLAN(S4) XHC_(S4) HDEF(S4) PXSX(S4) RP01(S4) 
PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP06(S4) 
PXSX(S4) RP07(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz, 1696.41 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
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 1 (application processor)
cpu1: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-3337U 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpicpu2 at acpi0: C3, C2, C1, PSS
acpicpu3 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 106 degC
acpitz1 at acpi0: critical temperature is 106 degC
acpibat0 at acpi0: BAT1 type LION oem "SAMSUNG Electronics"
acpiac0 at acpi0: AC unit offline
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: