Difference between revisions of "USB Stack"

From ReactOS Wiki
Jump to: navigation, search
m
m
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
The [[USB]] stack is the component which provides the communication between [[USB]] devices and their respective drivers and applications. It consists of multiple files, each with a distinct function. The [[USB]] stack in [[ReactOS]] is currently limited. This page documents the development of the new [[USB]] stack. Development work on a [[USB]] 3 stack is in progress.
+
The [[USB]] stack is the component that provides the communication between [[USB]] devices and their respective drivers and applications. It consists of multiple files, each with a distinct function. The [[USB]] stack in [[ReactOS]] is currently limited. This page documents the development of the new [[USB]] stack. Development work on a [[USB]] 3 stack is in progress.
  
 
'''NOTE: There is a known issue with booting [[ReactOS]] from the internal HDD with a [[USB]] storage device connected which causes ROS to lose the boot device. Until this problem is fixed or a workaround is developed, please unplug any [[USB]] storage devices during boot!'''
 
'''NOTE: There is a known issue with booting [[ReactOS]] from the internal HDD with a [[USB]] storage device connected which causes ROS to lose the boot device. Until this problem is fixed or a workaround is developed, please unplug any [[USB]] storage devices during boot!'''
 
  
 
== Overview ==
 
== Overview ==
 
The goal is to develop a [[USB]] stack which:
 
The goal is to develop a [[USB]] stack which:
* is [[USB]] 1.1 - 2.0 compliant
+
* is USB 1.1 2.0 compliant
* uses [[WDM]] (NT 5) API
+
* uses WDM (NT 5) API
* is compatible with all [[USB]] devices and drivers (which adhere to the standard)
+
* is compatible with all USB devices and drivers (which adhere to the standard)
  
 
The entire stack will be fully documented and the implementation progress detailed on this page.
 
The entire stack will be fully documented and the implementation progress detailed on this page.
  
 
== Goals ==
 
== Goals ==
* Primary Goal: [[USBHID]] (human input devices) and storage functionality working (Alpha).
+
* Primary Goal: USBHID (human input devices) and storage functionality working (Alpha).
 
* Secondary Goal: Audio and other support added.
 
* Secondary Goal: Audio and other support added.
 
* Beyond: testing and debugging.
 
* Beyond: testing and debugging.
Line 20: Line 19:
  
 
== Status ==
 
== Status ==
=== [[USB]] Core Status ===
+
=== USB Core Status ===
* There are 2 [[USB]] specifications for the [[USB]] 1.1 standard. Devices which are used in this standard are mice, keyboards, etc.
+
* There are 2 USB specifications for the USB 1.1 standard. Devices that are used in this standard are mice, keyboards, etc.
** [[OHCI]] (Open Host Controller Interface Standard) - All transfers types are implemented (bulk, iso, control, interrupt)
+
** [[OHCI]] (Open Host Controller Interface Standard) All transfers types are implemented (bulk, iso, control, interrupt)
** [[UHCI]] (Universal Host Controller Interface Standard) - Totally missing. Though it should be do-able to use ohci driver as a base and use [http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/busses/USB/uhci.cpp Haiku driver]
+
** [[UHCI]] (Universal Host Controller Interface Standard) Totally missing. Though it should be do-able to use OHCI driver as a base and use [http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/busses/usb/uhci.cpp Haiku driver]
* [[EHCI]] (Enhanced Host Controller Interface) - Implemented transfer types: bulk & control. Interrupt & Isochronous transfers are not implemented. Due to the missing transfer types, devices who utilize those transfer types will not be available.
+
* [[EHCI]] (Enhanced Host Controller Interface) Implemented transfer types: bulk & control. Interrupt & Isochronous transfers are not implemented. Due to the missing transfer types, devices who utilize those transfer types will not be available.
* [[USBHUB]] - driver for managing port and hubs - Implementation state is unknown - michel martin has more information on that
+
* USBHUB driver for managing port and hubs Implementation state is unknown – Michel Martin has more information on that
  
