Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752476AbbHaDkc (ORCPT ); Sun, 30 Aug 2015 23:40:32 -0400 Received: from mail-by2on0117.outbound.protection.outlook.com ([207.46.100.117]:10167 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752075AbbHaDk3 (ORCPT ); Sun, 30 Aug 2015 23:40:29 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=freescale.com; Date: Mon, 31 Aug 2015 10:28:41 +0800 From: Peter Chen To: punnaiah choudary kalluri CC: Nathan Sullivan , sundeep subbaraya , Subbaraya Sundeep Bhatta , "robh+dt@kernel.org" , "pawel.moll@arm.com" , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , Greg Kroah-Hartman , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH 1/2] usb: chipidea: add xilinx zynq platform data Message-ID: <20150831022840.GC25516@shlinux2> References: <1440602865-30468-1-git-send-email-nathan.sullivan@ni.com> <20150827043339.GA29157@shlinux2> <20150827143307.GA3775@nathan3500-linux-VM> <20150828013011.GA15341@shlinux2> <20150828144256.GA30916@nathan3500-linux-VM> <20150831004032.GB25516@shlinux2> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD055;1:KVqw8rEIDPdmrepCT2Wl4DbSzcDSjl2TBMzpt8VH/HCERIXK0hJ4zIZO9SfBCOUU3xHK5asZngUf9A+XTy5pVw7l3IBvtf3SMT6pTw5xVt4SdvwMjb0aHoLNYBg82tpZ6Ogw5o183WSfafqQYUA6gUlvD7FTTCeVUWjCyM2bfvCT5fc1q0j1TvlS7uX6QQ+XDZ6PpiZadWApEIH224bB5iFI6rVKjOlM1x40G0G+bfvfOl8tjrkiRKzQMvInO/92R9DuhgUJCHEWViT7+VllUUedxuR0IimEDckX7QdlDg5KZgAhwKKdBikM5hSU6r8o7ZrFm5OqRPBTt4d6S1xGaZMD5AFs7aR3N33bIWejq8YEBIraACVcb8zxyh/47KPxlA+Vm/7TIGQTamWjAPxK/7pXoz0WK0l3HH43nK9Mxq4= X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(3050300001)(377454003)(199003)(189002)(24454002)(47776003)(2950100001)(50986999)(189998001)(54356999)(5007970100001)(85426001)(104016003)(93886004)(105606002)(86362001)(5001960100002)(106466001)(110136002)(46102003)(33716001)(6806004)(76176999)(50466002)(19580405001)(5001860100001)(97736004)(23726002)(19580395003)(77156002)(92566002)(68736005)(97756001)(62966003)(77096005)(87936001)(4001350100001)(83506001)(4001540100001)(81156007)(46406003)(64706001)(5001830100001)(33656002)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB1279;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1279;2:I7UPZzLdR1BGNiRaBDOPBIi2a1a+yCaXq/56eN9iA40rIw6OxmidcNGcw51vGKqtGOe7rN0Smw9j1k6p9VebnDV848U/ELhK4h1s0FsqNaJGqK43dWK9gECd9AeRRFZVY3XbHYN4mtWf78NujApEDmMPlbh4WswJaOQSIEbae0s=;3:2e4BxFL7LWYW9x3cZPMPEvyz6dvtWTQzbHED1uA/49Z3B6s8/xzD2rJ662gsQgeYkWb/UZEyp9Oay0SfLs0aiMCj4oa16lcPeqA306xoCQyRb+Q/Ks28ysHxREjJ61IkOXGkSGD4BKBHWBTIzGXQnXyRufzqZ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05LSJvrWYNYDMulxjJ8rNAGGK+5Q6Rx/q7dQw+3anLTFkqEf3he8wbbYDdIv/fGM0acTdi2caBMl/zU1g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:DM2PR0301MB1279;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1279; X-Forefront-PRVS: 0685122203 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB1279;23:4zb+gWDdqqp1fSqvGX+dG29JOOWPGa+MJwGqlbd?= =?us-ascii?Q?u/ihjcSQpleYsZXyUaZLvROBtxzCt9uToNxnLKnxRCcmPPqZcZvqnvStvJMK?= =?us-ascii?Q?qALO86VKaYpYiAy7Pz65VwlR+BwDEydZhxYDVeux41eGGJaBfy+8Ptg/Wvj+?= =?us-ascii?Q?4cUGk33ufFFH/EVS7Scia3AFGFEh1M+1m6R9QAVh5R/GWJW88KlvP8IOQ3Af?= =?us-ascii?Q?ijy+C86jHnNemTgWq/bIzngDQGIza+HTlYKtR/Om72bKgWE99KOfCEpWuFa5?= =?us-ascii?Q?Y8C8gMxzTfQQHd9EgrpZ6xldXTIP5fynJu8mTr0zQT2OtEmNUujBey+6MNhF?= =?us-ascii?Q?FLJ/iNT2sGqKo36+6PPD47rt3QdogYKcBamlajgmQdVxNZHee81aoJjwScp5?= =?us-ascii?Q?pfNEiAUeSFIRNV1X8xPltJkLHXciw2USkr8gYC9+l3+J4CEO2RU4xZw++Uvd?= =?us-ascii?Q?tPuo8Ynuv845A8p/GVD3nLxt8Duk5uZTFoCa3HE6UbBgpnT79pLD50HEkmeW?= =?us-ascii?Q?UlUOjSQMlDyuWYI3Hjs3Bbia3ZHyiljZIzjXgOpbtlPTBcsKBiRYUgFsdUUL?= =?us-ascii?Q?p4j2mMhPIvFGUdFWSFpQj+4wL09iJd4+io/lFVR5GNdVpthHOXW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PdgXbFB5t4/YqR5INqjBICIvOS97g7vQ0=;20:7TZNKlsg9kCQbghHuxdPoCSwimueHdbL/mMNM/zNyZmrGebcFyq736es/PqdjiIeRxfTdFrKVYXMpFwZJ1rxsQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2015 03:40:26.4168 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1279 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5641 Lines: 124 On Mon, Aug 31, 2015 at 09:01:51AM +0530, punnaiah choudary kalluri wrote: > On Mon, Aug 31, 2015 at 6:10 AM, Peter Chen wrote: > > On Fri, Aug 28, 2015 at 09:42:56AM -0500, Nathan Sullivan wrote: > >> On Fri, Aug 28, 2015 at 09:30:12AM +0800, Peter Chen wrote: > >> > On Thu, Aug 27, 2015 at 09:33:07AM -0500, Nathan Sullivan wrote: > >> > > On Thu, Aug 27, 2015 at 01:11:30PM +0530, punnaiah choudary kalluri wrote: > >> > > > Hi, > >> > > > > >> > > > On Thu, Aug 27, 2015 at 10:03 AM, Peter Chen wrote: > >> > > > > On Thu, Aug 27, 2015 at 10:59:22AM +0530, sundeep subbaraya wrote: > >> > > > >> Hi, > >> > > > >> > >> > > > >> > >> > > > >> On Wed, Aug 26, 2015 at 8:57 PM, Nathan Sullivan wrote: > >> > > > >> > The Xilinx Zynq udc does not need the CI_HDRC_DISABLE_STREAMING flag, > >> > > > >> > unlike the default platform data. Add platform data specific to the > >> > > > >> > Zynq udc. > >> > > > >> > > >> > > > >> > Based on a patch by the same name from the Xilinx vendor tree. > >> > > > >> > >> > > > >> I am that Xilinx guy who sent this patch :). It is in Xilinx tree as > >> > > > >> temporary fix and > >> > > > >> I did not debug further why UDC works only when streaming is enabled. > >> > > > >> Probably this is right time to post my question here. > >> > > > >> I was expecting like: > >> > > > >> Streaming disabled - both low bandwidth and high bandwidth systems > >> > > > >> should work fine > >> > > > >> Streaming enabled - only for high bandwidth systems > >> > > > >> but this is not the case, Zynq UDC works only when Streaming is enabled. > >> > > > >> Please correct me if I am wrong. > >> > > > > > >> > > > > You are right, stream mode disabled should work at anytime. > >> > > > > It is so strange why zynq UDC only works when stream mode is enabled. > >> > > > > >> > > > I am referring the section 8.5.2 in Synopsys usb 2.0 HS controllervDoc 2.20a, > >> > > > this is what it says about SDIS (streaming mode disable option) > >> > > > > >> > > > Before activating this mode, the user must check if the TX latency > >> > > > buffers per endpoint are able to > >> > > > accommodate at least one entire maximum size packet. The RX buffer > >> > > > size must, at least, double the TX > >> > > > buffer size per endpoint. To optimize the stream disable performance, > >> > > > system bus burst must be set as high > >> > > > as possible. > >> > > > When the stream disable mode is used, the burst size (VUSB_HS_RX_BURST > >> > > > and VUSB_HS_TX_BURST) > >> > > > must be a integer sub-multiple of the latency buffer size > >> > > > (VUSB_HS_RX_DEPTH for RX buffer and > >> > > > VUSB_HS_TX_CHAN for the TX buffer). If this is not respected the > >> > > > controller will not work properly in stream > >> > > > disable mode. > >> > > > The stream disable mode should just be used in situations where the > >> > > > available system bandwidth is low or the > >> > > > system bus access latency is high, in order to avoid underruns and > >> > > > overruns in the latency buffers. This works > >> > > > for all types of endpoints, except for ISO endpoints. > >> > > > Such a system can't ensure the real time support that the ISO > >> > > > endpoints require, so the ISO endpoints are not > >> > > > supported when the SDIS bit is set. > >> > > > > >> > > > Definitely we need to root cause why disable streaming mode is not > >> > > > working for zynq but from controller spec > >> > > > point of view it is possible that controller not work properly in > >> > > > stream disable mode. > >> > > > > >> > > > Regards, > >> > > > Punnaiah > >> > > > > >> > > > >> > > Maybe the burst size isn't set correctly by default? It does say the controller > >> > > won't work correctly with stream disable set and an invalid burst size. Looks > >> > > like TX and RX burst both default to 16, per the Zynq manual. > >> > > > >> > > With the stream disable bit set, the behvior we see on our hardware is > >> > > that priming just stops, with an outstanding transfer in memory marked > >> > > active in the status field by the controller. This happens at random, even > >> > > when doing single transfers at a time like with g_ether set to have a queue > >> > > size of 1. With SDIS clear everything works great. Given that the Zynq is not > >> > > bandwidth constrained, it seems like SDIS clear should be the default. > >> > > > >> > > >> > I suspect the possible reason is the tx buffer for each endpoint is > >> > small (<=512 bytes), so it can't copy one packet (assume max packet size > >> > for bulk) to tx buffer, then the prime can't be finished. > >> > > >> > Would you help to dump the registers HWTXBUF ($BASE + 0x10) and DCCPARAMS > >> > ($BASE + 124)? > >> > > >> > tx buffer size = ((2 ^ HWTXBUF.VUSB_HS_TX_ADD) / DCCPARAMS.DEN) * > >> > (DWORD_PER_BYTES) > >> > > >> > DWORD_PER_BYTES is 4 > >> > > >> > -- > >> > > >> > Best Regards, > >> > Peter Chen > >> > >> HWTXBUF is 0x80060A10, DCCPARAMS is 0xE0003124. > > > > Are you sure you read correct address? Your DCCPARAMS means > > it is host capable, but not device capable. > > HWTXBUF is 0x8060A10 > DCCPARAMS is 0x0000018C > > VUSB_HS_TX_ADD - 0xA > DEN - 0xC > > From the above formula tx buffer size is 341.33 bytes. > > ok, so your platform can't use stream mode disabled. -- Best Regards, Peter Chen -- 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/