This lets the usb-msc driver send TEST UNIT READY commands.
Signed-off-by: Paolo Bonzini <[email protected]>
---
src/usb-msc.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/usb-msc.c b/src/usb-msc.c
index 13ef93e..f74b8ec 100644
--- a/src/usb-msc.c
+++ b/src/usb-msc.c
@@ -79,9 +79,11 @@ usb_cmd_data(struct disk_op_s *op, void *cdbcmd, u16
blocksize)
goto fail;
// Transfer data from device.
- ret = usb_send_bulk(bulkin, USB_DIR_IN, op->buf_fl, bytes);
- if (ret)
- goto fail;
+ if (bytes) {
+ ret = usb_send_bulk(bulkin, USB_DIR_IN, op->buf_fl, bytes);
+ if (ret)
+ goto fail;
+ }
// Transfer csw info.
struct csw_s csw;
--
1.7.7.1
_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios