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 via email to