=== [[USB]] Mass Storage Support Status ===
+
=== USB Mass Storage Support Status ===
[[USB]] Mass Storage is implemented in [[USBSTOR]] driver and is fully working. Tested in WinXP + [[EHCI|USBEHCI]] + [[USBSTOR]]. Mass storage support requires bulk and control transfers, which are implemented in [[EHCI|USBEHCI]]].
+
[http://www.eltima.com/share-usb-drive-over-network/ USB Mass Storage] is implemented in [[USBSTOR]] driver and is fully working. Tested in WinXP + [[EHCI|USBEHCI]] + [[USBSTOR]]. Mass storage support requires bulk and control transfers, which are implemented in [[EHCI|USBEHCI]].
  
=== [[HID]] Status ===
+
=== HID Status ===
The [[HID]] framework is built on 5 drivers
+
The HID framework is built on 5 drivers
  
* [[HIDUSB]] - this is the interface driver for the [[USB]] bus. Currently supported devices are mice. Basic keyboard support should also work currently.
+
* HIDUSB this is the interface driver for the USB bus. Currently supported devices are mice. Basic keyboard support should also work currently.
* [[HIDCLASS]] - this is the class driver for [[HIDUSB]] and others. Functionality for mice & keyboard is implemented, though support for sending output reports is not implemented.
+
* HIDCLASS this is the class driver for HIDUSB and others. Functionality for mice & keyboard is implemented, though support for sending output reports is not implemented.
* [[MOUHID]] - mouse function driver for [[USB]] hid standard - Fully implemented and working.
+
* [[MOUHID]] mouse function driver for USB hid standard Fully implemented and working.
* [[KBDHID]] - keyboard function driver for the hid standard - 90% implemented, needs KbdHid_InsertScanCodes implemented for keyboard scan code dispatching to kbdclass and led status indicator support (which requires sending output reports).
+
* [[KBDHID]] keyboard function driver for the hid standard 90% implemented, needs KbdHid_InsertScanCodes implemented for keyboard scan code dispatching to kbdclass and led status indicator support (which requires sending output reports).
* [[HIDPARSE]] - driver for parsing report descriptors - functionality implemented for mice, keyboard support needs HidParser_TranslateUsage fully implemented for modifier state (caps lock, num lock, scroll lock).
+
* HIDPARSE driver for parsing report descriptors functionality implemented for mice, keyboard support needs HidParser_TranslateUsage fully implemented for modifier state (caps lock, num lock, scroll lock).
  
=== What works and not ===
+
=== What already works ===
* Mouse support has been tested in WinXP with ReactOS [[OHCI|USBOHCI]] + [[HIDUSB]] + [[HIDCLASS]] + [[MOUHID]] + [[HIDPARSE]] and is working. The [[USB]] + [[HID]] stack also works in ReactOS.
+
* Mouse support has been tested in WinXP with ReactOS [[OHCI|USBOHCI]] + HIDUSB + HIDCLASS + [[MOUHID]] + HIDPARSE and is working. The USB + HID stack also works in ReactOS.
* Basic Keyboard support need a 2/3 functions implemented (coming soon).
+
* Basic Keyboard support is nearly ready.
* [[USB]] Mass storage support - Needs mountmgr / partmgr driver implemented. Will also need mountvol and other missing PnP stuff. Update: http://img687.imageshack.us/img687/3223/rosUSB2.png
+
* USB Mass storage support Needs mountmgr / partmgr driver implemented. Will also need mountvol and other missing PnP stuff. - needs a few more issues to be resolved
- needs a few more issues to be resolved
 
  
 
== See Also ==
 
== See Also ==
[[USB Stack Template]]
+
* [[Supported USB Devices]]
 
+
* [[LiveUSB|LiveUSB - Booting from a USB disk]]
[[Supported_USB_Devices|Supported USB Devices]]
+
* [[User:Illen/RAM_Boot|USB RAM Boot]]
 
+
* [[USB Testing]]
[[USB_Todo|USB Todo List]]
 
  
[[USB_Stack_Template|USB Stack Template]]
+
== Links ==
 +
* [https://web.archive.org/web/20141127220403/http://old.reactos.org/en/newsletter_56.html#sec0 History of USB in ReactOS] April 9th, 2009
 +
* [https://web.archive.org/web/20141127220416/http://old.reactos.org/en/newsletter_71.html#sec0 More news about USB] April 22nd, 2010
 +
* [https://web.archive.org/web/20141127220422/http://old.reactos.org/en/newsletter_83.html#sec1 New USB Drivers] April 28th, 2011
 +
* [https://web.archive.org/web/20130524183039/http://old.reactos.org/en/newsletter_90.html#sec1 Two of Four host controller interface drivers completed] January 23rd, 2012
 +
* [http://www.reactos.org/forum/viewtopic.php?f=2&t=10835 USB Working] January 26, 2012
 +
* [http://www.reactos.org/forum/viewtopic.php?f=15&t=10909 USB branch merged at r55555] February 12th, 2012
 +
* [https://web.archive.org/web/20141127220416/http://old.reactos.org/en/newsletter_91.html#sec3 USB branch merged with trunk] February 28th, 2012
  
 
== References ==
 
== References ==
* [http://www.USB.org/developers/docs/ USB.org specifications]
+
* [https://www.usb.org/documents USB.org specifications]
* [http://xenbits.xensource.com/ext/win-pvdrivers.hg XEN PV USB Drivers]
+
* [http://xenbits.xensource.com/ext/win-pvdrivers/ XEN PV USB Drivers]
* [http://msdn.microsoft.com/en-us/library/ff537858.aspx Roadmap for Developing USB Drivers]
+
* [http://msdn.microsoft.com/en-us/library/ff537858.aspx Roadmap for Developing USB Drivers] ([https://web.archive.org/web/20110129175055/http://msdn.microsoft.com:80/en-us/library/ff537858(v=VS.85).aspx Archived])
 
* Windows Driver Kit (Driver Development Kit)
 
* Windows Driver Kit (Driver Development Kit)
* [http://www.microsoft.com/whdc/archive/USB2support.mspx?pf=true USB Driver Stack for Windows XP and later]
+
* [http://www.microsoft.com/whdc/archive/USB2support.mspx?pf=true USB Driver Stack for Windows XP and later] ([https://web.archive.org/web/20110324034537/http://msdn.microsoft.com/en-us/windows/hardware/gg463432.aspx Archived])
* [http://msdn.microsoft.com/en-us/library/ff539301.aspx USB Device Stack for Windows XP and later]
+
* [http://msdn.microsoft.com/en-us/library/ff539301.aspx USB Device Stack for Windows XP and later] ([https://web.archive.org/web/20101029005631/http://msdn.microsoft.com/en-us/library/ff539301(VS.85).aspx Archived])
* [http://www.intel.com/technology/USB/download/xHCI_Specification_for_USB.pdf USB 3.0 xHCI specifications]
+
* [https://www.intel.com/content/www/us/en/products/docs/io/universal-serial-bus/ehci-specification-for-usb.html USB 3.0 xHCI specifications]
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
[[Category:ReactOS_Components]]
+
[[Category:ReactOS Components]]

Latest revision as of 01:55, 1 December 2020

The USB stack is the component that provides the communication between USB devices and their respective drivers and applications. It consists of multiple files, each with a distinct function. The USB stack in ReactOS is currently limited. This page documents the development of the new USB stack. Development work on a USB 3 stack is in progress.

NOTE: There is a known issue with booting ReactOS from the internal HDD with a USB storage device connected which causes ROS to lose the boot device. Until this problem is fixed or a workaround is developed, please unplug any USB storage devices during boot!

Overview

The goal is to develop a USB stack which:

  • is USB 1.1 – 2.0 compliant
  • uses WDM (NT 5) API
  • is compatible with all USB devices and drivers (which adhere to the standard)

The entire stack will be fully documented and the implementation progress detailed on this page.

Goals

  • Primary Goal: USBHID (human input devices) and storage functionality working (Alpha).
  • Secondary Goal: Audio and other support added.
  • Beyond: testing and debugging.

Due to the complexity and size, no release dates will be provided as of now.

Status

USB Core Status

  • There are 2 USB specifications for the USB 1.1 standard. Devices that are used in this standard are mice, keyboards, etc.
    • OHCI (Open Host Controller Interface Standard) – All transfers types are implemented (bulk, iso, control, interrupt)
    • UHCI (Universal Host Controller Interface Standard) – Totally missing. Though it should be do-able to use OHCI driver as a base and use Haiku driver
  • EHCI (Enhanced Host Controller Interface) – Implemented transfer types: bulk & control. Interrupt & Isochronous transfers are not implemented. Due to the missing transfer types, devices who utilize those transfer types will not be available.
  • USBHUB – driver for managing port and hubs – Implementation state is unknown – Michel Martin has more information on that

USB Mass Storage Support Status

USB Mass Storage is implemented in USBSTOR driver and is fully working. Tested in WinXP + USBEHCI + USBSTOR. Mass storage support requires bulk and control transfers, which are implemented in USBEHCI.

HID Status

The HID framework is built on 5 drivers

  • HIDUSB – this is the interface driver for the USB bus. Currently supported devices are mice. Basic keyboard support should also work currently.
  • HIDCLASS – this is the class driver for HIDUSB and others. Functionality for mice & keyboard is implemented, though support for sending output reports is not implemented.
  • MOUHID – mouse function driver for USB hid standard – Fully implemented and working.
  • KBDHID – keyboard function driver for the hid standard – 90% implemented, needs KbdHid_InsertScanCodes implemented for keyboard scan code dispatching to kbdclass and led status indicator support (which requires sending output reports).
  • HIDPARSE – driver for parsing report descriptors – functionality implemented for mice, keyboard support needs HidParser_TranslateUsage fully implemented for modifier state (caps lock, num lock, scroll lock).

What already works

  • Mouse support has been tested in WinXP with ReactOS USBOHCI + HIDUSB + HIDCLASS + MOUHID + HIDPARSE and is working. The USB + HID stack also works in ReactOS.
  • Basic Keyboard support is nearly ready.
  • USB Mass storage support – Needs mountmgr / partmgr driver implemented. Will also need mountvol and other missing PnP stuff. - needs a few more issues to be resolved

See Also

Links

References