uhidev_clear_iface_eps: clear endpoints failed!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
Since a few days aka. snapshots I see the following error message after
boot:

uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!

I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
also support switching USB for keyboard and mouse between different
devices. When I switch it off and on again I see this:

wsmouse0 detached
ums0 detached
uhid0 detached
uhidev0 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd0 detached
uhidev1 detached
wsmouse1 detached
ums1 detached
uhidev2 detached
uhub2 detached
uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev_clear_iface_eps: clear endpoints failed!
wskbd1: connecting to wsdisplay0
uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
uhidev1: iclass 3/1, 1 report id
ums0 at uhidev1 reportid 1: 3 buttons, Z dir
wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
 mux 0
uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
uhidev2: iclass 3/1, 5 report ids
ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
wsmouse1 at ums1 mux 0
uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0

My mouse works after connecting but my keyboard is completely dead. (KVM
ist fine other devices work properly=) I would be happy if I could test
a diff.

Rafael Sadowski


Full dmesg:

OpenBSD 6.8-current (GENERIC.MP) #313: Fri Feb  5 18:31:44 MST 2021
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17023193088 (16234MB)
avail mem = 16491933696 (15727MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x8b1a8000 (89 entries)
bios0: vendor American Megatrends Inc. version "3801" date 03/14/2018
bios0: ASUSTeK COMPUTER INC. Z170-PRO
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT DBG2 MCFG SSDT FIDT SSDT SSDT HPET SSDT SSDT UEFI SSDT LPIT WSMT SSDT SSDT DBGP
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) SIO1(S3) PS2K(S4) PS2M(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4012.26 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
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 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.76 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.76 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.76 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 8 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 2 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus 1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
acpibtn1 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
acpicpu2 at acpi0: C1(@1 halt!), PSS
acpicpu3 at acpi0: C1(@1 halt!), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpipwrres20 at acpi0: WRST
acpipwrres21 at acpi0: WRST
acpipwrres22 at acpi0: WRST
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 4012 MHz: speeds: 4001, 4000, 3800, 3500, 3300, 3100, 2900, 2600, 2400, 2200, 1900, 1700, 1500, 1300, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
drm0 at inteldrm0
inteldrm0: msi, SKYLAKE, gen 9
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x31: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 100 Series MEI" rev 0x31 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x31: msi, AHCI 1.3.1
ahci0: port 0: 3.0Gb/s
ahci0: PHY offline on port 1
ahci0: port 2: 6.0Gb/s
ahci0: port 3: 3.0Gb/s
ahci0: port 4: 3.0Gb/s
ahci0: port 5: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50024e9001a9ac31
sd0: 953868MB, 512 bytes/sector, 1953523055 sectors
sd1 at scsibus1 targ 2 lun 0: <ATA, Samsung SSD 850, EMT0> naa.5002538d4166218d
sd1: 476940MB, 512 bytes/sector, 976773168 sectors, thin
sd2 at scsibus1 targ 3 lun 0: <ATA, WDC WD20EARS-00M, 51.0> naa.50014ee60085518a
sd2: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd3 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50000f000b036843
sd3: 953869MB, 512 bytes/sector, 1953525168 sectors
sd4 at scsibus1 targ 5 lun 0: <ATA, SAMSUNG HD753LJ, 1AA0> naa.50000f0000034276
sd4: 715403MB, 512 bytes/sector, 1465147055 sectors
ppb0 at pci0 dev 27 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci4 at ppb3 bus 4
ppb4 at pci3 dev 1 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci5 at ppb4 bus 5
ppb5 at pci3 dev 2 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci6 at ppb5 bus 6
xhci1 at pci6 dev 0 function 0 vendor "Intel", unknown product 0x15b6 rev 0x00: msi, xHCI 1.0
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
ppb6 at pci3 dev 4 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci7 at ppb6 bus 7
ppb7 at pci0 dev 29 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci8 at ppb7 bus 8
nvme0 at pci8 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msix, NVMe 1.3
nvme0: Samsung SSD 970 EVO Plus 1TB, firmware 2B2QEXM7, serial S4EWNMFN800087M
scsibus2 at nvme0: 2 targets, initiator 0
sd5 at scsibus2 targ 1 lun 0: <NVMe, Samsung SSD 970, 2B2Q>
sd5: 953869MB, 512 bytes/sector, 1953525168 sectors
pcib0 at pci0 dev 31 function 0 "Intel Z170 LPC" rev 0x31
"Intel 100 Series PMC" rev 0x31 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x31: msi
azalia0: codecs: Realtek ALC1150, Intel/0x2809, using Realtek ALC1150
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x31: apic 2 int 16
iic0 at ichiic0
admtemp0 at iic0 addr 0x18: Xeon
em0 at pci0 dev 31 function 6 "Intel I219-V" rev 0x31: msi, address XX:XX:XX:XX:XX:XX
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
uhidev0 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 3
uhidev0: iclass 3/1, 5 report ids
ums0 at uhidev0 reportid 3: 5 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev0 reportid 5: input=5, output=6, feature=0
uhidev1 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev2 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev2: iclass 3/1, 1 report id
ums1 at uhidev2 reportid 1: 3 buttons, Z dir
wsmouse1 at ums1 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd5a (18c223507fa8363e.a) swap on sd5b dump on sd5b
inteldrm0: 2560x1440, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
uhidev_clear_iface_eps: clear endpoints failed!
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:

> Since a few days aka. snapshots I see the following error message after
> boot:
>
> uhidev_clear_iface_eps: clear endpoints failed!
> uhidev_clear_iface_eps: clear endpoints failed!
> uhidev_clear_iface_eps: clear endpoints failed!
>
> I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> also support switching USB for keyboard and mouse between different
> devices. When I switch it off and on again I see this:
>
> wsmouse0 detached
> ums0 detached
> uhid0 detached
> uhidev0 detached
> wskbd1: disconnecting from wsdisplay0
> wskbd1 detached
> ukbd0 detached
> uhidev1 detached
> wsmouse1 detached
> ums1 detached
> uhidev2 detached
> uhub2 detached
> uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd1 at ukbd0 mux 1
> uhidev_clear_iface_eps: clear endpoints failed!
> wskbd1: connecting to wsdisplay0
> uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> uhidev1: iclass 3/1, 1 report id
> ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
>  mux 0
> uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> uhidev2: iclass 3/1, 5 report ids
> ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> wsmouse1 at ums1 mux 0
> uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
>
> My mouse works after connecting but my keyboard is completely dead. (KVM
> ist fine other devices work properly=) I would be happy if I could test
> a diff.

Can you please send me an lsusb -v of your failing keyboard?

Furthermore, does the keyboard initially work after boot, and only
fails after your KVM Switch restart, or does the keyboard fail
straight away after boot?

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:

> On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
>
> > Since a few days aka. snapshots I see the following error message after
> > boot:
> >
> > uhidev_clear_iface_eps: clear endpoints failed!
> > uhidev_clear_iface_eps: clear endpoints failed!
> > uhidev_clear_iface_eps: clear endpoints failed!
> >
> > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > also support switching USB for keyboard and mouse between different
> > devices. When I switch it off and on again I see this:
> >
> > wsmouse0 detached
> > ums0 detached
> > uhid0 detached
> > uhidev0 detached
> > wskbd1: disconnecting from wsdisplay0
> > wskbd1 detached
> > ukbd0 detached
> > uhidev1 detached
> > wsmouse1 detached
> > ums1 detached
> > uhidev2 detached
> > uhub2 detached
> > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > uhidev0: iclass 3/1
> > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > wskbd1 at ukbd0 mux 1
> > uhidev_clear_iface_eps: clear endpoints failed!
> > wskbd1: connecting to wsdisplay0
> > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > uhidev1: iclass 3/1, 1 report id
> > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> >  mux 0
> > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > uhidev2: iclass 3/1, 5 report ids
> > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > wsmouse1 at ums1 mux 0
> > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> >
> > My mouse works after connecting but my keyboard is completely dead. (KVM
> > ist fine other devices work properly=) I would be happy if I could test
> > a diff.
>
> Can you please send me an lsusb -v of your failing keyboard?
>

Bus 000 Device 001: ID 8086:0000 Intel Corp.
Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 000 Device 003: ID 062a:4102 Creative Labs
Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
Bus 001 Device 001: ID 8086:0000 Intel Corp.


Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1a40 Terminus Technology Inc.
  idProduct          0x0101 4-Port HUB
  bcdDevice            1.11
  iManufacturer           0
  iProduct                1 USB 2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x0000
    Ganged power switching
    Ganged overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0103 power enable connect
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

> Furthermore, does the keyboard initially work after boot, and only
> fails after your KVM Switch restart, or does the keyboard fail
> straight away after boot?

Yes the keyboard initially work after a fresh boot and only fails after my
KVM Switch restart. When it fails a reboot helps.

Thanks for your support here.

Rafael

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Mon, Feb 08, 2021 at 05:03:34PM +0100, Rafael Sadowski wrote:

> On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:
> > On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
> >
> > > Since a few days aka. snapshots I see the following error message after
> > > boot:
> > >
> > > uhidev_clear_iface_eps: clear endpoints failed!
> > > uhidev_clear_iface_eps: clear endpoints failed!
> > > uhidev_clear_iface_eps: clear endpoints failed!
> > >
> > > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > > also support switching USB for keyboard and mouse between different
> > > devices. When I switch it off and on again I see this:
> > >
> > > wsmouse0 detached
> > > ums0 detached
> > > uhid0 detached
> > > uhidev0 detached
> > > wskbd1: disconnecting from wsdisplay0
> > > wskbd1 detached
> > > ukbd0 detached
> > > uhidev1 detached
> > > wsmouse1 detached
> > > ums1 detached
> > > uhidev2 detached
> > > uhub2 detached
> > > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > uhidev0: iclass 3/1
> > > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > > wskbd1 at ukbd0 mux 1
> > > uhidev_clear_iface_eps: clear endpoints failed!
> > > wskbd1: connecting to wsdisplay0
> > > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > uhidev1: iclass 3/1, 1 report id
> > > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> > >  mux 0
> > > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > > uhidev2: iclass 3/1, 5 report ids
> > > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > > wsmouse1 at ums1 mux 0
> > > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> > >
> > > My mouse works after connecting but my keyboard is completely dead. (KVM
> > > ist fine other devices work properly=) I would be happy if I could test
> > > a diff.
> >
> > Can you please send me an lsusb -v of your failing keyboard?
> >
>
> Bus 000 Device 001: ID 8086:0000 Intel Corp.
> Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> Bus 000 Device 003: ID 062a:4102 Creative Labs
> Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
> Bus 001 Device 001: ID 8086:0000 Intel Corp.
>
>
> Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            9 Hub
>   bDeviceSubClass         0 Unused
>   bDeviceProtocol         1 Single TT
>   bMaxPacketSize0        64
>   idVendor           0x1a40 Terminus Technology Inc.
>   idProduct          0x0101 4-Port HUB
>   bcdDevice            1.11
>   iManufacturer           0
>   iProduct                1 USB 2.0 Hub
>   iSerial                 0
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           25
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0xe0
>       Self Powered
>       Remote Wakeup
>     MaxPower              100mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           1
>       bInterfaceClass         9 Hub
>       bInterfaceSubClass      0 Unused
>       bInterfaceProtocol      0 Full speed (or root) hub
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0001  1x 1 bytes
>         bInterval              12
> Hub Descriptor:
>   bLength               9
>   bDescriptorType      41
>   nNbrPorts             4
>   wHubCharacteristic 0x0000
>     Ganged power switching
>     Ganged overcurrent protection
>     TT think time 8 FS bits
>   bPwrOn2PwrGood       50 * 2 milli seconds
>   bHubContrCurrent    100 milli Ampere
>   DeviceRemovable    0x00
>   PortPwrCtrlMask    0xff
>  Hub Port Status:
>    Port 1: 0000.0103 power enable connect
>    Port 2: 0000.0103 power enable connect
>    Port 3: 0000.0100 power
>    Port 4: 0000.0100 power
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            9 Hub
>   bDeviceSubClass         0 Unused
>   bDeviceProtocol         0 Full speed (or root) hub
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0001
>   Self Powered
>
> > Furthermore, does the keyboard initially work after boot, and only
> > fails after your KVM Switch restart, or does the keyboard fail
> > straight away after boot?
>
> Yes the keyboard initially work after a fresh boot and only fails after my
> KVM Switch restart. When it fails a reboot helps.

Hmm, I can't see anything obvious.  Though it seems like your mouse
and keyboard are hidden between the KVM Switch.  When you attach
the mouse and keyboard directly to that machine, do you still get
the uhidev_clear_iface_eps() error?

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Tue, Feb 09, 2021 at 08:28:05AM +0100, Marcus Glocker wrote:

> On Mon, Feb 08, 2021 at 05:03:34PM +0100, Rafael Sadowski wrote:
>
> > On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:
> > > On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
> > >
> > > > Since a few days aka. snapshots I see the following error message after
> > > > boot:
> > > >
> > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > >
> > > > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > > > also support switching USB for keyboard and mouse between different
> > > > devices. When I switch it off and on again I see this:
> > > >
> > > > wsmouse0 detached
> > > > ums0 detached
> > > > uhid0 detached
> > > > uhidev0 detached
> > > > wskbd1: disconnecting from wsdisplay0
> > > > wskbd1 detached
> > > > ukbd0 detached
> > > > uhidev1 detached
> > > > wsmouse1 detached
> > > > ums1 detached
> > > > uhidev2 detached
> > > > uhub2 detached
> > > > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > > > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > uhidev0: iclass 3/1
> > > > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > > > wskbd1 at ukbd0 mux 1
> > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > wskbd1: connecting to wsdisplay0
> > > > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > uhidev1: iclass 3/1, 1 report id
> > > > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > > > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> > > >  mux 0
> > > > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > > > uhidev2: iclass 3/1, 5 report ids
> > > > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > > > wsmouse1 at ums1 mux 0
> > > > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> > > >
> > > > My mouse works after connecting but my keyboard is completely dead. (KVM
> > > > ist fine other devices work properly=) I would be happy if I could test
> > > > a diff.
> > >
> > > Can you please send me an lsusb -v of your failing keyboard?
> > >
> >
> > Bus 000 Device 001: ID 8086:0000 Intel Corp.
> > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > Bus 000 Device 003: ID 062a:4102 Creative Labs
> > Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
> > Bus 001 Device 001: ID 8086:0000 Intel Corp.
> >
> >
> > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > Device Descriptor:
> >   bLength                18
> >   bDescriptorType         1
> >   bcdUSB               2.00
> >   bDeviceClass            9 Hub
> >   bDeviceSubClass         0 Unused
> >   bDeviceProtocol         1 Single TT
> >   bMaxPacketSize0        64
> >   idVendor           0x1a40 Terminus Technology Inc.
> >   idProduct          0x0101 4-Port HUB
> >   bcdDevice            1.11
> >   iManufacturer           0
> >   iProduct                1 USB 2.0 Hub
> >   iSerial                 0
> >   bNumConfigurations      1
> >   Configuration Descriptor:
> >     bLength                 9
> >     bDescriptorType         2
> >     wTotalLength           25
> >     bNumInterfaces          1
> >     bConfigurationValue     1
> >     iConfiguration          0
> >     bmAttributes         0xe0
> >       Self Powered
> >       Remote Wakeup
> >     MaxPower              100mA
> >     Interface Descriptor:
> >       bLength                 9
> >       bDescriptorType         4
> >       bInterfaceNumber        0
> >       bAlternateSetting       0
> >       bNumEndpoints           1
> >       bInterfaceClass         9 Hub
> >       bInterfaceSubClass      0 Unused
> >       bInterfaceProtocol      0 Full speed (or root) hub
> >       iInterface              0
> >       Endpoint Descriptor:
> >         bLength                 7
> >         bDescriptorType         5
> >         bEndpointAddress     0x81  EP 1 IN
> >         bmAttributes            3
> >           Transfer Type            Interrupt
> >           Synch Type               None
> >           Usage Type               Data
> >         wMaxPacketSize     0x0001  1x 1 bytes
> >         bInterval              12
> > Hub Descriptor:
> >   bLength               9
> >   bDescriptorType      41
> >   nNbrPorts             4
> >   wHubCharacteristic 0x0000
> >     Ganged power switching
> >     Ganged overcurrent protection
> >     TT think time 8 FS bits
> >   bPwrOn2PwrGood       50 * 2 milli seconds
> >   bHubContrCurrent    100 milli Ampere
> >   DeviceRemovable    0x00
> >   PortPwrCtrlMask    0xff
> >  Hub Port Status:
> >    Port 1: 0000.0103 power enable connect
> >    Port 2: 0000.0103 power enable connect
> >    Port 3: 0000.0100 power
> >    Port 4: 0000.0100 power
> > Device Qualifier (for other device speed):
> >   bLength                10
> >   bDescriptorType         6
> >   bcdUSB               2.00
> >   bDeviceClass            9 Hub
> >   bDeviceSubClass         0 Unused
> >   bDeviceProtocol         0 Full speed (or root) hub
> >   bMaxPacketSize0        64
> >   bNumConfigurations      1
> > Device Status:     0x0001
> >   Self Powered
> >
> > > Furthermore, does the keyboard initially work after boot, and only
> > > fails after your KVM Switch restart, or does the keyboard fail
> > > straight away after boot?
> >
> > Yes the keyboard initially work after a fresh boot and only fails after my
> > KVM Switch restart. When it fails a reboot helps.
>
> Hmm, I can't see anything obvious.  Though it seems like your mouse
> and keyboard are hidden between the KVM Switch.  When you attach
> the mouse and keyboard directly to that machine, do you still get
> the uhidev_clear_iface_eps() error?

Also can you please run this debug diff and send me the results?


Index: uhidev.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
retrieving revision 1.86
diff -u -p -u -p -r1.86 uhidev.c
--- uhidev.c 4 Feb 2021 16:18:34 -0000 1.86
+++ uhidev.c 9 Feb 2021 12:56:45 -0000
@@ -974,30 +974,38 @@ uhidev_clear_iface_eps(struct uhidev_sof
  uint8_t xfertype;
  int i;
 
+ printf("%s: ENTER\n", __func__);
+
  /* Only clear interface endpoints when none are in use. */
- if (sc->sc_ipipe || sc->sc_opipe)
+ if (sc->sc_ipipe || sc->sc_opipe) {
+ printf("%s: out0\n", __func__);
  return;
- DPRINTFN(1,("%s: clear interface eps\n", __func__));
+ }
 
  id = usbd_get_interface_descriptor(iface);
- if (id == NULL)
- goto bad;
+ if (id == NULL) {
+ printf("%s: out1\n", __func__);
+ return;
+ }
 
  for (i = 0; i < id->bNumEndpoints; i++) {
  ed = usbd_interface2endpoint_descriptor(iface, i);
- if (ed == NULL)
- goto bad;
+ if (ed == NULL) {
+ printf("%s: out2\n", __func__);
+ return;
+ }
 
  xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
  if (xfertype == UE_BULK || xfertype == UE_INTERRUPT) {
  if (usbd_clear_endpoint_feature(sc->sc_udev,
-    ed->bEndpointAddress, UF_ENDPOINT_HALT))
- goto bad;
+    ed->bEndpointAddress, UF_ENDPOINT_HALT)) {
+ printf("%s: clear EP failed on EP=0x%02x\n",
+    __func__, ed->bEndpointAddress);
+ }
  }
  }
