Date: Mon, 24 Dec 2012 10:10:18 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244650 - in head/sys/dev/usb: . storage wlan Message-ID: <201212241010.qBOAAIHe083382@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Dec 24 10:10:18 2012 New Revision: 244650 URL: http://svnweb.freebsd.org/changeset/base/244650 Log: Fix more regression issue after r244503. usbd_transfer_setup() does not set a default length for USB transfers. Only the number of frames is automatically setup. MFC after: 1 week Modified: head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Mon Dec 24 01:00:36 2012 (r244649) +++ head/sys/dev/usb/storage/ustorage_fs.c Mon Dec 24 10:10:18 2012 (r244650) @@ -603,6 +603,8 @@ tr_setup: usbd_xfer_set_stall(xfer); DPRINTF("stall pipe\n"); } + usbd_xfer_set_frame_len(xfer, 0, + sizeof(ustorage_fs_bbb_cbw_t)); usbd_transfer_submit(xfer); break; @@ -827,6 +829,8 @@ tr_setup: sc->sc_transfer.data_error = 0; usbd_xfer_set_stall(xfer); } + usbd_xfer_set_frame_len(xfer, 0, + sizeof(ustorage_fs_bbb_csw_t)); usbd_transfer_submit(xfer); break; Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Mon Dec 24 01:00:36 2012 (r244649) +++ head/sys/dev/usb/usb_msctest.c Mon Dec 24 10:10:18 2012 (r244650) @@ -300,6 +300,8 @@ bbb_command_callback(struct usb_xfer *xf sc->cbw->bCDBLength = sizeof(sc->cbw->CBWCDB); DPRINTFN(0, "Truncating long command\n"); } + usbd_xfer_set_frame_len(xfer, 0, + sizeof(struct bbb_cbw)); usbd_transfer_submit(xfer); break; @@ -386,7 +388,7 @@ bbb_data_write_callback(struct usb_xfer if (sc->data_rem == 0) { bbb_transfer_start(sc, ST_STATUS); - return; + break; } if (max_bulk > sc->data_rem) { max_bulk = sc->data_rem; @@ -394,7 +396,7 @@ bbb_data_write_callback(struct usb_xfer usbd_xfer_set_timeout(xfer, sc->data_timeout); usbd_xfer_set_frame_data(xfer, 0, sc->data_ptr, max_bulk); usbd_transfer_submit(xfer); - return; + break; default: /* Error */ if (error == USB_ERR_CANCELLED) { @@ -402,8 +404,7 @@ bbb_data_write_callback(struct usb_xfer } else { bbb_transfer_start(sc, ST_DATA_WR_CS); } - return; - + break; } } @@ -438,6 +439,8 @@ bbb_status_callback(struct usb_xfer *xfe break; case USB_ST_SETUP: + usbd_xfer_set_frame_len(xfer, 0, + sizeof(struct bbb_csw)); usbd_transfer_submit(xfer); break; Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon Dec 24 01:00:36 2012 (r244649) +++ head/sys/dev/usb/wlan/if_urtw.c Mon Dec 24 10:10:18 2012 (r244650) @@ -4127,6 +4127,7 @@ urtw_bulk_tx_status_callback(struct usb_ case USB_ST_SETUP: setup: memcpy(dma_buf, &sc->sc_txstatus, sizeof(uint64_t)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(uint64_t)); usbd_transfer_submit(xfer); break; default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212241010.qBOAAIHe083382>