diff options
author | Vadim Mikhailov <mvp@users.noreply.github.com> | 2017-06-12 15:09:17 -0700 |
---|---|---|
committer | Vadim Mikhailov <mvp@users.noreply.github.com> | 2017-06-13 09:30:29 -0700 |
commit | c3da09da55e1919c875b45b9aa05bf38593ffbcd (patch) | |
tree | febcbb55ee5b341bd2d8f104b0d2b4697e523f3c | |
parent | 3ef7749d7655cd9f43e5650f23bd106903df5f98 (diff) |
Relax OCPM check to enable Raspberry Pi support
We only really require LPSM supported per port.
OCPM can be supported per port or ganged.
This is necessary to support Raspberry Pi.
Bump version to 1.7.
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | uhubctl.c | 7 |
2 files changed, 6 insertions, 4 deletions
@@ -32,8 +32,9 @@ This is list of known compatible USB hubs: | Lenovo | ThinkPad EU Ultra Dockingstation (40A20090EU) |`17EF:100F`| 2015 | | | Lenovo | ThinkPad X200 Ultrabase 42X4963 |`17EF:1005`| 2008 | 2011 | | Linksys | USB2HUB4 | | 2004 | 2010 | -| Microchip | EVB-USB2517 | | 2012 | | +| Microchip | EVB-USB2517 | | 2008 | | | Plugable | USB2-HUB10S | | 2010 | | +| Raspberry Pi | Model B+, Model 2 B, Model 3 B | | 2011 | | | Rosewill | RHUB-210 |`0409:005A`| 2011 | 2014 | | Sanwa Supply | USB-HUB14GPH | | 2001 | 2003 | | Sunix | SHB4200MA |`0409:0058`| 2006 | 2009 | @@ -9,7 +9,7 @@ * */ -#define PROGRAM_VERSION "1.6" +#define PROGRAM_VERSION "1.7" #include <stdio.h> #include <stdlib.h> @@ -211,9 +211,10 @@ int is_smart_hub(struct libusb_device *dev, int min_current) int lpsm = uhd->wHubCharacteristics[0] & HUB_CHAR_LPSM; /* Over-Current Protection Mode */ int ocpm = uhd->wHubCharacteristics[0] & HUB_CHAR_OCPM; - /* Both LPSM and OCPM must be supported per-port: */ + /* LPSM must be supported per-port, and OCPM per port or ganged */ if ((lpsm == HUB_CHAR_INDV_PORT_LPSM) && - (ocpm == HUB_CHAR_INDV_PORT_OCPM)) + (ocpm == HUB_CHAR_INDV_PORT_OCPM || + ocpm == HUB_CHAR_COMMON_OCPM)) { rc = uhd->bNbrPorts; /* Internal hubs have zero bHubContrCurrent. |