Date: Mon, 6 Mar 2017 12:14:12 +0100 From: Markus Rechberger <mrechberger@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: freebsd-multimedia@freebsd.org Subject: Re: What is wrong with FreeBSD and USB Support Message-ID: <CA%2BO4pCL_g=0%2BpbpwFts294qhGw0jsG3HN1vqUNvcpgGUgaMCaA@mail.gmail.com> In-Reply-To: <9d940886-5021-7208-fc19-477dcd573c7a@selasky.org> References: <CA%2BO4pCK4%2B1rE5ft4Boy_3xPdCxK31UtTQ2BYpnBUn5jxZr%2Bz_g@mail.gmail.com> <CA%2BO4pCJr5Bq-sgjzvZQB-mFRT6x7Tp3psga6f__V9Ag-=v-mhw@mail.gmail.com> <CA%2BO4pC%2Bf5xzOjENKSJu_sQeaiN3XL3WiTcRQvm4vVweQ71Xtrg@mail.gmail.com> <CA%2BO4pC%2B1t67ODF7bkyVhcojXTLnFkS28RbFAc%2Be-tjNncogMAQ@mail.gmail.com> <CA%2BO4pCLRJRFG8Sv6C=FK6myBDPdUfhNjZ88P=e1uuH2=ojB75w@mail.gmail.com> <1aff0983-deb6-2884-472c-bb1e1037275c@selasky.org> <CA%2BO4pCLLSgdFOpJvnrD_F5Zh1aOGQexjiKKSiPbpcsKWs8wgUQ@mail.gmail.com> <9d940886-5021-7208-fc19-477dcd573c7a@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 6, 2017 at 12:04 PM, Hans Petter Selasky <hps@selasky.org> wrote: > Hi, > > Issue 2: > > Looking at the log you sent I observe the following: > >> 11:39:43.395110 usbus1.2 >> SUBM-BULK-EP=00000081,SPD=HIGH,NFR=10,SLEN=0,IVAL=0 >> frame[0] READ 0 bytes >> frame[1] READ 0 bytes >> frame[2] READ 0 bytes >> frame[3] READ 0 bytes >> frame[4] READ 0 bytes >> frame[5] READ 0 bytes >> frame[6] READ 0 bytes >> frame[7] READ 0 bytes >> frame[8] READ 0 bytes >> frame[9] READ 0 bytes >> flags 0x10 <PROXY_BUFFER|0> >> status 0x6a023 >> <OPEN|TRANSFERRING|STARTED|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|0> >> 11:39:43.395115 usbus1.2 >> DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=STALLED >> frame[0] READ 0 bytes >> flags 0x10 <PROXY_BUFFER|0> >> status 0x8a025 >> <OPEN|DID_DMA_DELAY|STARTED|BDMA_ENABLE|BDMA_SETUP|DOING_CALLBACK|0> > > > The first multi-BULK transfer that STALLs is programmed to only receive > zero-length USB packets. Is that intentional? > > In the case above there is a missing code fragment like this, I suspect: > > for (x = 0; x != 10; x++) > libusb20_tr_set_length(xfer, buffer_size, x); > seems to be intentional. in the LIBUSB20_START_... section it will do a libusb20_tr_setup_bulk(xfer, tb, urb->buffer_length, 250); that should also set the length (otherwise it shouldn't work at all I guess) The only explanation for that problem is that freebsd is not reading the data fast enough and lets the chip overflow (=requiring to reset). I don't think that this can be solved with libusb20, I really think this is a USB stack kernel problem. Markus
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BO4pCL_g=0%2BpbpwFts294qhGw0jsG3HN1vqUNvcpgGUgaMCaA>