On Mon, Oct 12, 2020 at 07:10:24PM +0800, rickyniu wrote: > Add more log between accessory device and host to help debug. > Send the uevent when the host gets ctrl_request 51 and 52 to user space. > Let user space know the current connect status. > > Signed-off-by: rickyniu <rickyniu@xxxxxxxxxx> > --- > drivers/usb/gadget/function/f_accessory.c | 30 +++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c > index 5ed80940b9bf..e51cab9246f9 100644 > --- a/drivers/usb/gadget/function/f_accessory.c > +++ b/drivers/usb/gadget/function/f_accessory.c > @@ -117,6 +117,12 @@ struct acc_dev { > /* delayed work for handling ACCESSORY_START */ > struct delayed_work start_work; > > + /* work for handling ACCESSORY GET PROTOCOL */ > + struct work_struct getprotocol_work; > + > + /* work for handling ACCESSORY SEND STRING */ > + struct work_struct sendstring_work; > + > /* worker for registering and unregistering hid devices */ > struct work_struct hid_work; > > @@ -849,11 +855,16 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev, > if (b_requestType == (USB_DIR_OUT | USB_TYPE_VENDOR)) { > if (b_request == ACCESSORY_START) { > dev->start_requested = 1; > + dev_info(&cdev->gadget->dev, "%s: got ACCESSORY_START(53) request\n", > + __func__); Why is this here? :(