1. 13 Jul, 2017 1 commit
    • Robert Sprowson's avatar
      Improve transfer callout handling · 1a1fd436
      Robert Sprowson authored
      xhci.c: Merge changes from NetBSD; 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'
  2. 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'
  3. 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'
    • 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'
  4. 10 Dec, 2016 1 commit
    • ROOL's avatar
      Build fix · 8d96655d
      ROOL authored
        Requires NetBSD-1_17
  5. 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'
    • 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
      Version 0.15. Tagged as 'XHCIDriver-0_15'
  6. 03 Jun, 2016 2 commits
  7. 27 Mar, 2016 1 commit
    • Jeffrey Lee's avatar
      Don't pretend to mess with cacheability of pages · 5f6dca10
      Jeffrey Lee authored
        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
        Builds, untested
      Version 0.12. Tagged as 'XHCIDriver-0_12'
  8. 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 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 to remove the old clear code too.
      Version 0.11. Tagged as 'XHCIDriver-0_11'
  9. 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'
  10. 18 Nov, 2015 1 commit
  11. 15 Nov, 2015 2 commits