- return;
-bad:
- printf("%s: clear endpoints failed!\n", __func__);
+
+ printf("%s: EXIT\n", __func__);
 }
 
 int

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
On Tue Feb 09, 2021 at 01:58:25PM +0100, Marcus Glocker wrote:

> On Tue, Feb 09, 2021 at 08:28:05AM +0100, Marcus Glocker wrote:
>
> > On Mon, Feb 08, 2021 at 05:03:34PM +0100, Rafael Sadowski wrote:
> >
> > > On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:
> > > > On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
> > > >
> > > > > Since a few days aka. snapshots I see the following error message after
> > > > > boot:
> > > > >
> > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > >
> > > > > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > > > > also support switching USB for keyboard and mouse between different
> > > > > devices. When I switch it off and on again I see this:
> > > > >
> > > > > wsmouse0 detached
> > > > > ums0 detached
> > > > > uhid0 detached
> > > > > uhidev0 detached
> > > > > wskbd1: disconnecting from wsdisplay0
> > > > > wskbd1 detached
> > > > > ukbd0 detached
> > > > > uhidev1 detached
> > > > > wsmouse1 detached
> > > > > ums1 detached
> > > > > uhidev2 detached
> > > > > uhub2 detached
> > > > > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > > > > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > uhidev0: iclass 3/1
> > > > > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > > > > wskbd1 at ukbd0 mux 1
> > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > wskbd1: connecting to wsdisplay0
> > > > > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > uhidev1: iclass 3/1, 1 report id
> > > > > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > > > > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> > > > >  mux 0
> > > > > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > > > > uhidev2: iclass 3/1, 5 report ids
> > > > > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > > > > wsmouse1 at ums1 mux 0
> > > > > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> > > > >
> > > > > My mouse works after connecting but my keyboard is completely dead. (KVM
> > > > > ist fine other devices work properly=) I would be happy if I could test
> > > > > a diff.
> > > >
> > > > Can you please send me an lsusb -v of your failing keyboard?
> > > >
> > >
> > > Bus 000 Device 001: ID 8086:0000 Intel Corp.
> > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > Bus 000 Device 003: ID 062a:4102 Creative Labs
> > > Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
> > > Bus 001 Device 001: ID 8086:0000 Intel Corp.
> > >
> > >
> > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > Device Descriptor:
> > >   bLength                18
> > >   bDescriptorType         1
> > >   bcdUSB               2.00
> > >   bDeviceClass            9 Hub
> > >   bDeviceSubClass         0 Unused
> > >   bDeviceProtocol         1 Single TT
> > >   bMaxPacketSize0        64
> > >   idVendor           0x1a40 Terminus Technology Inc.
> > >   idProduct          0x0101 4-Port HUB
> > >   bcdDevice            1.11
> > >   iManufacturer           0
> > >   iProduct                1 USB 2.0 Hub
> > >   iSerial                 0
> > >   bNumConfigurations      1
> > >   Configuration Descriptor:
> > >     bLength                 9
> > >     bDescriptorType         2
> > >     wTotalLength           25
> > >     bNumInterfaces          1
> > >     bConfigurationValue     1
> > >     iConfiguration          0
> > >     bmAttributes         0xe0
> > >       Self Powered
> > >       Remote Wakeup
> > >     MaxPower              100mA
> > >     Interface Descriptor:
> > >       bLength                 9
> > >       bDescriptorType         4
> > >       bInterfaceNumber        0
> > >       bAlternateSetting       0
> > >       bNumEndpoints           1
> > >       bInterfaceClass         9 Hub
> > >       bInterfaceSubClass      0 Unused
> > >       bInterfaceProtocol      0 Full speed (or root) hub
> > >       iInterface              0
> > >       Endpoint Descriptor:
> > >         bLength                 7
> > >         bDescriptorType         5
> > >         bEndpointAddress     0x81  EP 1 IN
> > >         bmAttributes            3
> > >           Transfer Type            Interrupt
> > >           Synch Type               None
> > >           Usage Type               Data
> > >         wMaxPacketSize     0x0001  1x 1 bytes
> > >         bInterval              12
> > > Hub Descriptor:
> > >   bLength               9
> > >   bDescriptorType      41
> > >   nNbrPorts             4
> > >   wHubCharacteristic 0x0000
> > >     Ganged power switching
> > >     Ganged overcurrent protection
> > >     TT think time 8 FS bits
> > >   bPwrOn2PwrGood       50 * 2 milli seconds
> > >   bHubContrCurrent    100 milli Ampere
> > >   DeviceRemovable    0x00
> > >   PortPwrCtrlMask    0xff
> > >  Hub Port Status:
> > >    Port 1: 0000.0103 power enable connect
> > >    Port 2: 0000.0103 power enable connect
> > >    Port 3: 0000.0100 power
> > >    Port 4: 0000.0100 power
> > > Device Qualifier (for other device speed):
> > >   bLength                10
> > >   bDescriptorType         6
> > >   bcdUSB               2.00
> > >   bDeviceClass            9 Hub
> > >   bDeviceSubClass         0 Unused
> > >   bDeviceProtocol         0 Full speed (or root) hub
> > >   bMaxPacketSize0        64
> > >   bNumConfigurations      1
> > > Device Status:     0x0001
> > >   Self Powered
> > >
> > > > Furthermore, does the keyboard initially work after boot, and only
> > > > fails after your KVM Switch restart, or does the keyboard fail
> > > > straight away after boot?
> > >
> > > Yes the keyboard initially work after a fresh boot and only fails after my
> > > KVM Switch restart. When it fails a reboot helps.
> >
> > Hmm, I can't see anything obvious.  Though it seems like your mouse
> > and keyboard are hidden between the KVM Switch.  When you attach
> > the mouse and keyboard directly to that machine, do you still get
> > the uhidev_clear_iface_eps() error?
>
> Also can you please run this debug diff and send me the results?
>
>
> Index: uhidev.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> retrieving revision 1.86
> diff -u -p -u -p -r1.86 uhidev.c
> --- uhidev.c 4 Feb 2021 16:18:34 -0000 1.86
> +++ uhidev.c 9 Feb 2021 12:56:45 -0000
> @@ -974,30 +974,38 @@ uhidev_clear_iface_eps(struct uhidev_sof
>   uint8_t xfertype;
>   int i;
>  
> + printf("%s: ENTER\n", __func__);
> +
>   /* Only clear interface endpoints when none are in use. */
> - if (sc->sc_ipipe || sc->sc_opipe)
> + if (sc->sc_ipipe || sc->sc_opipe) {
> + printf("%s: out0\n", __func__);
>   return;
> - DPRINTFN(1,("%s: clear interface eps\n", __func__));
> + }
>  
>   id = usbd_get_interface_descriptor(iface);
> - if (id == NULL)
> - goto bad;
> + if (id == NULL) {
> + printf("%s: out1\n", __func__);
> + return;
> + }
>  
>   for (i = 0; i < id->bNumEndpoints; i++) {
>   ed = usbd_interface2endpoint_descriptor(iface, i);
> - if (ed == NULL)
> - goto bad;
> + if (ed == NULL) {
> + printf("%s: out2\n", __func__);
> + return;
> + }
>  
>   xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
>   if (xfertype == UE_BULK || xfertype == UE_INTERRUPT) {
>   if (usbd_clear_endpoint_feature(sc->sc_udev,
> -    ed->bEndpointAddress, UF_ENDPOINT_HALT))
> - goto bad;
> +    ed->bEndpointAddress, UF_ENDPOINT_HALT)) {
> + printf("%s: clear EP failed on EP=0x%02x\n",
> +    __func__, ed->bEndpointAddress);
> + }
>   }
>   }
> - return;
> -bad:
> - printf("%s: clear endpoints failed!\n", __func__);
> +
> + printf("%s: EXIT\n", __func__);
>  }
>  
>  int

