Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757361AbbLCBVy (ORCPT ); Wed, 2 Dec 2015 20:21:54 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:37191 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755302AbbLCBVw convert rfc822-to-8bit (ORCPT ); Wed, 2 Dec 2015 20:21:52 -0500 From: John Youn To: "changbin.du@intel.com" , "John.Youn@synopsys.com" CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "balbi@ti.com" Subject: Re: [PATCH 0/2] Two fix for dwc2 gadget driver Thread-Topic: [PATCH 0/2] Two fix for dwc2 gadget driver Thread-Index: AQHRKzAM2hGgodsEV0a0esy9gDFZRg== Date: Thu, 3 Dec 2015 01:20:56 +0000 Message-ID: <2B3535C5ECE8B5419E3ECBE30077290901DC3ED679@US01WEMBX2.internal.synopsys.com> References: <1448860888-9841-1-git-send-email-changbin.du@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.9.139.127] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 35 On 11/29/2015 9:29 PM, changbin.du@intel.com wrote: > From: "Du, Changbin" > > With the first patch, enable a enabled ep will return -EBUSY. > The second patch forbid queuing on disabled ep to avoid panic. The usb_ep->enabled flag was added in 4.4. It looks like these same checks are also added at the API level in the usb_ep_enable() and usb_ep_disable(). In case this is bypassed we should probably add them in the gadget anyways but using the existing flag. Regards, John > > Du, Changbin (2): > usb: dwc2: add ep enabled flag to avoid double enable/disable > usb: dwc2: forbid queuing request to a disabled ep > > drivers/usb/dwc2/core.h | 1 + > drivers/usb/dwc2/gadget.c | 26 +++++++++++++++++++++++++- > 2 files changed, 26 insertions(+), 1 deletion(-) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/