Skip to content

Commit e89e8ba

Browse files
committed
ohci: Direct port commands to the correct rhport.
1 parent 5d3c0fb commit e89e8ba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/portable/ohci/ohci.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ uint32_t hcd_frame_number(uint8_t rhport)
234234
//--------------------------------------------------------------------+
235235
void hcd_port_reset(uint8_t hostid)
236236
{
237-
(void) hostid;
238-
OHCI_REG->rhport_status[0] = RHPORT_PORT_RESET_STATUS_MASK;
237+
OHCI_REG->rhport_status[hostid] = RHPORT_PORT_RESET_STATUS_MASK;
239238
}
240239

241240
void hcd_port_reset_end(uint8_t rhport)
@@ -245,14 +244,12 @@ void hcd_port_reset_end(uint8_t rhport)
245244

246245
bool hcd_port_connect_status(uint8_t hostid)
247246
{
248-
(void) hostid;
249-
return OHCI_REG->rhport_status_bit[0].current_connect_status;
247+
return OHCI_REG->rhport_status_bit[hostid].current_connect_status;
250248
}
251249

252250
tusb_speed_t hcd_port_speed_get(uint8_t hostid)
253251
{
254-
(void) hostid;
255-
return OHCI_REG->rhport_status_bit[0].low_speed_device_attached ? TUSB_SPEED_LOW : TUSB_SPEED_FULL;
252+
return OHCI_REG->rhport_status_bit[hostid].low_speed_device_attached ? TUSB_SPEED_LOW : TUSB_SPEED_FULL;
256253
}
257254

258255
// endpoints are tied to an address, which only reclaim after a long delay when enumerating

0 commit comments

Comments
 (0)