Commit f4c5a80e authored by John Ballance's avatar John Ballance

Bugfix to flush any bytes left in the pipe buffer once read is completed

Detail:
  In certain circumstances the Sense Status command can be sent more bytes
  than it requested. When this happened the system stalled until the device
  was unplugged. (The transfer was not completed because the system said
  there were still bytes to be read, though the command had read all it
  required.)
Admin:
  Tested on iMx6

Version 0.23. Tagged as 'SCSISoftUSB-0_23'
parent 11e2ca51
/* (0.22)
/* (0.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.22
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 May 2018
#define Module_Date_CMHG 01 Jul 2018
#define Module_MajorVersion "0.22"
#define Module_Version 22
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MinorVersion ""
#define Module_Date "29 May 2018"
#define Module_Date "01 Jul 2018"
#define Module_ApplicationDate "29-May-18"
#define Module_ApplicationDate "01-Jul-18"
#define Module_ComponentName "SCSISoftUSB"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/SCSI/SCSISoftUSB"
#define Module_FullVersion "0.22"
#define Module_HelpVersion "0.22 (29 May 2018)"
#define Module_LibraryVersionInfo "0:22"
#define Module_FullVersion "0.23"
#define Module_HelpVersion "0.23 (01 Jul 2018)"
#define Module_LibraryVersionInfo "0:23"
......@@ -666,7 +666,12 @@ void glue_Tick(my_usb_device_t *device)
}
_kernel_irqs_off();
}
DEBUGf("Still in RX buffer: = %x, ", buffer_used);
DEBUGf("Still in RX buffer: = %x, needed: = %x ", buffer_used,device->curr_transferlength);
if (buffer_used > device->curr_transferlength)
{
// flush the buffer.. we're done here
REMOVE_BLOCK(device->current_pipe->buffer, softc->scbulkoutbuf, buffer_used);
}
e = _swix(DeviceFS_CallDevice, _INR(0,2),
DeviceCall_MonitorRX,
device->devicefs_name,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment