Actions
Bug #14370
openusb_hub implementation states collide with usb 3.0 port status bits
Status:
New
Priority:
Normal
Assignee:
-
Category:
driver - device drivers
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
The h_port_state
field of hubd_t
is meant to mirror the hw port state of a USB device. Currently our implementation defines some private bits:
/*
* port flags : These are essentially extensions of Port Status Field Bits
* as in USB 2.0 spec Table 11-21 and #defined in hubd.h file. We make use
* of the unused bits (5-7,13-15) here to track states of the hub's child.
*/
#define HUBD_CHILD_ATTACHING 0x0020
#define HUBD_CHILD_DETACHING 0x0040
#define HUBD_CHILD_PWRLVL_CHNG 0x0080
#define HUBD_CHILD_RAISE_POWER 0x2000
#define HUBD_CHILD_ZAP 0x4000
With USB 3.0 however, several of these bits unused in USB 2.0 are now used in USB3.0 specifically:
PORT_CHANGE_BHPR
, PORT_CHANGE_PLSC
, and PORT_CHANGE_PCE
.
By what appears to be pure luck, this hasn't caused any problems to date, but it seems like a hard-to-diagnose problem in waiting. We should just move the HUBD_*
flags into their own field in hubd_t
.
No data to display
Actions