Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755972AbbGOKEL (ORCPT ); Wed, 15 Jul 2015 06:04:11 -0400 Received: from mail-bn1bon0081.outbound.protection.outlook.com ([157.56.111.81]:34039 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751818AbbGOKEE convert rfc822-to-8bit (ORCPT ); Wed, 15 Jul 2015 06:04:04 -0400 X-Greylist: delayed 891 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Jul 2015 06:04:04 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none; From: Subbaraya Sundeep Bhatta To: "balbi@ti.com" , John Youn CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: RE: [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD register fails Thread-Topic: [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD register fails Thread-Index: AQHQk69GvvpKmr7PaEKjPX967XYJ0J3ZjnaAgAMLudA= Date: Wed, 15 Jul 2015 09:49:05 +0000 Message-ID: References: <1432203408-5482-3-git-send-email-sbhatta@xilinx.com> <20150629214701.GK1019@saruman.tx.rr.com> <20150629214854.GL1019@saruman.tx.rr.com> <2B3535C5ECE8B5419E3ECBE3007729090175264F3B@US01WEMBX2.internal.synopsys.com> <20150702030009.GB29462@saruman.tx.rr.com> <2B3535C5ECE8B5419E3ECBE3007729090175267F20@US01WEMBX2.internal.synopsys.com> <20150707032448.GB13135@saruman.tx.rr.com> <20150711192914.GA24195@saruman.tx.rr.com> <2B3535C5ECE8B5419E3ECBE3007729090175270D38@US01WEMBX2.internal.synopsys.com> <20150713185857.GD32056@saruman.tx.rr.com> In-Reply-To: <20150713185857.GD32056@saruman.tx.rr.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.19.222] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21678.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD031;1:2rPP9ceQIyTRG2QZf+ivOnXArLcqoITnZXqyb8DfJuEO3Zlra9iBYnCKrfIHnycv78ppgyEkWlgjgnRKgyoJlHjeb323I3aiYq8hcaY0/CVFADhfkmWNw8an/BSI0+stSpVjFcPWfVhQUOV5vskCP3o18MSYTI9hwK29XkiQlwGs030EpY9unfnD4LT0fXIjgn90QTBzm6+2MxDTmp0kj97v6sqyTwJw7Qcy9qoAHhhlfYX7Ymh22WFlUZRNI1xEzIka6PKa1gfOq47THbVkWxvokc9bSLXermiK8JByBwMtT+QryR5rO9u59CRx9Wjcoi3wzPYoubp5ejrg37x0+IgkMWNm1NWbIV4ifJv1MHA5wL1ZwIjO+NKrU+j/VVKNw+ZRCSB2Y+/iK7O1twLDBTtetE1ljhGwKn7b7M8OjRA= X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(377454003)(51704005)(52604005)(479174004)(199003)(13464003)(24454002)(164054003)(189002)(5890100001)(2501003)(106116001)(86362001)(106466001)(50466002)(5001770100001)(5003600100002)(33656002)(5250100002)(92566002)(2656002)(87936001)(63266004)(23726002)(46406003)(6806004)(47776003)(50986999)(19580405001)(19580395003)(97756001)(54356999)(76176999)(5001960100002)(62966003)(189998001)(77156002)(93886004)(2900100001)(2950100001)(2920100001)(102836002)(46102003)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2FFO11HUB040;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB040;2:sS2ke45mLy2Xy6LcBOCLm/j/tR7+srjw2FVVEBhNyawHvMGmRcsGUOvSEpYY0rf5;3:BHlH1Ux3Opg7DBMOHoBpwInf45HmgonuY/rcXTz/lI3/K2gDwt3qTI8cHHaedwNqduyg1GEw+YbrNR2LoignapQMuIywmE5FgYSJDbj1wO+KYwIcYPjLRy74qk6I4Bls4RBsQrEeMWX81/qzTBD4rfBEVv73pL0vLdknzWl/5GrWIBki7vz5AU9j2hp40f3yotX6K8CO+ZvxfTPHOUooP5FW9lKPyBeYOe6MtXriX4g=;25:3BEfFlMWfaQ7hBdq82UnYnsdVZ3rQIjl+SN0NLkOg2lPdUJwezM6R45hhjbxF0BxLjmO8Q7l/j+2FsDWIm+SMmfpOc+cIFu+AjzHpZ2CCrFZDK8pJ4uY4TjktOKj+qod/QqLa0lCTLKyn9RRg0uWCCL6cl9d52gBfbwWTHPwirrABxFcnUjI2TuhZ5xTylVWclI59SWG/j1He4Sli4BnfIwLNmj76dOm3Gy4+kosWPuGRX00HbRyGhqxzj37k0Dw X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB040; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB040;20:zDUNxkVnKmvytrnwORoxhBBCWCF8fGjHYaPzP2TF1xIWSzFU2WGzYv1QYyJaqYPvTLlvBHChqRAnqDGlYfqwx08Mxgnc3DJ9d0kto4LGtsHFPu6KlWjQSedsGfxsxqHPljDB75wVs0pnTPL0H9cIwDWC1fd4aY49Ytw+uUpClMQSdxPLvXU9dkQu55G3k9vTw21hTIBPT6mmToP5fCtxMEs6RWO5tJQnfTzsE+hQ/v5t4fLDJCg5EwVV2ubCm/kMUjlY/hw/2UFFoQZJl8wlJB16UtKcNO2egQfSCOwWekBexCp183S5glLHYbKn8RJdViW+qPNsCCRrViut3Gv94FW1b3PCknt40cP879Fc0EDKhICkS8wavL+0lJh7jD3n/1z52gTQkkBdCzI0PFmu9lKXXyvjmV3hM5d3KOsJXwJGZFS4QTwOc4AbcaxN4qgQvh6G+1NHREkqn3qr/Ut2d5/aqCDw1SIgG5CKNeLvRs4E//RkvcCfuxcxerL+jTHD;4:x33dUC354MXROEvZv7jJ2GwcyWolrCUTK9T1kqd+txWCRPQ8t3fqA+JGosd0P8OxcjBZjtfODImHCALyx3fhH/iqOwIehwGcQqchPex1o4d2XgPuZYa0nRBl/PlLgWmx17eJwzXXZUFiZz4VSTIj1cWqzyymB1PB01p80bYoSrxwBvPyIdW4VMImbY9GFYBBxPJzUWiErxa6qGdrun50tzOTMIq2L3LxiW7SyendKS0jlthyJiheA8r5/1NZtze2pbTGBF+8N2nESnYqCVmIyJ3bkdERoL44z+Ez1mUOcAE= BY2FFO11HUB040: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY2FFO11HUB040;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB040; X-Forefront-PRVS: 0638FD5066 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2FFO11HUB040;23:F7d1p1PtJNG1WktNivADoUqULc4JHCIXXBt5+5XU?= =?us-ascii?Q?ORd4RqFDChTutVEOlQs8znRX7z5Qe75iLUWtWjv+Log0rIUZdcmcbYuHvxIR?= =?us-ascii?Q?c4yXlgRolR9SrFVZeFU41BE/sYEmZjBi7Ouj/E/5Ze19LEFjPlJcq3o8NSAO?= =?us-ascii?Q?NsPG1XkerZT5kplZCCwwdBcSc/FaFuUctq4DyI0W2EPLp0xaYAyLrunSiiTi?= =?us-ascii?Q?HJs5GnnTjFx8fhVjfKGqqyMHjr97jMhIDKb4R/ETDC97/NDQed+cKx5azLtS?= =?us-ascii?Q?9bN3uip+znSmqYbEAbbr63Mhi1FVN0Gl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rUAEAQeckBCJr5UydNuZZ?= X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB040;5:NFQfEBjnstuPM+u382BtsUds8d25TIJd9UHWil3jy5nsKoeIDwdTYdnq81sTx5yDTvMUt1VpNVrU5YhcbYIifJ+5xohLOXIksocwrMRHfOlm4R1WfPok9Fv4ITJWsggctjh6PcE+NC7xEFR8MDuVDw==;24:ShuUAIdykeJbG6L4Epr5coVcnqlOFrNKcLbFmMLY9G8DdWa1duuYNjnimwQnr7Flms6k6oEwHXt9gWlfruVHJjnadrDITvkMlQ0tF7K4d5M= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2015 09:49:09.9147 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2FFO11HUB040 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4254 Lines: 118 Hi John, > -----Original Message----- > From: Felipe Balbi [mailto:balbi@ti.com] > Sent: Tuesday, July 14, 2015 12:29 AM > To: John Youn > Cc: balbi@ti.com; Subbaraya Sundeep Bhatta; gregkh@linuxfoundation.org; > linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; > stable@vger.kernel.org > Subject: Re: [PATCH v2 3/3] usb: dwc3: gadget: return error if command > sent to DEPCMD register fails > > Hi, > > On Mon, Jul 13, 2015 at 05:50:49PM +0000, John Youn wrote: > > On 7/11/2015 12:29 PM, Felipe Balbi wrote: > > > Hi, > > > > > > On Sat, Jul 11, 2015 at 05:17:32PM +0000, Subbaraya Sundeep Bhatta > wrote: > > >>>>>> Hi Felipe, > > >>>>>> > > >>>>>> Just an update on this. > > >>>>>> > > >>>>>> I'm trying to get this working with our latest IP with dwc3 > > >>>>>> from your testing/next branch. It fails the usbtest with a > > >>>>>> problem unrelated to this patch. > > >>>>>> . > > >>>>>> It passes on 4.1.1. > > >>>>>> > > >>>>>> I'll have to look into the failure but I won't get to it until > > >>>>>> next week as I'm off the rest of this week. > > >>>>> > > >>>>> interesting... If you could post failure signature, I can help > > >>>>> looking at it, but I guess it's too late to ask :-) > > >>>>> > > >>>>> thanks for helping though > > >>>>> > > >>>> > > >>>> > > >>>> Hi Felipe, > > >>>> > > >>>> Nevermind about my issue, it ended up being a setup-related > problem. > > >>>> > > >>>> I actually do see the same error as you due to this series of patches. > > >>>> Except I see it happening before even the first iteration. I get > > >>>> a completion status of 1 for the Set Endpoint Transfer Resources > > >>>> command. I'm not sure why this is. > > >>>> > > >>>> I don't see any conflict with any previous Transfer Complete. > > >> > > >> Same behavior at my end too. Fails before first iteration and I get > > >> completion status of 1 for Set Endpoint Resource command. Attached > > >> the logs of testing done with this patch and without this patch. > > >> Without this patch I often see completion status of 1 for Set > > >> Endpoint Transfer Resources command for Bulk and Isoc endpoints but > > >> test proceeds because driver just logs command completion status > > >> and moves on. We can revert this patch for time being. IP version is > 2.90a. > > > > > > yeah, that's what I mean, it really seems like it's the IP misbehaving. > > > > > > John, let's try to figure out what's the root cause of this, we > > > really want to use command completion status at some point, but for > > > now we need to revert the patch :-( > > > > > > Let me know if you want me to log STARS ticket on your solvnet system. > > > > > > cheers > > > > > > > Hi Felipe, > > > > We found the issue last week. > > > > The start config command isn't getting called during SET_INTERFACE. > > Thus the transfer resource index isn't getting reset, and with > > multiple SET_INTERFACE commands it will eventually exhaust the > > resources. > > > > I tried out a fix and it works for me. I'll send it out separately for > > review. Thanks John for debugging :). Yes we are not handling SET_INTERFACE similar to SET_CONFIGURATION in driver. I guess we follow "Alternate Initialization on SetInterface Request" sequence as per data book. Felipe can confirm this. > > Thanks a lot John. Not sure how come we missed that for such a long time > :-) Let's Cc stable and get it plugged ASAP :-) > > > Also, I noticed that the trace message that shows control transfers > > doesn't show the SET_INTERFACE properly. Any idea why this is? > > > > For example, here is the line in the trace that corresponds to the > > SET_INTERFACE: > > irq/33-dwc3-10808 [003] d... 2443.494368: dwc3_ctrl_req: > bRequestType > > 01 bRequest 0b wValue 0001 wIndex 0000 wLength 0 Can you please elaborate? What is expected here? Did you mean it shows wrong info (other than the request actually sent by Host) ? Thanks, Sundeep.B.S. > > I'll have a look at this when I'm back in the office (Jul 18th). > > -- > balbi -- 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/