diff options
| author | Ryzee119 <[email protected]> | 2022-08-15 17:40:59 +0930 |
|---|---|---|
| committer | Ryan Wendland <[email protected]> | 2022-08-16 18:25:46 +0930 |
| commit | 2b2354d3021202f0b88d17b9356ff924cb01e45f (patch) | |
| tree | 60bc1bd81a291bc666d1c03d9e0973ae98656e47 | |
| parent | 3c7b5dcaffb9ccc81e700d5b0b212e897b4b9b0d (diff) | |
Hub: Clear other port feature changes
| -rw-r--r-- | src/host/hub.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/host/hub.c b/src/host/hub.c index 99c629071..3da5358b2 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -408,7 +408,24 @@ static void hub_port_get_status_complete (tuh_xfer_t* xfer) hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_CONNECTION_CHANGE, connection_clear_conn_change_complete, 0); }else { - // Other changes are: Enable, Suspend, Over Current, Reset, L1 state + // Clear other port status change interrupts. TODO Not currently handled - just cleared. + if (p_hub->port_status.change.port_enable) + { + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_ENABLE_CHANGE, hub_clear_feature_complete_stub, 0); + } + else if (p_hub->port_status.change.suspend) + { + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_SUSPEND_CHANGE, hub_clear_feature_complete_stub, 0); + } + else if (p_hub->port_status.change.over_current) + { + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_OVER_CURRENT_CHANGE, hub_clear_feature_complete_stub, 0); + } + else if (p_hub->port_status.change.reset) + { + hub_port_clear_feature(daddr, port_num, HUB_FEATURE_PORT_RESET_CHANGE, hub_clear_feature_complete_stub, 0); + } + // Other changes are: L1 state // TODO clear change // prepare for next hub status |
