Introduce basic USB related header files.#975
Merged
cahirwpz merged 3 commits intocahirwpz:masterfrom Mar 14, 2021
Merged
Conversation
cahirwpz
reviewed
Feb 8, 2021
Owner
cahirwpz
left a comment
There was a problem hiding this comment.
All remarks for scsi.h file apply to other header files as well.
Collaborator
Author
|
I've described the presented changes to the original files (see the PR's description). |
pj1031999
reviewed
Mar 5, 2021
cahirwpz
approved these changes
Mar 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The presented header files are required by #935.
Presented changes (regarding original files):
scsi.h:lengthandaddrfields aren't expressed in byte units (i.e. instead ofuint8_t addr[4]we haveuint32_t addr). This simplifies little endian <-> big endian conversions.SID_FORMAT()macro (used in drive identification).uhci.h: this is simply a subset of the original file (with a few stylistic changes).uhcireg.h:PCI_USB_CLASSCODEandPCI_USB_SUBCLASSCODE.UHCI_PORTSC()instead ofUHCI_PORTSC{1,2}(The UHCI specification allows more than two root hub ports).UHCI_PORTSC_ONEwhich is used in root hub port detection (I don't assume any specific number of root hub ports).umass.h: this file doesn't have a strict counterpart in the FreeBSD source tree. Contained definitions were extracted form the FreeBSD'ssys/dev/usb/storage/umass.cfile. This is in order to make theumass.cdriver thinner and to contain some definitions required by the USB module (UR_BBB_RESETandUR_BBB_GET_MAX_LUN).usbhid.h: this is simply a subset of the original file (without the HID descriptor parsing definitions (we assume the boot protocol is supported)).usb.h:UV_MAKE()macro (they use some counterpart defined elsewhere).US_DATASIZEconstant (they use a magic number).US_ENG_LIDandUS_ENG_STRconstants.US_TRANSFER_TYPE()macro.