Date: Wed, 24 Sep 2008 23:29:38 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 150409 for review Message-ID: <200809242329.m8ONTceS041952@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150409 Change 150409 by hselasky@hselasky_laptop001 on 2008/09/24 23:29:31 Fix USB regression issue. The AT91 UDP needs the extra SYNC point else the hardware seems to hang. Tested and works. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#13 (text+ko) ==== @@ -917,6 +917,7 @@ struct at91dci_td *td; uint32_t x; uint8_t ep_no; + uint8_t need_sync; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", xfer->address, UE_GET_ADDR(xfer->endpoint), @@ -958,12 +959,16 @@ if (x != xfer->nframes) { if (xfer->endpoint & UE_DIR_IN) { temp.func = &at91dci_data_tx; + need_sync = 1; } else { temp.func = &at91dci_data_rx; + need_sync = 0; } /* setup "pc" pointer */ temp.pc = xfer->frbuffers + x; + } else { + need_sync = 0; } while (x != xfer->nframes) { @@ -1002,11 +1007,19 @@ /* always setup a valid "pc" pointer for status and sync */ temp.pc = xfer->frbuffers + 0; + /* check if we need to sync */ + if (need_sync && xfer->flags_int.control_xfr) { + + /* we need a SYNC point after TX */ + temp.func = &at91dci_data_tx_sync; + temp.len = 0; + temp.short_pkt = 0; + + at91dci_setup_standard_chain_sub(&temp); + } /* check if we should append a status stage */ - if (xfer->flags_int.control_xfr && !xfer->flags_int.control_act) { - uint8_t need_sync; /* * Send a DATA1 message and invert the current @@ -2375,7 +2388,8 @@ */ if (parm->methods == &at91dci_device_ctrl_methods) { - ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC */ ; + ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */ + + 1 /* SYNC 2 */ ; } else if (parm->methods == &at91dci_device_bulk_methods) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809242329.m8ONTceS041952>