GitLab has been upgraded to 13.3.6. If you encounter any issues mail code@riscosopen.org

  1. 12 Sep, 2020 1 commit
    • Robert Sprowson's avatar
      Add support for XHCI that exists on a PCI bus · 8d9ee35f
      Robert Sprowson authored
      Ask PCI manager if there are any XHCI controllers to attach to, then continue to HAL described ones once they're all done. Similarly ask around for the PCI root hub name.
      xhci.c: Root hub name now in a RAM variable. Workaround for DMA controller problem with VL805 if the array of structure pointers is only 8 byte aligned.
      xhcimodule.c/h: Do 2 pass discovery, PCI first, then HAL descriptors. Speed up interrupt despatch a bit by calling the HAL's enable/disable directly rather than via _swix(OS_Hardware). Explicitly clear the interrupt too for the case where it's latched in the PCI peripheral.
      
      Version 0.30. Tagged as 'XHCIDriver-0_30'
      8d9ee35f
  2. 04 Jul, 2020 2 commits
    • Robert Sprowson's avatar
      Fix for occasional NULL pointer read on timeout · 841353e9
      Robert Sprowson authored
      The ordering of interrupts would sometimes mean the xfer was finished with while the timeout function was waiting to run, leading to an attempt to pass an empty queue (xfer->pipe->queue) to USBDriver via USBDriver_TransferComplete. This would lead to a NULL pointer read when in usbdi.c when it looked at the queue contents.
      Adopt the fix from NetBSD xhci.c revision 1.96, so only do a timeout if the xfer wasn is progress.
      
      Version 0.29. Tagged as 'XHCIDriver-0_29'
      841353e9
    • Robert Sprowson's avatar
      Change to unsigned physical addresses · 239da27a
      Robert Sprowson authored
      The prototype for vtophys returns an unsigned value, update this driver to match the port header file from USBDriver-1_31.
      239da27a
  3. 06 Mar, 2020 5 commits
  4. 02 Jun, 2018 1 commit
  5. 29 Mar, 2018 1 commit
    • Robert Sprowson's avatar
      On stall cancel the transfer's timeout too · 5cbd4521
      Robert Sprowson authored
      When an endpoint stalls, make sure the xfer's timeout is cancelled before setting up the background clear operation, otherwise the stall is cleared and a few seconds later an attempt is made to work with the (stale, or possibly even reused) xfer struct in xhci_timeout().
      Merged from NetBSD revision 1.28.2.74.
      
      Version 0.26. Tagged as 'XHCIDriver-0_26'
      5cbd4521
  6. 22 Feb, 2018 1 commit
    • Robert Sprowson's avatar
      Set up the context correctly for a high->full->low cascade of devices · c6061ab1
      Robert Sprowson authored
      The context setup code had misinterpreted the XHCI spec's wording when working out the TT hub slot/TT port number; they should refer to the hub where the high speed hub is, not the adjacent hub. This caused problems with some older KVMs (which are typically full speed, and often have low speed keyboard or mice connected). USBDriver would try to get the HID descriptors but actually sent garble to the device at the wrong speed.
      From NetBSD revision 1.83, and NetBSD PR/52791.
      
      Fixes Elesar ticket 80E-056-86AB5, where a Trendnet TK-409 caused a hang at power up.
      
      Version 0.25. Tagged as 'XHCIDriver-0_25'
      c6061ab1
  7. 27 Jan, 2018 1 commit
    • ROOL's avatar
      Defined return on error · 6f14cb53
      ROOL authored
      Detail:
        Ensure the returned status is defined if USBDriver_InsertTransfer fails (because USBDriver has gone).
        See similar in DWCDriver-0_34.
      
      Version 0.24. Tagged as 'XHCIDriver-0_24'
      6f14cb53
  8. 08 Oct, 2017 1 commit
  9. 07 Oct, 2017 1 commit
    • ROOL's avatar
      Build fix · eb50b9ea
      ROOL authored
      Detail:
        Duplicate type declaration for device_t, now in usb_port.h.
      Admin:
        Requires USBDriver-1_23 for the corresponding usb_port.h.
      
      Version 0.23. Tagged as 'XHCIDriver-0_23'
      eb50b9ea
  10. 19 Sep, 2017 1 commit
    • ROOL's avatar
      Take a local copy of root hub header · dd00e36b
      ROOL authored
      Detail:
        Since the 'c' file is a local copy, host the 'h' file too.
      Admin:
        Submission for USB bounty. Retagged.
      
      Version 0.22. Not tagged
      dd00e36b
  11. 19 Aug, 2017 1 commit
    • ROOL's avatar
      Changes to header imports · 9e76b586
      ROOL authored
      Detail:
        Use those in C:USB rather than reaching inside the adjacent USBDriver.
      Admin:
        Requires USBDriver-1_21.
      
      Version 0.22. Tagged as 'XHCIDriver-0_22'
      9e76b586
  12. 15 Jul, 2017 1 commit
    • ROOL's avatar
      Repoint include path · 7a0e519c
      ROOL authored
      Admin:
        Reach into USBDriver rather than NetBSD.
      
      Version 0.21. Tagged as 'XHCIDriver-0_21'
      7a0e519c
  13. 13 Jul, 2017 2 commits
    • Robert Sprowson's avatar
      Fix "spurious event" when command ring rolls over · 6bfa0568
      Robert Sprowson authored
      xhci.c: From NetBSD 1.67.
      
      Version 0.20. Tagged as 'XHCIDriver-0_20'
      6bfa0568
    • Robert Sprowson's avatar
      Improve transfer callout handling · 1a1fd436
      Robert Sprowson authored
      xhci.c: Merge changes from NetBSD 1.28.2.51; previously timeouts were only applied to control transfers and were cancelled post transfer complete, now all transfer types are covered and are called prior to usbd_transfer_complete() being called.
      glue.c: More faithfully implement callout_reset(). The spec for this function is supposed to extend a callout for ones that are already running, but since the callx library ultimately uses OS_CallAfter what actually happened was two callafters were scheduled. This caused a NULL pointer exception if USBDriver cancelled a transaction before the timeout completed (because the cancel caused a 2nd OS_CallAfter to be scheduled, but the cancel caused usbd_transfer_complete() to consume then free the xfer, then the 2nd OS_CallAfter fired and passed a free'd list to usbd_transfer_complete()).
      
      Also removed redundant headers usb_mem.h and usb_quirks.h.
      Tested over 3 weeks on a Titanium (waiting for the right sequence of events to cause 2 OS_CallAfters to trigger took several days each!).
      
      Version 0.19. Tagged as 'XHCIDriver-0_19'
      1a1fd436
  14. 30 Jun, 2017 1 commit
    • Robert Sprowson's avatar
      Use RTSupport for both stalls and aborts · 98cfb82d
      Robert Sprowson authored
      Implement the 'todo' note to use RTSupport instead of a callback. This means if the OS is stuck somewhere in SVC mode and no callbacks are happening the pipe is aborted, plus the state is held in the xfer struct rather than a single shared variable.
      
      Version 0.18. Tagged as 'XHCIDriver-0_18'
      98cfb82d
  15. 18 Dec, 2016 2 commits
    • Robert Sprowson's avatar
      Build fix · d3ebe517
      Robert Sprowson authored
      The addition of min() macro to usb_port.h in NetBSD-1_18 causes the same name function here to no longer compile.
      
      Version 0.17. Tagged as 'XHCIDriver-0_17'
      d3ebe517
    • Robert Sprowson's avatar
      Build fix · 142c12d8
      Robert Sprowson authored
      The addition of min() macro to usb_port.h in NetBSD-1_18 causes the same name function here to no longer compile.
      
      Version 0.17. Tagged as 'XHCIDriver-0_17'
      142c12d8
  16. 10 Dec, 2016 1 commit
    • ROOL's avatar
      Build fix · 8d96655d
      ROOL authored
      Admin:
        Requires NetBSD-1_17
      8d96655d
  17. 06 Jun, 2016 2 commits
    • Robert Sprowson's avatar
      Fix for sending a stale TRB from a pipe that was previously open · 53348b62
      Robert Sprowson authored
      Performing an open/out/close set of operations leaves the TRBs from the output step in the transfer ring for that endpoint. Subsequently re-opening the same endpoint a second time would start appending new TRBs on the end of the ring, but as the hardware's dequeue pointer gets reset to 0 all the old TRBs (with stale pointers to data) would get repeated.
      Now, when an endpoint is configured (and hence the hardware's dequeue pointer set) the shadow copy in RAM is also cleared. Since this procedure is also needed during slot initialisation and stall clear, make it a function too.
      
      Fixes problem with 1st print job from Printer Manager being good, and the 2nd print job being bad due to bits of the previous page being jumbled up in the data stream. Also fixes problem with TWAIN scanner failing to complete a scan, for the same reason. Endpoints that are only ever opened, such as mass storage devices, were not affected as the hardware's dequeue pointer always matched the software's copy.
      
      From NetBSD revision 1.56, ref http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51202.
      
      Version 0.16. Tagged as 'XHCIDriver-0_16'
      53348b62
    • Robert Sprowson's avatar
      Stop the endpoint when software's finished with it · 505a8e65
      Robert Sprowson authored
      Tell the controller when a pipe is closed, so it doesn't need to schedule time to look at endpoints we're not using any more. Also guards against packets arriving which USBDriver isn't expecting to receive.
      From NetBSD revision 1.28.2.19.
      
      Version 0.15. Tagged as 'XHCIDriver-0_15'
      505a8e65
  18. 03 Jun, 2016 2 commits
  19. 27 Mar, 2016 1 commit
    • Jeffrey Lee's avatar
      Don't pretend to mess with cacheability of pages · 5f6dca10
      Jeffrey Lee authored
      Detail:
        c/glue - Fix vtophys requesting that pages are made uncacheable. They're already uncacheable (all allocated via PCI_RAMAlloc), and once we're done with the pages we never do a 'make cacheable' call to balance it out
      Admin:
        Builds, untested
      
      
      Version 0.12. Tagged as 'XHCIDriver-0_12'
      5f6dca10
  20. 25 Mar, 2016 1 commit
    • Robert Sprowson's avatar
      Fix for stall clear stalling when called from umass · cda26511
      Robert Sprowson authored
      Since SCSISoftUSB relies on devices stalling (rather than doing a test unit ready), stalls occur when a card reader with no card present is queried.
      The port of umass ends up trying to add something to the control transfer queue, but enters with interrupts disabled, so the clear endpoint stall just times out having not done anything (other callers have interrupts enabled so do clear the stall).
      Apply change of policy that NetBSD made in revision 1.28.2.19 where the clear endpoint stall is cleared asynchronously rather than being left around until the next transfer is queued.
      Since we don't have threads on RISC OS, and callbacks wouldn't happen either, we schedule a one shot RTSupport to trigger the clear at CBAI level.
      Apply change from NetBSD 1.28.2.37 to remove the old clear code too.
      
      Version 0.11. Tagged as 'XHCIDriver-0_11'
      cda26511
  21. 06 Dec, 2015 1 commit
    • Robert Sprowson's avatar
      Bump up the declared API number · 50d41438
      Robert Sprowson authored
      During the submission lag NetBSD-1_08 has API version 0.80 but this HC was only declaring 0.76.
      
      Version 0.10. Tagged as 'XHCIDriver-0_10'
      50d41438
  22. 18 Nov, 2015 1 commit
  23. 15 Nov, 2015 2 commits