Skip to content

Commit 09daa5d

Browse files
committed
Avoid rshim1 on DPU-BMC
Traditionally rshim driver maintains the USB device name so after USB hotplug it could come back with the same rshim id. There's a recent change in DPU-BMC to support both UHCI and EHCI drivers and sometimes both driver are used for the rshim USB, resulting rshim1 showing up in DPU-BMC Linux which causes functionality issues with other components. This commit has a change to release the name when running on 32-bit arm platform to avoid such problem. RM #4829848
1 parent 08ea717 commit 09daa5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/rshim.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,15 @@ void rshim_deregister(rshim_backend_t *bd)
27732773
rshim_fifo_free(bd);
27742774

27752775
rshim_devs[bd->index] = NULL;
2776+
2777+
#ifdef __arm__
2778+
// Clear the device name to allow index reuse on BMC.
2779+
if ((bd->type == RSH_BACKEND_USB) && rshim_dev_names[bd->index]) {
2780+
free(rshim_dev_names[bd->index]);
2781+
rshim_dev_names[bd->index] = NULL;
2782+
}
2783+
#endif
2784+
27762785
bd->registered = 0;
27772786
}
27782787

0 commit comments

Comments
 (0)