1. 10 Mar, 2016 1 commit
    • Robert Sprowson's avatar
      Correct case sensitive compare never matching · 3bb23158
      Robert Sprowson authored
      In the module post init service call handler SCSIdriver -> SCSIDriver. While a caseless compare would also solve this, the only disc loading copy in RO5x0Hook loads the disc based SCSIDriver first anyway, so there's always a matched set there (as in ROM). Remove unused module post final service call handler too.
      module.c: adjust case, remove unused code
      modhdr.cmhg: remove unused service call table entry
      glue.c: adjust case (of debug/comments)
      Makefile: simplified given recent shared makefile improvements, notably the debug flags are now picked up from CDFLAGS/CMHGDFLAGS based on the target
      !MkDebug/!MkRam: pass in the target for which the obey file relates rather than 'all'
      
      Version 0.21. Tagged as 'SCSISoftUSB-0_21'
      3bb23158
  2. 30 Jan, 2016 1 commit
    • ROOL's avatar
      Invert IRQ restore logic · da39d756
      ROOL authored
      Detail:
        If IRQs were not off, reenable them on exit. This is an academic fix as the CMHG veneers would reenable them when the CPSR is restored, but now self consistent with the other exits in this file.
      Admin:
        Spotted by Colin Granville. Not tested here.
      
      Version 0.20. Tagged as 'SCSISoftUSB-0_20'
      da39d756
  3. 12 Aug, 2014 1 commit
    • Jeffrey Lee's avatar
      Fixes and improvements to SCSI request padding · b51d874f
      Jeffrey Lee authored
      Detail:
        In order to keep block-based SCSI devices happy, the data transfer length must be a multiple of the block size. Unfortunately the RISC OS SCSI API considers the act of padding requests out to the correct size to be a driver problem rather than a client problem, and the USB SCSI spec doesn't provide a guaranteed way for a host to determine the correct transfer length for a command which has failed.
        To cope with this SCSISoftUSB contains some code to pad block read/write transfer lengths out to a multiple of the USB packet size. For high-speed USB devices using standard 512 byte sector sizes this works fine, but for low-speed devices or devices with less common block sizes it falls short.
        To rectify this SCSISoftUSB now listens out for any CAPACITY commands which are sent to the device and peeks at the result to determine the correct block size to use. Except for rare cases where the client takes a random guess at the block size this should allow SCSISoftUSB to get the correct block size itself without having to implement lots of extra logic to deal with devices being slow to initialise, etc.
        Additionally the padding code has been rewritten to ensure writes are padded with nulls (previously would read off the end of the supplied source data), and excess read bytes are discarded (previously would write off the end of the destination buffer)
        File changes: c/glue, h/global
      Admin:
        Tested on Raspberry Pi
        USB2 devices forced to run at USB1 speed now behave themselves during non-sector sized filecore ops
      
      
      Version 0.19. Tagged as 'SCSISoftUSB-0_19'
      b51d874f
  4. 13 Jul, 2013 1 commit
  5. 26 Jun, 2013 1 commit
    • Robert Sprowson's avatar
      Revert interface/alternate muddle · cca950c1
      Robert Sprowson authored
      In glue.c revision 1.4 the interface and alternate were swapped round when generating the USB device special string. Presumably this was to work around DeviceFS not parsing them properly? DeviceFS does now, so this was tripping up any mass storage devices whose interface and alternate weren't the same.
      
      Version 0.17. Tagged as 'SCSISoftUSB-0_17'
      cca950c1
  6. 03 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix temporary RMA corruption while inside RTSupport routine · b935ae8d
      Jeffrey Lee authored
      Detail:
        Previously the RTSupport routine would execute in SYS mode, and use assembler veneers to make direct calls to the buffer manager.
        Despite being against the buffer manager spec (only IRQ or SVC should be used, according to PRM 5a), the buffer manager was coping with SYS mode calls fine. However the buffer manager would call DeviceFS, and DeviceFS would then call USBDriver, entering the module via one of CMHG's generic veneers.
        These veneers attempt to switch to SVC mode on entry, but they do so by only interacting with the bottom two bits of the PSR - so the CPU was remaining in SYS mode.
        Although this isn't a problem in and of itself, immediately after the mode change comes some code to set up the static relocation offsets at the SVC stack limit.
        This is done by aligning the stack pointer to a MB boundary. If we were in SVC mode this would be fine, but since we're still in SYS mode we're using a stack that was allocated by SCSISoftUSB and isn't aligned to a boundary at all; thus resulting in two words of RMA being swapped out with something completely different while the USBDriver code executes.
        With RTSupport in ROM this will most likely end up being the first two words of the heap - which is enough to stop OS_Module from manipulating the heap (the heap manager will see it as corrupt), but without causing any lasting damage.
        To solve this issue we now run the entire routine in SVC mode, using the MB-aligned SVC stack that RTSupport provides for us.
        File changes:
        c/global, c/cmodule, h/global - Get rid of the SYS mode stack since we no longer need it
        c/glue, h/glue - Extern RTSupportWrapper so it can be called from the assembler veneer. Tweak RT_Register parameters to pass in the relocation offsets (and no SYS stack)
        s/asm, h/asm - Added asm_RTSupportWrapper to get us into and out of SVC mode around the call to RTSupportWrapper. Also sets up our stack limit & relocation offsets within the SVC stack.
      Admin:
        Tested in BCM2835 ROM
      
      
      Version 0.16. Tagged as 'SCSISoftUSB-0_16'
      b935ae8d
  7. 27 Nov, 2011 1 commit
    • Jeffrey Lee's avatar
      Tidy source a bit · c6ff2236
      Jeffrey Lee authored
      Detail:
        Makefile, !MkDebug,fd7 - Rewritten to use makefile fragments
        c/svcprint, h/debug - Removed obsolete svcprint code
        c/module - Collapse MESSAGES option. Use STANDALONE #define instead of ROM_MODULE to decide whether resources are embedded or not.
      Admin:
        Tested in softload on Iyonix
      
      
      Version 0.15. Tagged as 'SCSISoftUSB-0_15'
      c6ff2236
  8. 24 Jul, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix null pointer access · 3f82d388
      Jeffrey Lee authored
      Detail:
        c/glue - Not all operations make use of device->current_pipe, but glue_DoCommand was accessing the pipe pointer regardless of whether the maxpacket value was needed or not. This causes the code to fail if zero page is relocated.
      Admin:
        Tested on rev C2 BB.
      
      
      Version 0.14. Tagged as 'SCSISoftUSB-0_14'
      3f82d388
  9. 23 Nov, 2010 1 commit
    • Jeffrey Lee's avatar
      Improve SCSISoftUSB debugging output · 0842fca8
      Jeffrey Lee authored
      Detail:
        c/glue, c/umass - tweaked a few debug output messages and converted some disabled printf() calls to DPRINTF() to make SCSISoftUSB's debugging output much more useful.
      Admin:
        Tested in ROM on rev C2 beagleboard.
        Changes shouldn't affect non-debug builds.
      
      
      Version 0.13. Tagged as 'SCSISoftUSB-0_13'
      0842fca8
  10. 22 Apr, 2010 1 commit
    • Jeffrey Lee's avatar
      Make SCSISoftUSB's 'PopUpDelay' configurable, improve robustness of device registration · 368ea7b5
      Jeffrey Lee authored
      Detail:
        c/global, c/module, cmhg/header, h/global - The new command *SCSISoftUSB_PopUpDelay can now be used to control the popup delay value. Additionally, no delay is used if outside the desktop.
        Makefile, Resources/UK/Messages - Added resources file containing text for the new * command
        c/module, cmhg/header - Devices are now registered with SCSISwitch from a callback instead of from a ticker event. This ensures the registration won't fail due to insufficient RMA space (e.g. as is often the case for devices detected during OMAP ROM initialisation)
      Admin:
        Tested in ROM on rev C2 beagleboard, and in RAM on Iyonix.
        Messages file needs translating!
      
      
      Version 0.12. Tagged as 'SCSISoftUSB-0_12'
      368ea7b5
  11. 22 Oct, 2009 1 commit
    • Jeffrey Lee's avatar
      Update SCSISoftUSB to use RTSupport where possible, for much better USB performance · 5204687d
      Jeffrey Lee authored
      Detail:
        On initialisation SCSISoftUSB now checks if a suitable version of the RTSupport module is loaded (0.05 or above), and if so, will use RTSupport in preference to TickerV to schedule USB transfers. When combined with tweaked DeviceFS buffer thresholds and some extra code to listen out for buffer filling/emptying upcalls, this allows for significant performance improvements for USB 2.0 devices.
        If at any point RTSupport becomes unavailable or the RT_Register SWI fails (or if a suitable version of RTSupport is not present) the code will (potentially temporarily) fall back to using TickerV to ensure the filesystem remains functional.
      Admin:
        Tested on RISC OS 5.15 rev C2 beagleboard & RISC OS 5.12 Iyonix with & without RTSupport 0.05.
      
      
      Version 0.11. Tagged as 'SCSISoftUSB-0_11'
      5204687d
  12. 20 Sep, 2005 1 commit
  13. 10 Aug, 2005 1 commit
  14. 27 Jun, 2005 1 commit
  15. 24 Jun, 2005 1 commit
    • John Ballance's avatar
      Extend device coverage and better startup · 856c4169
      John Ballance authored
      Detail:
      	now checks any mass storage device for usability .. nolonger
      	restricts to types 8-5 and 8-6
      	delays scsi registration for 2 seconds beyond point where
      	module has finished initialising (overcomes issue seen with some
      	devices that fail an inquiry command if sent immediately after
      	device is enabled)
      Admin:
      	castle added IP. tested locally. now a release candidate to
      	be checked via the beta software site.
      
      
      Version 0.07. Tagged as 'SCSISoftUSB-0_07'
      856c4169
  16. 05 Mar, 2005 1 commit
    • John Ballance's avatar
      Numerous updates to improve working. · 655facbc
      John Ballance authored
      	Re-synced with NetBSD mass storage
      	Added part sector fill/ignore needed by SCSIFS
      
      Detail:
      Admin:  tested at castle.. to go to beta site.. Castle added IP
      
      
      Version 0.06. Tagged as 'SCSISoftUSB-0_06'
      655facbc
  17. 16 Jun, 2003 1 commit
  18. 13 Jun, 2003 1 commit
  19. 03 Jun, 2003 1 commit
    • Ben Avison's avatar
      Brought into line with latest version of SCSISoft spec. · 00ad2a9b
      Ben Avison authored
      Detail:
        * Returns separate error numbers for the different "cancel background
          operation" reasons
        * Reports that it supports scatter lists
        * Debugging output is LF-CR terminated, not CR-LF
      Admin:
        Tested briefly.
      
      Version 0.03. Tagged as 'SCSISoftUSB-0_03'
      00ad2a9b
  20. 23 May, 2003 1 commit
    • Ben Avison's avatar
      Various changes to get it up to a releasable standard. · 61710f61
      Ben Avison authored
      Detail:
        * Unplugging of devices is now reliable.
        * Stall handling now works (requires USBDriver 0.17).
        * We now do max LUN checking, since devices don't seem to do it reliably
          themselves.
        * Unknown SCSI driver handler reason codes now return an error.
        * Scatter list handling improvements - eg individual transfers can now be
          bigger than the DeviceFS buffer size (accounting for the last.
      Admin:
        Tested with various mass storage devices.
      
      Version 0.02. Tagged as 'SCSISoftUSB-0_02'
      61710f61
  21. 14 May, 2003 3 commits