Date: Mon, 29 Aug 2016 15:38:51 +0100 From: Miguel C <miguelmclara@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: Oleg Nauman <oleg.nauman@gmail.com>, "freebsd-multimedia@freebsd.org" <freebsd-multimedia@freebsd.org> Subject: Re: [CFT] New version of webcamd, now v4.8.0.2 Message-ID: <CADGo8CXr7eEgyPGQtG1m0oFr6mY2TXgeoX9iFCnTCZ33yxB5Yg@mail.gmail.com> In-Reply-To: <a6767e23-a8fa-e6f3-6575-049b308f7916@selasky.org> References: <d2b588e6-33b3-9523-1551-a1d9deabdf8c@selasky.org> <CAC5YPTuYnx=_riiW6uiVGzKbcK-kLsb81bX1u4JUc8CCz%2BAoXg@mail.gmail.com> <CADGo8CUKUA3GR_Y5yjx9x5z6jd-3HZTBXjV9xyKF%2BAmPrrs0Hw@mail.gmail.com> <050b048b-b73d-0823-885a-e8ab88f070e8@selasky.org> <CADGo8CX_kw_Cofhe4nh%2B-a4kq-h_CHvvHboJPWTPgcFxkmN0ew@mail.gmail.com> <cc2351e2-c171-4b35-0284-5ef21bbeee85@selasky.org> <CADGo8CUx9yMNPZ0mCk-GzdpvsWESgiy_mKaXQBC=K93xtd_qNQ@mail.gmail.com> <a6767e23-a8fa-e6f3-6575-049b308f7916@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 29, 2016 at 8:15 AM, Hans Petter Selasky <hps@selasky.org> wrote: > Hi, > > > On 08/29/16 01:53, Miguel C wrote: > >> On Sun, Aug 28, 2016 at 7:21 PM, Hans Petter Selasky <hps@selasky.org> >> wrote: >> >> On 08/28/16 16:02, Miguel C wrote: >>> >>> On Sun, Aug 28, 2016 at 12:53 PM, Hans Petter Selasky <hps@selasky.org> >>>> wrote: >>>> >>>> >>>> Hi, >>> >>> The descriptors you sent look OK. >>> >>> Can you run webcamd from gdb and trace all the parameters and code path >>> taken inside the function named usb_setup_endpoint which triggers after >>> you >>> run pwcview ? >>> >>> gdb >>> file webcamd >>> run -d ugenX.Y >>> CTRL+C >>> break usb_setup_endpoint >>> continue >>> next >>> next >>> next >>> .... >>> >>> >>> Let's skip Freebsd-current and freebsd-x11 in the CC'ing of this thread >>> to >>> reduce the amount of cross-posting? Or which list do you prefer? >>> >> >> >> Sure multimedia@ seems fine >> >> >> Lets see if I got this right (let me know if its best to upload this... >> just feel like its important to keep the "text" in the archive for future >> reference: >> >> >> gdb) continue >> >> Continuing. >> >> Creating /dev/video0 >> >> [New Thread 802017400 (LWP 100268/webcamd)] >> >> [New Thread 802019200 (LWP 100303/webcamd)] >> >> [Switching to Thread 802019200 (LWP 100303/webcamd)] >> >> >> Breakpoint 1, usb_setup_endpoint (dev=0x802076000, uhe=0x8020764a0, >> bufsize=16) >> >> at kernel/linux_usb.c:923 >> >> 923 uint8_t type = uhe->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; >> >> (gdb) next >> >> 924 uint8_t addr = uhe->desc.bEndpointAddress; >> >> (gdb) next >> >> 925 uint8_t ep_index = ((addr / 0x40) | (addr * 4)) % (16 * 4); >> >> (gdb) next >> >> 928 if (uhe->bsd_xfer[0] || >> >> (gdb) next >> >> 931 return (0); >> >> (gdb) next >> >> 1030 } >> >> (gdb) next >> >> usb_submit_urb (urb=0x802092070, mem_flags=0) at kernel/linux_usb.c:613 >> >> 613 err = usb_setup_endpoint(urb->dev, uhe, >> >> (gdb) next >> >> 615 if (err) { >> >> (gdb) next >> >> 624 if (uhe->bsd_xfer[0] || >> >> (gdb) next >> >> 629 if (urb->bsd_urb_list.tqe_prev == NULL) { >> >> (gdb) next >> >> 630 TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list); >> >> (gdb) next >> >> 631 urb->status = -EINPROGRESS; >> > > This submit looks successful. Just enter "continue" after you see > "-EINPROGRESS". I need to figure out the failing case. > > Also do: > > print *uhe > > once while you are in this function. > > It might also be you can enter a breakpoint on the line number for "return > -EPIPE" in urb_submit() via GDB and catch that. How would I do that? something like "break linux_usb.c:613" btw I always kill webcamd, but even if not it seems smart enough to detect if other instances are running :) ie: "Webcamd is already running for ugen0.4.0"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADGo8CXr7eEgyPGQtG1m0oFr6mY2TXgeoX9iFCnTCZ33yxB5Yg>