USB host: If the implementation of the disconnect method frees the EP0 endpoint, then it must nullify it in the port structure
This commit is contained in:
parent
823af4b409
commit
80d4c7c21a
@ -2781,7 +2781,8 @@ static int sam_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
struct sam_ed_s *ed;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(rhport && eplist && eplist->ed && eplist->tail);
|
||||
DEBUGASSERT(rhport != NULL && eplist != NULL &&
|
||||
eplist->ed != NULL && eplist->tail != NULL);
|
||||
|
||||
/* There should not be any pending, real TDs linked to this ED */
|
||||
|
||||
@ -3694,6 +3695,7 @@ static void sam_disconnect(struct usbhost_driver_s *drvr,
|
||||
|
||||
/* Unbind the class from the port */
|
||||
|
||||
hport->ep0 = NULL;
|
||||
hport->devclass = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user