Sure, full dmesg after fresh boot:


OpenBSD 6.9-beta (CUSTOM) #0: Tue Feb  9 21:48:06 CET 2021
    [hidden email]:/sys/arch/amd64/compile/CUSTOM
real mem = 17023193088 (16234MB)
avail mem = 16492023808 (15728MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x8b1a8000 (89 entries)
bios0: vendor American Megatrends Inc. version "3801" date 03/14/2018
bios0: ASUSTeK COMPUTER INC. Z170-PRO
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT DBG2 MCFG SSDT FIDT SSDT SSDT HPET SSDT SSDT UEFI SSDT LPIT WSMT SSDT SSDT DBGP
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) SIO1(S3) PS2K(S4) PS2M(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4012.25 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
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 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 8 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 2 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus 1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
acpibtn1 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpipwrres20 at acpi0: WRST
acpipwrres21 at acpi0: WRST
acpipwrres22 at acpi0: WRST
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 4012 MHz: speeds: 4001, 4000, 3800, 3500, 3300, 3100, 2900, 2600, 2400, 2200, 1900, 1700, 1500, 1300, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
drm0 at inteldrm0
inteldrm0: msi, SKYLAKE, gen 9
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x31: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 100 Series MEI" rev 0x31 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x31: msi, AHCI 1.3.1
ahci0: port 0: 3.0Gb/s
ahci0: PHY offline on port 1
ahci0: port 2: 6.0Gb/s
ahci0: port 3: 3.0Gb/s
ahci0: port 4: 3.0Gb/s
ahci0: port 5: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50024e9001a9ac31
sd0: 953868MB, 512 bytes/sector, 1953523055 sectors
sd1 at scsibus1 targ 2 lun 0: <ATA, Samsung SSD 850, EMT0> naa.5002538d4166218d
sd1: 476940MB, 512 bytes/sector, 976773168 sectors, thin
sd2 at scsibus1 targ 3 lun 0: <ATA, WDC WD20EARS-00M, 51.0> naa.50014ee60085518a
sd2: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd3 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50000f000b036843
sd3: 953869MB, 512 bytes/sector, 1953525168 sectors
sd4 at scsibus1 targ 5 lun 0: <ATA, SAMSUNG HD753LJ, 1AA0> naa.50000f0000034276
sd4: 715403MB, 512 bytes/sector, 1465147055 sectors
ppb0 at pci0 dev 27 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci4 at ppb3 bus 4
ppb4 at pci3 dev 1 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci5 at ppb4 bus 5
ppb5 at pci3 dev 2 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci6 at ppb5 bus 6
xhci1 at pci6 dev 0 function 0 vendor "Intel", unknown product 0x15b6 rev 0x00: msi, xHCI 1.0
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
ppb6 at pci3 dev 4 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci7 at ppb6 bus 7
ppb7 at pci0 dev 29 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci8 at ppb7 bus 8
nvme0 at pci8 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msix, NVMe 1.3
nvme0: Samsung SSD 970 EVO Plus 1TB, firmware 2B2QEXM7, serial S4EWNMFN800087M
scsibus2 at nvme0: 2 targets, initiator 0
sd5 at scsibus2 targ 1 lun 0: <NVMe, Samsung SSD 970, 2B2Q>
sd5: 953869MB, 512 bytes/sector, 1953525168 sectors
pcib0 at pci0 dev 31 function 0 "Intel Z170 LPC" rev 0x31
"Intel 100 Series PMC" rev 0x31 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x31: msi
azalia0: codecs: Realtek ALC1150, Intel/0x2809, using Realtek ALC1150
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x31: apic 2 int 16
iic0 at ichiic0
admtemp0 at iic0 addr 0x18: Xeon
em0 at pci0 dev 31 function 6 "Intel I219-V" rev 0x31: msi, address 70:4d:7b:b2:b1:e7
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
uhidev0 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 3
uhidev0: iclass 3/1, 5 report ids
ums0 at uhidev0 reportid 3: 5 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev0 reportid 5: input=5, output=6, feature=0
uhidev1 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev2 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev2: iclass 3/1, 1 report id
ums1 at uhidev2 reportid 1: 3 buttons, Z dir
wsmouse1 at ums1 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd5a (18c223507fa8363e.a) swap on sd5b dump on sd5b
inteldrm0: 2560x1440, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x81
uhidev_clear_iface_eps: EXIT
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT


... KVM switch off and on again:

wsmouse0 detached
ums0 detached
uhid0 detached
uhidev0 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd0 detached
uhidev1 detached
wsmouse1 detached
ums1 detached
uhidev2 detached
uhub2 detached
uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x81
uhidev_clear_iface_eps: EXIT
wskbd1: connecting to wsdisplay0
uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
uhidev1: iclass 3/1, 1 report id
ums0 at uhidev1 reportid 1: 3 buttons, Z dir
wsmouse0 at ums0uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
 mux 0
uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
uhidev2: iclass 3/1, 5 report ids
ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
wsmouse1 at ums1uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
 mux 0
uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Tue, Feb 09, 2021 at 10:00:24PM +0100, Rafael Sadowski wrote:

> On Tue Feb 09, 2021 at 01:58:25PM +0100, Marcus Glocker wrote:
> > On Tue, Feb 09, 2021 at 08:28:05AM +0100, Marcus Glocker wrote:
> >
> > > On Mon, Feb 08, 2021 at 05:03:34PM +0100, Rafael Sadowski wrote:
> > >
> > > > On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:
> > > > > On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
> > > > >
> > > > > > Since a few days aka. snapshots I see the following error message after
> > > > > > boot:
> > > > > >
> > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > >
> > > > > > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > > > > > also support switching USB for keyboard and mouse between different
> > > > > > devices. When I switch it off and on again I see this:
> > > > > >
> > > > > > wsmouse0 detached
> > > > > > ums0 detached
> > > > > > uhid0 detached
> > > > > > uhidev0 detached
> > > > > > wskbd1: disconnecting from wsdisplay0
> > > > > > wskbd1 detached
> > > > > > ukbd0 detached
> > > > > > uhidev1 detached
> > > > > > wsmouse1 detached
> > > > > > ums1 detached
> > > > > > uhidev2 detached
> > > > > > uhub2 detached
> > > > > > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > > > > > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > > uhidev0: iclass 3/1
> > > > > > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > > > > > wskbd1 at ukbd0 mux 1
> > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > wskbd1: connecting to wsdisplay0
> > > > > > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > > uhidev1: iclass 3/1, 1 report id
> > > > > > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > > > > > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> > > > > >  mux 0
> > > > > > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > > > > > uhidev2: iclass 3/1, 5 report ids
> > > > > > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > > > > > wsmouse1 at ums1 mux 0
> > > > > > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> > > > > >
> > > > > > My mouse works after connecting but my keyboard is completely dead. (KVM
> > > > > > ist fine other devices work properly=) I would be happy if I could test
> > > > > > a diff.
> > > > >
> > > > > Can you please send me an lsusb -v of your failing keyboard?
> > > > >
> > > >
> > > > Bus 000 Device 001: ID 8086:0000 Intel Corp.
> > > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > > Bus 000 Device 003: ID 062a:4102 Creative Labs
> > > > Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
> > > > Bus 001 Device 001: ID 8086:0000 Intel Corp.
> > > >
> > > >
> > > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > > Device Descriptor:
> > > >   bLength                18
> > > >   bDescriptorType         1
> > > >   bcdUSB               2.00
> > > >   bDeviceClass            9 Hub
> > > >   bDeviceSubClass         0 Unused
> > > >   bDeviceProtocol         1 Single TT
> > > >   bMaxPacketSize0        64
> > > >   idVendor           0x1a40 Terminus Technology Inc.
> > > >   idProduct          0x0101 4-Port HUB
> > > >   bcdDevice            1.11
> > > >   iManufacturer           0
> > > >   iProduct                1 USB 2.0 Hub
> > > >   iSerial                 0
> > > >   bNumConfigurations      1
> > > >   Configuration Descriptor:
> > > >     bLength                 9
> > > >     bDescriptorType         2
> > > >     wTotalLength           25
> > > >     bNumInterfaces          1
> > > >     bConfigurationValue     1
> > > >     iConfiguration          0
> > > >     bmAttributes         0xe0
> > > >       Self Powered
> > > >       Remote Wakeup
> > > >     MaxPower              100mA
> > > >     Interface Descriptor:
> > > >       bLength                 9
> > > >       bDescriptorType         4
> > > >       bInterfaceNumber        0
> > > >       bAlternateSetting       0
> > > >       bNumEndpoints           1
> > > >       bInterfaceClass         9 Hub
> > > >       bInterfaceSubClass      0 Unused
> > > >       bInterfaceProtocol      0 Full speed (or root) hub
> > > >       iInterface              0
> > > >       Endpoint Descriptor:
> > > >         bLength                 7
> > > >         bDescriptorType         5
> > > >         bEndpointAddress     0x81  EP 1 IN
> > > >         bmAttributes            3
> > > >           Transfer Type            Interrupt
> > > >           Synch Type               None
> > > >           Usage Type               Data
> > > >         wMaxPacketSize     0x0001  1x 1 bytes
> > > >         bInterval              12
> > > > Hub Descriptor:
> > > >   bLength               9
> > > >   bDescriptorType      41
> > > >   nNbrPorts             4
> > > >   wHubCharacteristic 0x0000
> > > >     Ganged power switching
> > > >     Ganged overcurrent protection
> > > >     TT think time 8 FS bits
> > > >   bPwrOn2PwrGood       50 * 2 milli seconds
> > > >   bHubContrCurrent    100 milli Ampere
> > > >   DeviceRemovable    0x00
> > > >   PortPwrCtrlMask    0xff
> > > >  Hub Port Status:
> > > >    Port 1: 0000.0103 power enable connect
> > > >    Port 2: 0000.0103 power enable connect
> > > >    Port 3: 0000.0100 power
> > > >    Port 4: 0000.0100 power
> > > > Device Qualifier (for other device speed):
> > > >   bLength                10
> > > >   bDescriptorType         6
> > > >   bcdUSB               2.00
> > > >   bDeviceClass            9 Hub
> > > >   bDeviceSubClass         0 Unused
> > > >   bDeviceProtocol         0 Full speed (or root) hub
> > > >   bMaxPacketSize0        64
> > > >   bNumConfigurations      1
> > > > Device Status:     0x0001
> > > >   Self Powered
> > > >
> > > > > Furthermore, does the keyboard initially work after boot, and only
> > > > > fails after your KVM Switch restart, or does the keyboard fail
> > > > > straight away after boot?
> > > >
> > > > Yes the keyboard initially work after a fresh boot and only fails after my
> > > > KVM Switch restart. When it fails a reboot helps.
> > >
> > > Hmm, I can't see anything obvious.  Though it seems like your mouse
> > > and keyboard are hidden between the KVM Switch.  When you attach
> > > the mouse and keyboard directly to that machine, do you still get
> > > the uhidev_clear_iface_eps() error?
> >
> > Also can you please run this debug diff and send me the results?
> >
> >
> > Index: uhidev.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> > retrieving revision 1.86
> > diff -u -p -u -p -r1.86 uhidev.c
> > --- uhidev.c 4 Feb 2021 16:18:34 -0000 1.86
> > +++ uhidev.c 9 Feb 2021 12:56:45 -0000
> > @@ -974,30 +974,38 @@ uhidev_clear_iface_eps(struct uhidev_sof
> >   uint8_t xfertype;
> >   int i;
> >  
> > + printf("%s: ENTER\n", __func__);
> > +
> >   /* Only clear interface endpoints when none are in use. */
> > - if (sc->sc_ipipe || sc->sc_opipe)
> > + if (sc->sc_ipipe || sc->sc_opipe) {
> > + printf("%s: out0\n", __func__);
> >   return;
> > - DPRINTFN(1,("%s: clear interface eps\n", __func__));
> > + }
> >  
> >   id = usbd_get_interface_descriptor(iface);
> > - if (id == NULL)
> > - goto bad;
> > + if (id == NULL) {
> > + printf("%s: out1\n", __func__);
> > + return;
> > + }
> >  
> >   for (i = 0; i < id->bNumEndpoints; i++) {
> >   ed = usbd_interface2endpoint_descriptor(iface, i);
> > - if (ed == NULL)
> > - goto bad;
> > + if (ed == NULL) {
> > + printf("%s: out2\n", __func__);
> > + return;
> > + }
> >  
> >   xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
> >   if (xfertype == UE_BULK || xfertype == UE_INTERRUPT) {
> >   if (usbd_clear_endpoint_feature(sc->sc_udev,
> > -    ed->bEndpointAddress, UF_ENDPOINT_HALT))
> > - goto bad;
> > +    ed->bEndpointAddress, UF_ENDPOINT_HALT)) {
> > + printf("%s: clear EP failed on EP=0x%02x\n",
> > +    __func__, ed->bEndpointAddress);
> > + }
> >   }
> >   }
> > - return;
> > -bad:
> > - printf("%s: clear endpoints failed!\n", __func__);
> > +
> > + printf("%s: EXIT\n", __func__);
> >  }
> >  
> >  int
>
> Sure, full dmesg after fresh boot:

