Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libusb 1.0+0.1 resync from master as of 2021-12-21 #1234

Merged
merged 59 commits into from
Dec 23, 2021

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Dec 21, 2021

Bringing libusb-1.0 and libusb-1.0+0.1 branches to another level of common baseline, to simplify subsequent PRs for eventual merge of the feature to master for #300.

Note: For finishing touches, https://github.com/networkupstools/nut/tree/fightwarn-libusb-1.0+0.1 will be merged into this target branch next.

clepple and others added 30 commits May 24, 2018 09:07
Signed-off-by: Mauro Guerrera <[email protected]>
Clarify SNMP auth/priv proto support depends on Net-SNMP lib
Clarify SNMP auth/priv proto support depends on Net-SNMP lib
At least one UPS [APC Back-UPS BX1600MI FW:294201G -302201G] is known
to have encoding errors in its USB HID report description such that a
conforming interpretation of the encoded LogicalMaximum value
indicates that it is -1 and the resulting LogicalMin..LogicalMax range
is 0..-1.

The actual report values read are correctly encoded.  Rather than log
a range error each time a value is read we can detect the encoding
error when the report description is read (once, at startup) and
adjust for the encoding error at that time.
For some devices, missing instcmds are emulated by calling two
instcmds that do exist in sequence. For some devices, when these
commands arrive too quickly, they are not properly processed. (One,
both, or neither of the commands are acted upon.)

Adding a 1/8th-second delay (125,000 microseconds) between the two
instcmds that make up the fallback command has worked to make the
TrippLite AVR750U (new version with the 3024 productId/protocol)
behave consistently when using the fallback commands (shutdown.return
and shutdown.stayoff). This delay is also short enough that it seems
unlikely to cause a problem for any devices which don't exhibit
this issue.
Fix whitespace in recent changes for LogMin/LogMax rectification
Older compilers complain that we are:

    passing argument 3 of 'usb_interrupt_read' from incompatible pointer type
    expected 'char *' but argument is of type 'char (*)[512]'
Add VID/PID for Minuteman UPS
…d scenarios, they are too noisy in fightwarn for no real good
…ys, but without "pedantic" for C89/C90/ANSI builds (flaws in OS headers are out of our control)
…gs without "pedantic" for C89/C90/ANSI builds (flaws in OS headers are out of our control)
…_item_buffered(): fix "age" from int to time_t, to match time() operations
@jimklimov jimklimov added USB CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) labels Dec 21, 2021
@jimklimov jimklimov merged commit f3cf4ed into networkupstools:libusb-1.0+0.1 Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) USB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants