1. 18 Dec, 2011 1 commit
    • Jeffrey Lee's avatar
      Add workaround for what looks like a bug in the DM37x EHCI controller · 2230ce20
      Jeffrey Lee authored
      Detail:
        dev/usb/c/ehci - Force all EHCI data buffers to be 512 byte aligned.
        This is a workaround for what I believe is a bug in the DM37x EHCI controller - It looks like if the last packet of a bulk in transfer is a short packet, and that packet crosses a page boundary, then the second half of the packet doesn't seem to be written out to the correct address in memory.
        Version - increased EHCI module version number
      Admin:
        Tested on rev A2 BB-xM
        Fixes issue reported on forums with unreliable USB ethernet:
        http://www.riscosopen.org/forum/fourms/5/topics/828#posts-9691
      
      
      Version 0.65. Tagged as 'NetBSD-0_65'
      2230ce20
  2. 04 Dec, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix memory overwrites in root hub emulation · d3628750
      Jeffrey Lee authored
      Detail:
        dev/usb/c/ehci, dev/usb/c/ohci - Fixed device descriptor and config descriptor reads writing outside the destination buffer if the buffer was small enough.
        build/Version - Incremented EHCI & OHCI version numbers & dates
      Admin:
        Tested in OMAP3 ROM & Iyonix ROM softload
      
      
      Version 0.63. Tagged as 'NetBSD-0_63'
      d3628750
  3. 22 Aug, 2011 1 commit
    • Jeffrey Lee's avatar
      Update HAL USB code for new HAL_KbdScanInterrupt behaviour. Fix data aborts... · 68f485b5
      Jeffrey Lee authored
      Update HAL USB code for new HAL_KbdScanInterrupt behaviour. Fix data aborts during keyboard scanning.
      
      Detail:
        build/c/usbhal, build/h/usbhal - Updated USBHAL_KbdScanInterrupt to behave the same way HAL_KbdScanInterrupt is now expected to behave.
        build/c/ehci, build/c/ohci - Fixed some root hub emulation code which was writing to a global structure before copying it into the destination buffer. Although this works fine in ROM modules it was causing data aborts in the USB HAL libraries due to lack of automatic RW data relocation by the compiler.
        build/Version - Updated version numbers
      Admin:
        Tested on rev C2 BB.
      
      
      Version 0.62. Tagged as 'NetBSD-0_62'
      68f485b5
  4. 22 May, 2011 1 commit
    • Jeffrey Lee's avatar
      Add the ability to build the USB drivers as HAL-compatible static libraries · 4ca937fd
      Jeffrey Lee authored
      Detail:
        build/Makefile, build/OBJEHCIDriver, build/OBJOHCIDriver, build/OBJUSBDriver - Modified makefiles to build the HAL libs during the export libs phase
        build/!MkHAL,fd7 - Handy script for building the HAL libs
        build/Hdr/usbhal - Header containing definitions for the assembler code. Also gets exported so that HALs know how much workspace to reserve.
        build/c/usbhal - HAL version of usbmodule.c & port.c. Also contains the keyboard scan code, adapted from the code in the Tungsten HAL.
        build/s/porthal - Assembler versions of some port.c routines that were easier to do in assembler than C
        build/s/halheap - OS_Heap code that's been adapted for use in the HAL. Could easily be changed into a standalone library instead of being part of the HAL USB libs. Supports memory-efficient allocation of aligned blocks.
        build/c/ehcihal - HAL version of ehcimodule.c. Currently only supports EHCI controllers exposed via HAL_USBControllerInfo (i.e. no PCI support)
        build/c/ehcimodule, build/c/ohcimodule, build/c/port - Moved riscos_irq_clear into port.c. Removed unused microtime() function.
        build/c/usbmouse - Strip out some debug-related code in non-debug builds
        build/Version - Updated version numbers
        dev/usb/c/ehci, dev/usb/h/ehcivar - Adapted to add support for the HAL build. Apart from the base changes, the code has also been tweaked to significantly reduce the amount of memory used at runtime by the HAL version of the driver.
        dev/usb/c/hid, dev/usb/c/uhub, dev/usb/c/usb, dev/usb/c/usb_quirks, dev/usb/c/usb_subr, dev/usb/c/usbdi, dev/usb/c/usbdi_util, dev/usb/c/usbroothub_subr - Changes to support HAL builds. Mainly disabling bits that won't work in the HAL or disabling bits for RISC OS in general if they weren't being used in the first place.
        dev/usb/c/ohci, dev/usb/h/ohcivar - Basic changes to support HAL builds. However HAL OHCI support is still incomplete.
        dev/usb/h/usb_port - Added support for the HAL build. Also tweaked logprintf definition to get rid of logprintf calls entirely in non-debug builds.
        dev/usb/h/usbdivar - Added support for the HAL build.
        dev/usb/h/usbhal - New header used by the HAL build. Gets included by every C file to ensure the compiler doesn't use sb, and contains structs/macros to allow access to the shared workspace.
      Admin:
        HAL & non-HAL builds tested on rev C2 BB, rev A2 BB-xM, rev C1 TouchBook.
        Non-HAL builds tested with Iyonix ROM softload.
        Needs latest Kernel source for OSEntries.h export.
      
      
      Version 0.59. Tagged as 'NetBSD-0_59'
      4ca937fd
  5. 23 Nov, 2010 1 commit
    • Jeffrey Lee's avatar
      Fix a few USBDriver bugs · 3c10a2b1
      Jeffrey Lee authored
      Detail:
        build/c/usbdi - Fix compiler warning in usbd_clear_endpoint_stall()
        build/c/usbmodule - Fix detach_device() to deregister any pending attach callback for the detaching device. Fixes crash seen when inserting 16GB USB stick into EHCI port of rev C2 beagleboard (a current surge or something causes the stick to immediately disconnect then reconnect, but the disconnect occurs before the initial attach callback)
        build/c/usbmodule - Fix device_initialise() to use a timeout of 0 if no timeout was specified in the DeviceFS special field
        build/c/usbmodule - Fix the new read_cb() buffer padding logic to only pad up to totalcount instead of filling the entire buffer
      Admin:
        Tested on rev C2 beagleboard.
        This seems to fix the problems that were preventing Steffen Huber's USB CD code from working properly.
      
      
      Version 0.56. Tagged as 'NetBSD-0_56'
      3c10a2b1
  6. 14 Sep, 2010 1 commit
    • Jeffrey Lee's avatar
      Update hid.c, ums.c to latest (ish), update usbmouse.c, add TouchBook touchpad fix · f3df0153
      Jeffrey Lee authored
      Detail:
        dev/usb/c/hid, dev/usb/h/hid, dev/usb/c/ums - Updated to latest NetBSD versions (actually the version that was used for the recent core/EHCI update, so not 100% latest)
        build/c/usbmouse, dev/wscons/h/wsmousevar - Updated RISC OS USB mouse driver to be similar to the new NetBSD version. Also reformatted file to use tab char instead of inconsistent numbers of spaces for indentation.
        build/c/usbmouse, dev/usb/usbdevs - Added fix for broken TouchBook touchpad behaviour.
      Admin:
        Tested with various mice on a beagleboard, and with the TouchBook touchpad.
        We should now have support for the W axis of mice, but that code is untested since I don't have any suitable mice to hand.
      
      
      Version 0.53. Tagged as 'NetBSD-0_53'
      f3df0153
  7. 21 Jul, 2010 1 commit
    • Jeffrey Lee's avatar
      Update EHCI driver to NetBSD latest (as of 10/07/2010), improve DeviceFS interface · eb6607d0
      Jeffrey Lee authored
      Detail:
        EHCI driver update:
          dev/usb/c/ehci - Updated to latest NetBSD version, except for revisions 1.134 and 1.135 which are too invasive to merge in without updating the rest of the USB stack. This new version brings lots of bug fixes, and adds (untested on RISC OS) support for EHCI isochronous transfers.
          dev/usb/h/ehcivar - Updated to latest NetBSD version, except for the sc_bus splitting that was held back from the ehci.c update
          dev/usb/h/usb, dev/usb/h/usbdi, dev/usb/usbdivar - partial update to latest as required/possible
          dev/usb/c/usb_quirks, dev/usb/h/ehcireg, dev/usb/h/usb_mem, dev/usb/h/usb_quirks, dev/usb/h/usbhid, dev/usb/usbdevs, dev/usb/devlist2h.awk, dev/wscons/h/wsconsio, dev/wscons/h/wsmousevar - Updated to latest NetBSD versions
          dev/usb/c/usbroothub_subr, dev/usb/h/usbroothub_subr - New files brought in from NetBSD sources for use with new EHCI driver
          build/objehcidriver - Added usbroorhub_subr to EHCI driver
          dev/usb/h/usb_port - Added extra dummy functions as required by new EHCI driver
          dev/build/c/port - Added extra parameter to callout_init as required by new EHCI driver
        DeviceFS improvements:
          build/c/usbmodule - Added DeviceFSCallDevice_GetHandles2 as a replacement for Thomas Milius's backwards-incompatible GetHandles changes. Added DeviceFSCallDevice_GetSetOptions call to control RX padding and TX force-short-xfer features. These features can also be controlled at endpoint creation time by new fields in the filename. Also fixed packet padding to not fill the buffer with garbage or potentially crash when the padded area is more than one packet in length.
        New bus registration API:
          Changes made to the data structures that are shared between the modules means that new checks are needed to ensure USB modules with incompatible APIs are not used with one another.
          build/h/usbdivar - Since this seems to be the file containing the main structures that are shared, it now has a #define at the top indicating the first version of the USBDriver module that implemented the data structures within. This version number is used to check that the driver modules are compatible.
          build/cmhg/usbmodhead, build/h/usbdriver, build/c/usbmodule - Add a new SWI, USBDriver_Version, to return the version number of the USBDriver module. Used for both intra-stack API version checks and can be useful for external code that wants to query DeviceFS feature availability.
          build/c/usbmodule, build/c/ehcimodule, build/c/ohcimodule - Updated USBDriver_RegisterBus SWI and the code that calls it to pass the API version number (as defined in usbdivar.h) to USBDriver when attempting to reigster the bus. USBDriver then ensures the version matches that of itself, and if not refuses to allow the bus to register. EHCI & OHCI modules also check that USBDriver is new enough to implement this behaviour via the USBDriver_Version SWI.
        And finally:
          build/version - Incremented module version numbers.
          build/doc/usb - Updated with details of new features
      Admin:
        Tested in ROM softload on Iyonix & beagleboard. Beagleboard hub issues seem to be resolved, and there are no new bugs that I can see.
      
      
      Version 0.52. Tagged as 'NetBSD-0_52'
      eb6607d0
  8. 06 Sep, 2009 1 commit
    • Jeffrey Lee's avatar
      Add workaround for incorrect sizeof(usb_status_t), disable... · d2e1e243
      Jeffrey Lee authored
      Add workaround for incorrect sizeof(usb_status_t), disable debug_set_stamp_debug(TRUE) to fix interrupt issue
      
      Detail:
        build/c/ehcimodule, build/c/ohcimodule, build/c/usbmodule - Make sure that timestamped debug messages aren't used, as they appear to cause interrupts to be briefly enabled, which causes all kinds of problems in sensitive bits of the code.
        dev/usb/c/usbdi, dev/usb/c/usbdi_util, dev/usb/h/usb - Because DISABLE_PACKED is being used to compile the USB drivers, sizeof(usb_status_t) was being calculated as 4 bytes instead of 2. Somehow this works fine with the EHCI driver (and presumably the OHCI driver), but it was causing problems with the MUSBDriver, so a hardcoded size of 2 is now used.
      Admin:
        Tested on rev C2 beagleboard.
      
      
      Version 0.48. Tagged as 'NetBSD-0_48'
      d2e1e243
  9. 09 May, 2009 1 commit
    • Jeffrey Lee's avatar
      Add support for HAL enumerated USB EHCI controllers, use HAL_IRQClear when... · 49653fb9
      Jeffrey Lee authored
      Add support for HAL enumerated USB EHCI controllers, use HAL_IRQClear when clearing EHCI/OHCI controller interrupts
      
      Detail:
        * HAL enumeration of EHCI controllers is performed in the same manner as for OHCI, and protected by #ifdef RHENIUM. HAL_USBControllerInfo must return with the usbinfo type field set to 1 to indicate EHCI.
        * HAL_IRQClear is now called by the EHCI & OHCI modules after clearing the interrupt flag in the USB controller, to allow the HAL to reset the interrupt controller if required (e.g. for OMAP3)
        * EHCI module (for HAL EHCI controllers) now has the option of forcing all EHCI register access to be 32bit size & alignment (requirement is indicated in OMAP3 TRM, although USB did seem to function fine without)
        build/c/ehcimodule - Add enumeration of HAL USB controllers. Add support for forcing all EHCI register access to be 32bit size & alignment. Add riscos_irqclear() implementation. Guard against unexpected behaviour if PCI module isn't present.
        build/c/ohcimodule - Add riscos_irqclear() implementation. Guard against unexpected behaviour if PCI module isn't present.
        dev/usb/c/ehci, dev/usb/c/ohci - call riscos_irqclear() when appropriate
        dev/usb/h/usb_port - riscos_irqclear() prototype
      Admin:
        Tested on rev C2 beagleboard. Untested on Iyonix, but should be fine.
      
      
      Version 0.47. Tagged as 'NetBSD-0_47'
      49653fb9
  10. 22 Feb, 2006 1 commit
    • John Ballance's avatar
      Replaced ep resync mechanism in usb_subr · 49639dac
      John Ballance authored
      Detail:
      	in recent work endpoint resync mechanism in usb_subr
      	was removed to re-align better with current NetBSD
      	sources.. however without the mechanism Epson
      	scanners fail to do repeat scans/
      Admin:	Castle added IP
      
      
      Version 0.46. Tagged as 'NetBSD-0_46'
      49639dac
  11. 05 Jan, 2006 1 commit
  12. 30 Dec, 2005 1 commit
    • Dan Ellis's avatar
      Now handles interrupt out transfers · 3f595ef2
      Dan Ellis authored
      Detail:
        There were many places where this was broken: the devicefs
      interface was always starting off a read regardless of
      whether it was an IN or OUT transfer, usbdi.c was setting
      OUT interrupt transfers as repeating, which doesn't make sense,
      and ohci.c was always making interrupt transfers OUT (this is
      fixed in the latest BSD sources). Also the code which
      unhalts endpoints at start of day has been removed, as this is
      no longer in the BSD sources having been removed after it was
      seend to have caused problems.
      
      Admin:
        Tested with a CATC analyzer on an AverMedia FM radio. If now
      operates properly with the code from Dave Higton.
      
      Version 0.43. Tagged as 'NetBSD-0_43'
      3f595ef2
  13. 18 May, 2005 1 commit
    • John Ballance's avatar
      several changes and nullpointer bug fixes · 49da0634
      John Ballance authored
      Detail:
      	Includes several bug fixes and null pointer traps.
      	Rhenium version reviewed and reset should be improved.
      Admin:
      	Tested in rhenium desktop build and iyonix build at castle
         	Castle added IP
      
      
      Version 0.40. Tagged as 'NetBSD-0_40'
      49da0634
  14. 24 Apr, 2005 1 commit
    • John Ballance's avatar
      Update of NetBSD elements (except c.ohci) to track NetBSD current from mid April 2005. · 8f8a1be7
      John Ballance authored
      	Inclusion of Mods to c.ehci (from Dan) to correctly handle low
      	speed interrupt devices beyond USB2 hubs (i.e. keyboards and mice).
      	Mod to EHCI resetting in service call handler to better cope with
      	USBDriver being restarted 'underneath' it.
      Detail:
      Admin:
      	Castle, Dan Ellis, NetBSD added IP. Tested at Castle. Will be
      	beta tested at this revision level before full release.
      
      
      Version 0.39. Tagged as 'NetBSD-0_39'
      8f8a1be7
  15. 05 Mar, 2005 1 commit
  16. 24 Feb, 2005 1 commit
    • John Ballance's avatar
      2 specific changes to USBDriver module · 6a08f2c6
      John Ballance authored
              Added (and fixed code underlying) to give periodic
              explore of USB busses (cf NetBSD).
              Added USBDisover command to let user provoke this too.
              Reworked USB device number allocation to roll
              around at 999 to avoid field overflow in
              a number of places.
      Detail:
      Admin:  castle added IP. to be beta tested on beta test site
      
      
      Version 0.37. Tagged as 'NetBSD-0_37'
      6a08f2c6
  17. 23 Feb, 2005 1 commit
    • John Ballance's avatar
      An increased delay caused havoc with chicony keyboards in the field · ec61c0b1
      John Ballance authored
      Detail:
              USB_PORT_RESET_DELAY had been increased from 100 to 200ms in previous
              version. This was OK for most devices, and beneficial for some, BUT
              killed the Chicony keyboards shipped with many iyonix.. Delay has
              been reverted to 100ms, and is now run time alterable via the
              USB$PortResetDelay sysvar. This problem did not show up in beta testing!
      
      Admin:  tested by JB with chicony.. delays up to around 160ms work with
              the chicony.
              Castle added IP
      
      Version 0.36. Tagged as 'NetBSD-0_36'
      ec61c0b1
  18. 18 Feb, 2005 1 commit
    • John Ballance's avatar
      changes and bug fixes that came to light following USB2 launch. · 85cb0bb5
      John Ballance authored
      Detail:
               - VarVal launching.. string length was incorrectly calculated.
               - USB VarVals now correctly cleared if device failed during
                 enumeration, after first SetVarVal call.
               - Triggercbs() modified to check interrupt context and be
                 refuse (quietly) to trigger callbacks if interrupts threaded
                 (result of possible issue .. but perhaps wise)
               - Added third QueryDelay variable, and an Info file to describe
                 what does what.
      Admin:
               checked at Castle.. due for extended check via beta test site
               before formal release.
      
               Castle + D Ellis added IP
      
      
      Version 0.35. Tagged as 'NetBSD-0_35'
      85cb0bb5
  19. 31 Jan, 2005 1 commit
  20. 21 Jan, 2005 1 commit
    • John Ballance's avatar
      Stack brought up to date with NetBSD sources as at 20050121. · af0b10a5
      John Ballance authored
              USB2 further debugged.
      Detail:
              Check in prior to second beta release. Improvements also to
              softloading of replacement modules.
      Admin:
              Checked with JB .. further crosschecking is still needed for rhenium.
              Castle/D Ellis added ip from NetBSD sources
      
      
      Version 0.33. Tagged as 'NetBSD-0_33'
      af0b10a5
  21. 03 Jan, 2005 1 commit
  22. 30 Dec, 2004 1 commit
    • John Ballance's avatar
      Update of EHCIDriver to current NetBSD, together with needed changes in both... · 480e14ee
      John Ballance authored
      Update of EHCIDriver to current NetBSD, together with needed changes in both OHCIDriver and USBDriver.
      
      Detail:
              Code may change before formal release .. will be beta released
              ... Entered to CVS to get new version numbers, and for
              the record.
      Admin:
              Castle/netbsd added IP .. will be tested more fully before
              formal release. Still to be verified on Rhenium.
      
      
      Version 0.31. Tagged as 'NetBSD-0_31'
      480e14ee
  23. 12 Aug, 2004 1 commit
    • John Ballance's avatar
      Extensive changes and bug fixes to usb and ohci .. · e9f0e9c8
      John Ballance authored
        'blocked' several holes that could cause freezes with awkward
        usb devices.  Added latest changes from Dan Ellis too , especially for USB2
      Detail:
       many
      Admin:
       Tested in ROM at Castle, and beta tested with users
      
      
      Version 0.28. Tagged as 'NetBSD-0_28'
      e9f0e9c8
  24. 01 Jul, 2004 1 commit
  25. 30 Jun, 2004 1 commit
  26. 06 May, 2004 1 commit
    • Ben Avison's avatar
      New versions from John. · 833bc3d0
      Ben Avison authored
      Detail:
        * All modules will now rmkill/rmload more reliably
        * Keyboard driver disables kernel debounce on new enough kernels, needed
          for many PS2-USB adaptors, bar code scanners etc
        * Mouse driver will scroll wheel scroll any windows that do respond to
          scroll events, otherwise it issues PointerReason_WheelChange (9) to an
          external WimpScroll module
        * Several bugs and an interrupt hole resolved
      Admin:
        Tested at Framlingham.
      
      Version 0.25. Tagged as 'NetBSD-0_25'
      833bc3d0
  27. 16 Feb, 2004 1 commit
  28. 21 Jan, 2004 2 commits
    • Ben Avison's avatar
      Merge of Dan Ellis's USB2 sources. · bad89421
      Ben Avison authored
      Version 0.22. Tagged as 'NetBSD-0_22'
      bad89421
    • Ben Avison's avatar
      Changes to work with TCPIPLibs 5.47. · 778cee75
      Ben Avison authored
      Detail:
        NetBSD/FreeBSD differences in the naming of certain macros are now resolved
        in TCPIPLibs instead of locally. Also some reordering in the !Mk files in
        order to work with current versions of Zap.
      Admin:
        Builds against TCPIPLibs 5.47. Note that this version of the USB sources
        also now requires TCPIPLibs 5.47.
      
      Version 0.21. Tagged as 'NetBSD-0_21'
      778cee75
  29. 03 Jun, 2003 1 commit
  30. 23 May, 2003 1 commit
    • Ben Avison's avatar
      Added new CallDevice reason code (&80000005) to clear a stall condition on a... · 9b1dc296
      Ben Avison authored
      Added new CallDevice reason code (&80000005) to clear a stall condition on a pipe with a given FileSwitch handle
      
      New usbdevs and usbdevs_data from NetBSD
      Rewrote power source detection to skirt round dodgy devices which say
      they're self powered,set MaxPower=0,and don't respond to a getstatus()
      Copes better with devices being unplugged while a transfer using them is active
      
      Version 0.17. Tagged as 'NetBSD-0_17'
      9b1dc296
  31. 14 May, 2003 1 commit
    • Ben Avison's avatar
      Support for SCSISoftUSB, and some tidying up. · 27401fc0
      Ben Avison authored
      Detail:
        * Errors now use the allocated error number base, &819000, instead of a
          base in the private range, &50000000. "USB transfer failed" errors now
          have use a sub-range of error numbers from &819020; the original BSD
          error number can be retrieved from the bottom 5 bits of the RISC OS
          error number.
        * Service_USB 1 now returns the list in the order in which the devices,
          rather than in the reverse order as previous versions of the module did.
        * A little tweaking of h/usb_port to reduce compiler warnings.
        * Some compiler-satisfying changes to allow use of packed structures.
          (However, the compiler doesn't seem to work correctly yet, so this is
          currently switched out using -DDISABLE_PACKED on the command line.)
        * Added full stops to end of star command help strings for consistency
          with rest of OS.
        * New exports: USBDevFS (moved here from ^.h) and a few files in dev/usb/h
          and sys/h.
      Admin:
        Error number overhaul and new exports are both required by SCSISoftUSB.
      
      Version 0.16. Tagged as 'NetBSD-0_16'
      27401fc0
  32. 15 Apr, 2003 1 commit
  33. 11 Apr, 2003 1 commit
  34. 28 Jan, 2003 1 commit