Thank you.  Can you please run the same while plugin the keyboard/mouse
directly to the host?  I would like to understand whether the issue is
caused by the switch or naively by your device.

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
On Wed Feb 10, 2021 at 04:18:03PM +0100, Marcus Glocker wrote:

> On Tue, Feb 09, 2021 at 10:00:24PM +0100, Rafael Sadowski wrote:
>
> > On Tue Feb 09, 2021 at 01:58:25PM +0100, Marcus Glocker wrote:
> > > On Tue, Feb 09, 2021 at 08:28:05AM +0100, Marcus Glocker wrote:
> > >
> > > > On Mon, Feb 08, 2021 at 05:03:34PM +0100, Rafael Sadowski wrote:
> > > >
> > > > > On Mon Feb 08, 2021 at 12:32:54PM +0100, Marcus Glocker wrote:
> > > > > > On Mon, Feb 08, 2021 at 07:20:21AM +0100, Rafael Sadowski wrote:
> > > > > >
> > > > > > > Since a few days aka. snapshots I see the following error message after
> > > > > > > boot:
> > > > > > >
> > > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > >
> > > > > > > I have a "TESmart 4 Port HDMI KVM Switch 4K@60Hz 4:4:4 Ultra HD" which
> > > > > > > also support switching USB for keyboard and mouse between different
> > > > > > > devices. When I switch it off and on again I see this:
> > > > > > >
> > > > > > > wsmouse0 detached
> > > > > > > ums0 detached
> > > > > > > uhid0 detached
> > > > > > > uhidev0 detached
> > > > > > > wskbd1: disconnecting from wsdisplay0
> > > > > > > wskbd1 detached
> > > > > > > ukbd0 detached
> > > > > > > uhidev1 detached
> > > > > > > wsmouse1 detached
> > > > > > > ums1 detached
> > > > > > > uhidev2 detached
> > > > > > > uhub2 detached
> > > > > > > uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
> > > > > > > uhidev0 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > > > uhidev0: iclass 3/1
> > > > > > > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > > > > > > wskbd1 at ukbd0 mux 1
> > > > > > > uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > > wskbd1: connecting to wsdisplay0
> > > > > > > uhidev1 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 3
> > > > > > > uhidev1: iclass 3/1, 1 report id
> > > > > > > ums0 at uhidev1 reportid 1: 3 buttons, Z dir
> > > > > > > wsmouse0 at ums0uhidev_clear_iface_eps: clear endpoints failed!
> > > > > > >  mux 0
> > > > > > > uhidev2 at uhub2 port 1 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 4
> > > > > > > uhidev2: iclass 3/1, 5 report ids
> > > > > > > ums1 at uhidev2 reportid 3: 5 buttons, Z and W dir
> > > > > > > wsmouse1 at ums1 mux 0
> > > > > > > uhid0 at uhidev2 reportid 5: input=5, output=6, feature=0
> > > > > > >
> > > > > > > My mouse works after connecting but my keyboard is completely dead. (KVM
> > > > > > > ist fine other devices work properly=) I would be happy if I could test
> > > > > > > a diff.
> > > > > >
> > > > > > Can you please send me an lsusb -v of your failing keyboard?
> > > > > >
> > > > >
> > > > > Bus 000 Device 001: ID 8086:0000 Intel Corp.
> > > > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > > > Bus 000 Device 003: ID 062a:4102 Creative Labs
> > > > > Bus 000 Device 004: ID 0c45:7403 Microdia Foot Switch
> > > > > Bus 001 Device 001: ID 8086:0000 Intel Corp.
> > > > >
> > > > >
> > > > > Bus 000 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
> > > > > Device Descriptor:
> > > > >   bLength                18
> > > > >   bDescriptorType         1
> > > > >   bcdUSB               2.00
> > > > >   bDeviceClass            9 Hub
> > > > >   bDeviceSubClass         0 Unused
> > > > >   bDeviceProtocol         1 Single TT
> > > > >   bMaxPacketSize0        64
> > > > >   idVendor           0x1a40 Terminus Technology Inc.
> > > > >   idProduct          0x0101 4-Port HUB
> > > > >   bcdDevice            1.11
> > > > >   iManufacturer           0
> > > > >   iProduct                1 USB 2.0 Hub
> > > > >   iSerial                 0
> > > > >   bNumConfigurations      1
> > > > >   Configuration Descriptor:
> > > > >     bLength                 9
> > > > >     bDescriptorType         2
> > > > >     wTotalLength           25
> > > > >     bNumInterfaces          1
> > > > >     bConfigurationValue     1
> > > > >     iConfiguration          0
> > > > >     bmAttributes         0xe0
> > > > >       Self Powered
> > > > >       Remote Wakeup
> > > > >     MaxPower              100mA
> > > > >     Interface Descriptor:
> > > > >       bLength                 9
> > > > >       bDescriptorType         4
> > > > >       bInterfaceNumber        0
> > > > >       bAlternateSetting       0
> > > > >       bNumEndpoints           1
> > > > >       bInterfaceClass         9 Hub
> > > > >       bInterfaceSubClass      0 Unused
> > > > >       bInterfaceProtocol      0 Full speed (or root) hub
> > > > >       iInterface              0
> > > > >       Endpoint Descriptor:
> > > > >         bLength                 7
> > > > >         bDescriptorType         5
> > > > >         bEndpointAddress     0x81  EP 1 IN
> > > > >         bmAttributes            3
> > > > >           Transfer Type            Interrupt
> > > > >           Synch Type               None
> > > > >           Usage Type               Data
> > > > >         wMaxPacketSize     0x0001  1x 1 bytes
> > > > >         bInterval              12
> > > > > Hub Descriptor:
> > > > >   bLength               9
> > > > >   bDescriptorType      41
> > > > >   nNbrPorts             4
> > > > >   wHubCharacteristic 0x0000
> > > > >     Ganged power switching
> > > > >     Ganged overcurrent protection
> > > > >     TT think time 8 FS bits
> > > > >   bPwrOn2PwrGood       50 * 2 milli seconds
> > > > >   bHubContrCurrent    100 milli Ampere
> > > > >   DeviceRemovable    0x00
> > > > >   PortPwrCtrlMask    0xff
> > > > >  Hub Port Status:
> > > > >    Port 1: 0000.0103 power enable connect
> > > > >    Port 2: 0000.0103 power enable connect
> > > > >    Port 3: 0000.0100 power
> > > > >    Port 4: 0000.0100 power
> > > > > Device Qualifier (for other device speed):
> > > > >   bLength                10
> > > > >   bDescriptorType         6
> > > > >   bcdUSB               2.00
> > > > >   bDeviceClass            9 Hub
> > > > >   bDeviceSubClass         0 Unused
> > > > >   bDeviceProtocol         0 Full speed (or root) hub
> > > > >   bMaxPacketSize0        64
> > > > >   bNumConfigurations      1
> > > > > Device Status:     0x0001
> > > > >   Self Powered
> > > > >
> > > > > > Furthermore, does the keyboard initially work after boot, and only
> > > > > > fails after your KVM Switch restart, or does the keyboard fail
> > > > > > straight away after boot?
> > > > >
> > > > > Yes the keyboard initially work after a fresh boot and only fails after my
> > > > > KVM Switch restart. When it fails a reboot helps.
> > > >
> > > > Hmm, I can't see anything obvious.  Though it seems like your mouse
> > > > and keyboard are hidden between the KVM Switch.  When you attach
> > > > the mouse and keyboard directly to that machine, do you still get
> > > > the uhidev_clear_iface_eps() error?
> > >
> > > Also can you please run this debug diff and send me the results?
> > >
> > >
> > > Index: uhidev.c
> > > ===================================================================
> > > RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> > > retrieving revision 1.86
> > > diff -u -p -u -p -r1.86 uhidev.c
> > > --- uhidev.c 4 Feb 2021 16:18:34 -0000 1.86
> > > +++ uhidev.c 9 Feb 2021 12:56:45 -0000
> > > @@ -974,30 +974,38 @@ uhidev_clear_iface_eps(struct uhidev_sof
> > >   uint8_t xfertype;
> > >   int i;
> > >  
> > > + printf("%s: ENTER\n", __func__);
> > > +
> > >   /* Only clear interface endpoints when none are in use. */
> > > - if (sc->sc_ipipe || sc->sc_opipe)
> > > + if (sc->sc_ipipe || sc->sc_opipe) {
> > > + printf("%s: out0\n", __func__);
> > >   return;
> > > - DPRINTFN(1,("%s: clear interface eps\n", __func__));
> > > + }
> > >  
> > >   id = usbd_get_interface_descriptor(iface);
> > > - if (id == NULL)
> > > - goto bad;
> > > + if (id == NULL) {
> > > + printf("%s: out1\n", __func__);
> > > + return;
> > > + }
> > >  
> > >   for (i = 0; i < id->bNumEndpoints; i++) {
> > >   ed = usbd_interface2endpoint_descriptor(iface, i);
> > > - if (ed == NULL)
> > > - goto bad;
> > > + if (ed == NULL) {
> > > + printf("%s: out2\n", __func__);
> > > + return;
> > > + }
> > >  
> > >   xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
> > >   if (xfertype == UE_BULK || xfertype == UE_INTERRUPT) {
> > >   if (usbd_clear_endpoint_feature(sc->sc_udev,
> > > -    ed->bEndpointAddress, UF_ENDPOINT_HALT))
> > > - goto bad;
> > > +    ed->bEndpointAddress, UF_ENDPOINT_HALT)) {
> > > + printf("%s: clear EP failed on EP=0x%02x\n",
> > > +    __func__, ed->bEndpointAddress);
> > > + }
> > >   }
> > >   }
> > > - return;
> > > -bad:
> > > - printf("%s: clear endpoints failed!\n", __func__);
> > > +
> > > + printf("%s: EXIT\n", __func__);
> > >  }
> > >  
> > >  int
> >
> > Sure, full dmesg after fresh boot:
>
> Thank you.  Can you please run the same while plugin the keyboard/mouse
> directly to the host?  I would like to understand whether the issue is
> caused by the switch or naively by your device.
>

