Skip to content

Commit 7211dd1

Browse files
committed
more dcache fix
1 parent 5dae5e1 commit 7211dd1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/portable/ehci/ehci.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,19 @@ static void list_remove_qhd_by_daddr(ehci_link_t* list_head, uint8_t dev_addr) {
273273
}
274274

275275
// Close all opened endpoint belong to this device
276-
void hcd_device_close(uint8_t rhport, uint8_t dev_addr)
276+
void hcd_device_close(uint8_t rhport, uint8_t daddr)
277277
{
278278
// skip dev0
279-
if (dev_addr == 0) {
279+
if (daddr == 0) {
280280
return;
281281
}
282282

283283
// Remove from async list
284-
list_remove_qhd_by_daddr((ehci_link_t *) qhd_async_head(rhport), dev_addr);
284+
list_remove_qhd_by_daddr((ehci_link_t *) qhd_async_head(rhport), daddr);
285285

286286
// Remove from all interval period list
287287
for(uint8_t i = 0; i < TU_ARRAY_SIZE(ehci_data.period_head_arr); i++) {
288-
list_remove_qhd_by_daddr((ehci_link_t *) &ehci_data.period_head_arr[i], dev_addr);
288+
list_remove_qhd_by_daddr((ehci_link_t *) &ehci_data.period_head_arr[i], daddr);
289289
}
290290

291291
// Async doorbell (EHCI 4.8.2 for operational details)
@@ -453,7 +453,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
453453
list_insert(list_head, (ehci_link_t*) p_qhd, EHCI_QTYPE_QHD);
454454

455455
hcd_dcache_clean(p_qhd, sizeof(ehci_qhd_t));
456-
hcd_dcache_clean(list_head, sizeof(ehci_link_t));
456+
hcd_dcache_clean(list_head, sizeof(ehci_qhd_t));
457457

458458
return true;
459459
}

0 commit comments

Comments
 (0)