diff options
author | glebius <glebius@FreeBSD.org> | 2010-10-12 09:41:42 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2010-10-12 09:41:42 +0000 |
commit | 8c5d5003224b7bffc6011fa3ab37aa37f0123887 (patch) | |
tree | 95dd29eaf72aad106fb0d21d136789e4478cac0e | |
parent | 84212c755146fe8d191ba26c09911fe3411c965c (diff) | |
download | FreeBSD-src-8c5d5003224b7bffc6011fa3ab37aa37f0123887.zip FreeBSD-src-8c5d5003224b7bffc6011fa3ab37aa37f0123887.tar.gz |
We already have dummy receive buffer in sc->buffer.
Suggested by: hselasky
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 69473cb..d488196 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -98,7 +98,6 @@ static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; -static uint8_t scsi_tct_dummy[4]; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -621,8 +620,12 @@ usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method) USB_MS_HZ); break; case MSC_EJECT_TCT: - err = bbb_command_start(sc, DIR_IN, 0, &scsi_tct_dummy, - sizeof(scsi_tct_dummy), &scsi_tct_eject, + /* + * TCTMobile needs DIR_IN flag. To get it, we + * supply a dummy data with the command. + */ + err = bbb_command_start(sc, DIR_IN, 0, &sc->buffer, + sizeof(sc->buffer), &scsi_tct_eject, sizeof(scsi_tct_eject), USB_MS_HZ); break; default: |