浏览代码

usb: gadget: composite: reset delayed_status on reset_config

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>
Michael Grzeschik 12 年之前
父节点
当前提交
2bac51a182
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/gadget/composite.c

+ 1 - 0
drivers/usb/gadget/composite.c

@@ -593,6 +593,7 @@ static void reset_config(struct usb_composite_dev *cdev)
 		bitmap_zero(f->endpoints, 32);
 		bitmap_zero(f->endpoints, 32);
 	}
 	}
 	cdev->config = NULL;
 	cdev->config = NULL;
+	cdev->delayed_status = 0;
 }
 }
 
 
 static int set_config(struct usb_composite_dev *cdev,
 static int set_config(struct usb_composite_dev *cdev,