We already have dummy receive buffer in sc->buffer.
Suggested by: hselasky
This commit is contained in:
parent
78ae4338a2
commit
19f5434963
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user