Here it is:

OpenBSD 6.9-beta (CUSTOM) #0: Tue Feb  9 21:48:06 CET 2021
    [hidden email]:/sys/arch/amd64/compile/CUSTOM
real mem = 17023193088 (16234MB)
avail mem = 16492015616 (15728MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x8b1a8000 (89 entries)
bios0: vendor American Megatrends Inc. version "3801" date 03/14/2018
bios0: ASUSTeK COMPUTER INC. Z170-PRO
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT DBG2 MCFG SSDT FIDT SSDT SSDT HPET SSDT SSDT UEFI SSDT LPIT WSMT SSDT SSDT DBGP
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) SIO1(S3) PS2K(S4) PS2M(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4012.32 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
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 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 8 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 2 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus 1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
acpibtn1 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpipwrres20 at acpi0: WRST
acpipwrres21 at acpi0: WRST
acpipwrres22 at acpi0: WRST
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 4012 MHz: speeds: 4001, 4000, 3800, 3500, 3300, 3100, 2900, 2600, 2400, 2200, 1900, 1700, 1500, 1300, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
drm0 at inteldrm0
inteldrm0: msi, SKYLAKE, gen 9
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x31: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 100 Series MEI" rev 0x31 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x31: msi, AHCI 1.3.1
ahci0: port 0: 3.0Gb/s
ahci0: PHY offline on port 1
ahci0: port 2: 6.0Gb/s
ahci0: port 3: 3.0Gb/s
ahci0: port 4: 3.0Gb/s
ahci0: port 5: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50024e9001a9ac31
sd0: 953868MB, 512 bytes/sector, 1953523055 sectors
sd1 at scsibus1 targ 2 lun 0: <ATA, Samsung SSD 850, EMT0> naa.5002538d4166218d
sd1: 476940MB, 512 bytes/sector, 976773168 sectors, thin
sd2 at scsibus1 targ 3 lun 0: <ATA, WDC WD20EARS-00M, 51.0> naa.50014ee60085518a
sd2: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd3 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50000f000b036843
sd3: 953869MB, 512 bytes/sector, 1953525168 sectors
sd4 at scsibus1 targ 5 lun 0: <ATA, SAMSUNG HD753LJ, 1AA0> naa.50000f0000034276
sd4: 715403MB, 512 bytes/sector, 1465147055 sectors
ppb0 at pci0 dev 27 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci4 at ppb3 bus 4
ppb4 at pci3 dev 1 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci5 at ppb4 bus 5
ppb5 at pci3 dev 2 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci6 at ppb5 bus 6
xhci1 at pci6 dev 0 function 0 vendor "Intel", unknown product 0x15b6 rev 0x00: msi, xHCI 1.0
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
ppb6 at pci3 dev 4 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci7 at ppb6 bus 7
ppb7 at pci0 dev 29 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci8 at ppb7 bus 8
nvme0 at pci8 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msix, NVMe 1.3
nvme0: Samsung SSD 970 EVO Plus 1TB, firmware 2B2QEXM7, serial S4EWNMFN800087M
scsibus2 at nvme0: 2 targets, initiator 0
sd5 at scsibus2 targ 1 lun 0: <NVMe, Samsung SSD 970, 2B2Q>
sd5: 953869MB, 512 bytes/sector, 1953525168 sectors
pcib0 at pci0 dev 31 function 0 "Intel Z170 LPC" rev 0x31
"Intel 100 Series PMC" rev 0x31 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x31: msi
azalia0: codecs: Realtek ALC1150, Intel/0x2809, using Realtek ALC1150
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x31: apic 2 int 16
iic0 at ichiic0
admtemp0 at iic0 addr 0x18: Xeon
em0 at pci0 dev 31 function 6 "Intel I219-V" rev 0x31: msi, address 70:4d:7b:b2:b1:e7
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uhidev0 at uhub0 port 5 configuration 1 interface 0 "ZSA Technology Labs Inc ErgoDox EZ Shine" rev 1.10/0.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub0 port 5 configuration 1 interface 1 "ZSA Technology Labs Inc ErgoDox EZ Shine" rev 1.10/0.01 addr 2
uhidev1: iclass 3/0, 5 report ids
uhid0 at uhidev1 reportid 3: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=2, output=0, feature=0
ukbd1 at uhidev1 reportid 5: 128 variable keys, 0 key codes
wskbd2 at ukbd1 mux 1
uhub2 at uhub0 port 6 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 3
uhidev2 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev2: iclass 3/1
ukbd2 at uhidev2: 8 variable keys, 6 key codes
wskbd3 at ukbd2 mux 1
uhidev3 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 4
uhidev3: iclass 3/1, 1 report id
ums0 at uhidev3 reportid 1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev4 at uhub0 port 9 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 5
uhidev4: iclass 3/1, 5 report ids
ums1 at uhidev4 reportid 3: 5 buttons, Z and W dir
wsmouse1 at ums1 mux 0
uhid2 at uhidev4 reportid 5: input=5, output=6, feature=0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd5a (18c223507fa8363e.a) swap on sd5b dump on sd5b
inteldrm0: 2560x1440, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
wskbd1: connecting to wsdisplay0
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
wskbd2: connecting to wsdisplay0
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x81
uhidev_clear_iface_eps: EXIT
wskbd3: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: clear EP failed on EP=0x82
uhidev_clear_iface_eps: EXIT
uhidev_clear_iface_eps: ENTER
uhidev_clear_iface_eps: EXIT

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Thu, Feb 11, 2021 at 07:15:57AM +0100, Rafael Sadowski wrote:

[...]
> > Thank you.  Can you please run the same while plugin the keyboard/mouse
> > directly to the host?  I would like to understand whether the issue is
> > caused by the switch or naively by your device.
> >
>
> Here it is:

OK, so it's the same basically.  I currently really have no idea why
the UR_CLEAR_FEATURE for EPs is working on the most of the devices,
but fail for some.  Therefore, if you back it out from uhidev(4), does
the keyboard survive your switch restart again?


Index: uhidev.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
retrieving revision 1.88
diff -u -p -u -p -r1.88 uhidev.c
--- uhidev.c 11 Feb 2021 06:55:10 -0000 1.88
+++ uhidev.c 11 Feb 2021 15:20:37 -0000
@@ -518,9 +518,6 @@ uhidev_open(struct uhidev *scd)
  DPRINTF(("uhidev_open: isize=%d, ep=0x%02x\n", sc->sc_isize,
     sc->sc_iep_addr));
 
- /* Clear device endpoint toggle. */
- uhidev_clear_iface_eps(sc, sc->sc_iface);
-
  err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_iep_addr,
   USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_ibuf,
   sc->sc_isize, uhidev_intr, USBD_DEFAULT_INTERVAL);
