Skip to content

Commit

Permalink
usb: gadget: composite: reset delayed_status on reset_config
Browse files Browse the repository at this point in the history
The delayed_status value is used to keep track of status response
packets on ep0. It needs to be reset or the set_config function would
still delay the answer, if the usb device got unplugged while waiting
for setup_continue to be called.

Cc: stable@vger.kernel.org
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Michael Grzeschik authored and Felipe Balbi committed Nov 25, 2013
1 parent a655f48 commit 2bac51a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ static void reset_config(struct usb_composite_dev *cdev)
bitmap_zero(f->endpoints, 32);
}
cdev->config = NULL;
cdev->delayed_status = 0;
}

static int set_config(struct usb_composite_dev *cdev,
Expand Down

0 comments on commit 2bac51a

Please sign in to comment.