On Wed, Nov 16, 2011 at 01:02:45PM +0100, Paolo Bonzini wrote: > 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; > + }
Later on in this function there's: op->count -= csw.dCSWDataResidue / blocksize; Doesn't it also need to check for blocksize != 0 in order to support TEST UNIT READY? -Kevin _______________________________________________ SeaBIOS mailing list [email protected] http://www.seabios.org/mailman/listinfo/seabios