@@ -530,8 +527,6 @@ uhidev_open(struct uhidev *scd)
  error = EIO;
  goto out1;
  }
- /* Clear HC endpoint toggle. */
- usbd_clear_endpoint_toggle(sc->sc_ipipe);
 
  DPRINTF(("uhidev_open: sc->sc_ipipe=%p\n", sc->sc_ipipe));
 
@@ -557,8 +552,6 @@ uhidev_open(struct uhidev *scd)
  error = EIO;
  goto out2;
  }
- /* Clear HC endpoint toggle. */
- usbd_clear_endpoint_toggle(sc->sc_opipe);
 
  DPRINTF(("uhidev_open: sc->sc_opipe=%p\n", sc->sc_opipe));
 

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
On Thu Feb 11, 2021 at 04:24:25PM +0100, Marcus Glocker wrote:

> On Thu, Feb 11, 2021 at 07:15:57AM +0100, Rafael Sadowski wrote:
>
> [...]
> > > Thank you.  Can you please run the same while plugin the keyboard/mouse
> > > directly to the host?  I would like to understand whether the issue is
> > > caused by the switch or naively by your device.
> > >
> >
> > Here it is:
>
> OK, so it's the same basically.  I currently really have no idea why
> the UR_CLEAR_FEATURE for EPs is working on the most of the devices,
> but fail for some.  Therefore, if you back it out from uhidev(4), does
> the keyboard survive your switch restart again?
>
>
> Index: uhidev.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> retrieving revision 1.88
> diff -u -p -u -p -r1.88 uhidev.c
> --- uhidev.c 11 Feb 2021 06:55:10 -0000 1.88
> +++ uhidev.c 11 Feb 2021 15:20:37 -0000
> @@ -518,9 +518,6 @@ uhidev_open(struct uhidev *scd)
>   DPRINTF(("uhidev_open: isize=%d, ep=0x%02x\n", sc->sc_isize,
>      sc->sc_iep_addr));
>  
> - /* Clear device endpoint toggle. */
> - uhidev_clear_iface_eps(sc, sc->sc_iface);
> -
>   err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_iep_addr,
>    USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_ibuf,
>    sc->sc_isize, uhidev_intr, USBD_DEFAULT_INTERVAL);
> @@ -530,8 +527,6 @@ uhidev_open(struct uhidev *scd)
>   error = EIO;
>   goto out1;
>   }
> - /* Clear HC endpoint toggle. */
> - usbd_clear_endpoint_toggle(sc->sc_ipipe);
>  
>   DPRINTF(("uhidev_open: sc->sc_ipipe=%p\n", sc->sc_ipipe));
>  
> @@ -557,8 +552,6 @@ uhidev_open(struct uhidev *scd)
>   error = EIO;
>   goto out2;
>   }
> - /* Clear HC endpoint toggle. */
> - usbd_clear_endpoint_toggle(sc->sc_opipe);
>  
>   DPRINTF(("uhidev_open: sc->sc_opipe=%p\n", sc->sc_opipe));
>  
>

I worked out this issue with a USB-Hub between the KVM-Switch and the
devices (webcam, keyboard and mouse). dmesg (without the diff above):

OpenBSD 6.9-beta (GENERIC.MP) #331: Thu Feb 11 20:28:45 MST 2021
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17023193088 (16234MB)
avail mem = 16491921408 (15727MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x8b1a8000 (89 entries)
bios0: vendor American Megatrends Inc. version "3801" date 03/14/2018
bios0: ASUSTeK COMPUTER INC. Z170-PRO
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT DBG2 MCFG SSDT FIDT SSDT SSDT HPET SSDT SSDT UEFI SSDT LPIT WSMT SSDT SSDT DBGP
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) SIO1(S3) PS2K(S4) PS2M(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4012.26 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
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 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.77 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.77 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4010.77 MHz, 06-5e-03
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 8 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 2 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus 1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
acpibtn1 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
acpicpu2 at acpi0: C1(@1 halt!), PSS
acpicpu3 at acpi0: C1(@1 halt!), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpipwrres20 at acpi0: WRST
acpipwrres21 at acpi0: WRST
acpipwrres22 at acpi0: WRST
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 4012 MHz: speeds: 4001, 4000, 3800, 3500, 3300, 3100, 2900, 2600, 2400, 2200, 1900, 1700, 1500, 1300, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
drm0 at inteldrm0
inteldrm0: msi, SKYLAKE, gen 9
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x31: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 100 Series MEI" rev 0x31 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x31: msi, AHCI 1.3.1
ahci0: port 0: 3.0Gb/s
ahci0: PHY offline on port 1
ahci0: port 2: 6.0Gb/s
ahci0: port 3: 3.0Gb/s
ahci0: port 4: 3.0Gb/s
ahci0: port 5: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50024e9001a9ac31
sd0: 953868MB, 512 bytes/sector, 1953523055 sectors
sd1 at scsibus1 targ 2 lun 0: <ATA, Samsung SSD 850, EMT0> naa.5002538d4166218d
sd1: 476940MB, 512 bytes/sector, 976773168 sectors, thin
sd2 at scsibus1 targ 3 lun 0: <ATA, WDC WD20EARS-00M, 51.0> naa.50014ee60085518a
sd2: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd3 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> naa.50000f000b036843
sd3: 953869MB, 512 bytes/sector, 1953525168 sectors
sd4 at scsibus1 targ 5 lun 0: <ATA, SAMSUNG HD753LJ, 1AA0> naa.50000f0000034276
sd4: 715403MB, 512 bytes/sector, 1465147055 sectors
ppb0 at pci0 dev 27 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci4 at ppb3 bus 4
ppb4 at pci3 dev 1 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci5 at ppb4 bus 5
ppb5 at pci3 dev 2 function 0 vendor "Intel", unknown product 0x1578 rev 0x00
pci6 at ppb5 bus 6
xhci1 at pci6 dev 0 function 0 vendor "Intel", unknown product 0x15b6 rev 0x00: msi, xHCI 1.0
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
ppb6 at pci3 dev 4 function 0 vendor "Intel", unknown product 0x1578 rev 0x00: msi
pci7 at ppb6 bus 7
ppb7 at pci0 dev 29 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci8 at ppb7 bus 8
nvme0 at pci8 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msix, NVMe 1.3
nvme0: Samsung SSD 970 EVO Plus 1TB, firmware 2B2QEXM7, serial S4EWNMFN800087M
scsibus2 at nvme0: 2 targets, initiator 0
sd5 at scsibus2 targ 1 lun 0: <NVMe, Samsung SSD 970, 2B2Q>
sd5: 953869MB, 512 bytes/sector, 1953525168 sectors
pcib0 at pci0 dev 31 function 0 "Intel Z170 LPC" rev 0x31
"Intel 100 Series PMC" rev 0x31 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x31: msi
azalia0: codecs: Realtek ALC1150, Intel/0x2809, using Realtek ALC1150
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x31: apic 2 int 16
iic0 at ichiic0
admtemp0 at iic0 addr 0x18: Xeon
em0 at pci0 dev 31 function 6 "Intel I219-V" rev 0x31: msi, address 70:4d:7b:b2:b1:e7
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uhub2 at uhub1 port 2 configuration 1 interface 0 "Terminus Technology USB 2.0 Hub" rev 2.00/1.11 addr 2
uhub3 at uhub2 port 1 configuration 1 interface 0 "VIA Labs USB 2.0 HUB
" rev 2.00/85.70 addr 3
uhidev0 at uhub3 port 1 configuration 1 interface 0 "ZSA Technology Labs Inc ErgoDox EZ Shine" rev 1.10/0.01 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub3 port 1 configuration 1 interface 1 "ZSA Technology Labs Inc ErgoDox EZ Shine" rev 1.10/0.01 addr 4
uhidev1: iclass 3/0, 5 report ids
uhid0 at uhidev1 reportid 3: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=2, output=0, feature=0
ukbd1 at uhidev1 reportid 5: 128 variable keys, 0 key codes
wskbd2 at ukbd1 mux 1
uvideo0 at uhub3 port 2 configuration 1 interface 0 "Logitech Logitech StreamCam" rev 2.10/0.17 addr 5
video0 at uvideo0
uaudio0 at uhub3 port 2 configuration 1 interface 3 "Logitech Logitech StreamCam" rev 2.10/0.17 addr 5
uaudio0: class v1, high-speed, sync, channels: 0 play, 2 rec, 2 ctls
audio1 at uaudio0
uhidev2 at uhub3 port 2 configuration 1 interface 5 "Logitech Logitech StreamCam" rev 2.10/0.17 addr 5
uhidev2: iclass 3/0, 5 report ids
uhid2 at uhidev2 reportid 1: input=1, output=0, feature=0
uhid3 at uhidev2 reportid 2: input=1, output=0, feature=0
uhid4 at uhidev2 reportid 3: input=1, output=0, feature=0
uhid5 at uhidev2 reportid 4: input=1, output=0, feature=0
uhid6 at uhidev2 reportid 5: input=1, output=0, feature=0
ugen0 at uhub3 port 2 configuration 1 "Logitech Logitech StreamCam" rev 2.10/0.17 addr 5
uhidev3 at uhub3 port 3 configuration 1 interface 0 "MOSART Semi. 2.4G Wireless Mouse" rev 1.10/81.13 addr 6
uhidev3: iclass 3/1, 5 report ids
ums0 at uhidev3 reportid 3: 5 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhid7 at uhidev3 reportid 5: input=5, output=6, feature=0
uhidev4 at uhub2 port 2 configuration 1 interface 0 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 7
uhidev4: iclass 3/1
ukbd2 at uhidev4: 8 variable keys, 6 key codes
wskbd3 at ukbd2 mux 1
uhidev5 at uhub2 port 2 configuration 1 interface 1 "??\^D??\^A?????????\^A????\^A?6??\^E?? " rev 2.00/0.01 addr 7
uhidev5: iclass 3/1, 1 report id
ums1 at uhidev5 reportid 1: 3 buttons, Z dir
wsmouse1 at ums1 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd5a (18c223507fa8363e.a) swap on sd5b dump on sd5b
inteldrm0: 2560x1440, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
uhidev_clear_iface_eps: clear endpoints failed!
wskbd3: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!
uhidev_clear_iface_eps: clear endpoints failed!

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Marcus Glocker
On Fri, Feb 12, 2021 at 05:59:07PM +0100, Rafael Sadowski wrote:

> On Thu Feb 11, 2021 at 04:24:25PM +0100, Marcus Glocker wrote:
> > On Thu, Feb 11, 2021 at 07:15:57AM +0100, Rafael Sadowski wrote:
> >
> > [...]
> > > > Thank you.  Can you please run the same while plugin the keyboard/mouse
> > > > directly to the host?  I would like to understand whether the issue is
> > > > caused by the switch or naively by your device.
> > > >
> > >
> > > Here it is:
> >
> > OK, so it's the same basically.  I currently really have no idea why
> > the UR_CLEAR_FEATURE for EPs is working on the most of the devices,
> > but fail for some.  Therefore, if you back it out from uhidev(4), does
> > the keyboard survive your switch restart again?
> >
> >
> > Index: uhidev.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> > retrieving revision 1.88
> > diff -u -p -u -p -r1.88 uhidev.c
> > --- uhidev.c 11 Feb 2021 06:55:10 -0000 1.88
> > +++ uhidev.c 11 Feb 2021 15:20:37 -0000
> > @@ -518,9 +518,6 @@ uhidev_open(struct uhidev *scd)
> >   DPRINTF(("uhidev_open: isize=%d, ep=0x%02x\n", sc->sc_isize,
> >      sc->sc_iep_addr));
> >  
> > - /* Clear device endpoint toggle. */
> > - uhidev_clear_iface_eps(sc, sc->sc_iface);
> > -
> >   err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_iep_addr,
> >    USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_ibuf,
> >    sc->sc_isize, uhidev_intr, USBD_DEFAULT_INTERVAL);
> > @@ -530,8 +527,6 @@ uhidev_open(struct uhidev *scd)
> >   error = EIO;
> >   goto out1;
> >   }
> > - /* Clear HC endpoint toggle. */
> > - usbd_clear_endpoint_toggle(sc->sc_ipipe);
> >  
> >   DPRINTF(("uhidev_open: sc->sc_ipipe=%p\n", sc->sc_ipipe));
> >  
> > @@ -557,8 +552,6 @@ uhidev_open(struct uhidev *scd)
> >   error = EIO;
> >   goto out2;
> >   }
> > - /* Clear HC endpoint toggle. */
> > - usbd_clear_endpoint_toggle(sc->sc_opipe);
> >  
> >   DPRINTF(("uhidev_open: sc->sc_opipe=%p\n", sc->sc_opipe));
> >  
> >
>
> I worked out this issue with a USB-Hub between the KVM-Switch and the
> devices (webcam, keyboard and mouse). dmesg (without the diff above):

You lost me :-)

You're saying that you have plugged an USB hub between the KVM switch
and your devices, and now you don't face the issue anymore, meaning you
can reset the switch and all of the devices attach back fine?

Reply | Threaded
Open this post in threaded view
|

Re: uhidev_clear_iface_eps: clear endpoints failed!

Rafael Sadowski
On Sat Feb 13, 2021 at 11:00:07AM +0100, Marcus Glocker wrote:

> On Fri, Feb 12, 2021 at 05:59:07PM +0100, Rafael Sadowski wrote:
> >
> > I worked out this issue with a USB-Hub between the KVM-Switch and the
> > devices (webcam, keyboard and mouse). dmesg (without the diff above):
>
> You lost me :-)
>
> You're saying that you have plugged an USB hub between the KVM switch
> and your devices, and now you don't face the issue anymore, meaning you
> can reset the switch and all of the devices attach back fine?
>

Correct.