Commit babeb281 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix XferMaxLen64K code to perform multiple SCSI_Ops instead of relying on the...

Fix XferMaxLen64K code to perform multiple SCSI_Ops instead of relying on the caller to retry the operation until all the data has been transferred

  s/ScsiFs15 - Instead of relying on undocumented FileCore behaviour to ensure that long transfers are performed properly, SCSIFS now splits the transfer into chunks and loops internally until all the data has been transferred. This ensures the SCSIFS_DiscOp SWI works as expected.
  s/ScsiFs05 - Swap and ADR for ADRL, seems to be needed when enabling debug code.
  Tested as a module softload on an Iyonix.
  Fixes issue with DiscKnight complaining that perfectly good discs contain thousands of errors.

Version 1.19. Tagged as 'SCSIFS-1_19'
parent 2e97c8b1
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.18"
Module_Version SETA 118
Module_MajorVersion SETS "1.19"
Module_Version SETA 119
Module_MinorVersion SETS ""
Module_Date SETS "15 Dec 2010"
Module_ApplicationDate SETS "15-Dec-10"
Module_Date SETS "12 Jan 2011"
Module_ApplicationDate SETS "12-Jan-11"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.18"
Module_HelpVersion SETS "1.18 (15 Dec 2010)"
Module_FullVersion SETS "1.19"
Module_HelpVersion SETS "1.19 (12 Jan 2011)"
/* (1.18)
/* (1.19)
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
#define Module_MajorVersion_CMHG 1.18
#define Module_MajorVersion_CMHG 1.19
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Dec 2010
#define Module_Date_CMHG 12 Jan 2011
#define Module_MajorVersion "1.18"
#define Module_Version 118
#define Module_MajorVersion "1.19"
#define Module_Version 119
#define Module_MinorVersion ""
#define Module_Date "15 Dec 2010"
#define Module_Date "12 Jan 2011"
#define Module_ApplicationDate "15-Dec-10"
#define Module_ApplicationDate "12-Jan-11"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.18"
#define Module_HelpVersion "1.18 (15 Dec 2010)"
#define Module_LibraryVersionInfo "1:18"
#define Module_FullVersion "1.19"
#define Module_HelpVersion "1.19 (12 Jan 2011)"
#define Module_LibraryVersionInfo "1:19"
......@@ -648,7 +648,7 @@ CheckDriveAllowed ROUT
BEQ CDAAllowed
; the Boot: path exists.. look for our choices.Hide file
MOV R0, #&4f ; 4f open R/O no path
ADR R1, ChoicesHide
ADRL R1, ChoicesHide
; choices didnt open
Pull "R3", VS ; no
......@@ -33,6 +33,7 @@ LowLevelEntry ROUT ;entry point for FileCore
LowLevelOp ;internal entry point
Push "R0-R8,R9,LR"
LowLevelOp2 ;another internal entry point
[ Debug3
wrhex R1
wrhex R2
......@@ -286,8 +287,7 @@ DontNeedScatBlk
; Block count fields in CDB's are 16 bit, ie max 65535.
; If the byte count given by filecore, converted to a block count exceeds this,
; put 65535 in the CDB. Filecore will see that not all of the data has been
; transfered and call us again for the residue.
; put 65535 in the CDB.
; XferLenMax255 switch introduced for test purposes .. some devices found
; that won't do more than 256 blocks at a time safely (JB 20050131)
......@@ -420,6 +420,33 @@ DontNeedScatBlk
STMIA SP, {R0,R1-R2,R3-R4}
[ XferLenMax64K
; For file read/write operations, FileCore will automatically call us again to
; transfer any data which we didn't transfer due to our 64K xfer limit.
; HOWEVER this behaviour seems to simply be a side-effect of the implementation,
; not something that we should be relying upon. Plus if you call SCSIFS_DiscOp
; (or FileCore_DiscOp) directly then the FileCore won't automatically repeat
; the operation, leading to confusion when calls complete without error but
; without all the data having been transferred.
; So implement our own loop to make sure that the user really does get all the
; data that he was after.
TEQ R4,#0
AND LR, R1, #OpMask
TEQ LR, #1 ; Read sectors
TEQNE LR, #2 ; Write sectors
[ Debug3
mess EQ,"Looping back round to transfer rest of data",NL
BEQ LowLevelOp2
[ Debug3
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