Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751559AbbH1Clw (ORCPT ); Thu, 27 Aug 2015 22:41:52 -0400 Received: from mail-by2on0139.outbound.protection.outlook.com ([207.46.100.139]:63886 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751020AbbH1Clt (ORCPT ); Thu, 27 Aug 2015 22:41:49 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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: Fri, 28 Aug 2015 09:30:12 +0800 From: Peter Chen To: Nathan Sullivan CC: punnaiah choudary kalluri , 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: <20150828013011.GA15341@shlinux2> References: <1440602865-30468-1-git-send-email-nathan.sullivan@ni.com> <20150827043339.GA29157@shlinux2> <20150827143307.GA3775@nathan3500-linux-VM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150827143307.GA3775@nathan3500-linux-VM> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD004;1:o5GNZC+HnSACucCKSy7v1LNjs1afiCbblxzKLq9sAVJgPBjUSz5usIrCM98NGM3fj0jVi0b07E2rn1rCp23bHu6yhsBz7rcfylWNcc2Hf1RdvRnNUpumyEEU2J3SgNGYEU5xuWCVUQdXzp0rBm93Xfeg6auVNrkqEZ3pemeTc1iJzCtxl6ObRWNQbeVNFQLUwVEgBD8LiYJAOyjKoC/wSe3KIAJOGETrCeerzrt7R4T/stWXiZH8iZR6vaLbv3YrvnqsHhCB1ta38B6mJPPtK/9n0CQDp5CMaEfHBix1IyZQStWM+d4YsVjnKqfux6/ZAl50ArlH+UIhtUJyjmQuADAA8yUSOBkIuzSxx10Pi9z1QRoDtupU6MZFVIWv6Lsc/UvCN5Fq05mJ61vfqaBw/w== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(24454002)(189002)(377454003)(199003)(5001830100001)(5007970100001)(81156007)(97736004)(92566002)(2950100001)(23726002)(6806004)(5001860100001)(68736005)(64706001)(105606002)(83506001)(76176999)(4001540100001)(106466001)(33656002)(69596002)(62966003)(189998001)(77156002)(77096005)(33716001)(46406003)(5001960100002)(4001350100001)(97756001)(93886004)(54356999)(110136002)(104016003)(50986999)(86362001)(47776003)(50466002)(19580405001)(19580395003)(85426001)(87936001)(46102003)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1266;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1266;2:TylKxMfBnck8iSwhouicnLIirQT3vmA9Hhddax2aLBIa8p3vcYxSNGodLcs9pRvjVd4FBodRnYF+xN1cU9vcGUnwJLRVhWo7ZC5ILlm9VyBg2n+rYgN06EP8Jl7j0OYE3TsVNQJevjItdDzAje98vgAV4sWIbFzkNWNW2hcIKLM=;3:k+vNkxY4Fzm15hRq7kmQeR7YmcON7WT545k5bBLM1mqrQLyw+FaOaOTAk5HLwKqEqkdd8ZVu1FnAIbQeaJ0m6Qzh7EBNB4DL/xlfIKvQKdb9hDpvOWcm2zWssZYGWsB3PonWci7o5YmyZvclSaUP0o8YQ6Wr8dE7DMeLqV58NXiMACzmSB1SJe0dcM5ZjCL56moY7afc90Vx9nvf9l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8qeJwH+Zj5mInDdvwfXsQbo 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:BN3PR0301MB1266;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1266; X-Forefront-PRVS: 0682FC00E8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0301MB1266;23:T6FcsTd0VFGxhJ0RuxAZlaYCDUB3uMAopEDLvdh?= =?us-ascii?Q?CkquyQTVZci5ri+SEXBW5KnFogRb2svnGMlYfHad7PaqbcJtzA3UacDV21B6?= =?us-ascii?Q?ovzWGzR62Ziah3E8XG1CZgAS6mCTaKNHW9KjD6vt0qRGtZIdrvfS01vKiwQ3?= =?us-ascii?Q?fE3Fc8VfIEQQN7CgsQjx2C+zdrNA8OGJCcuM3soIQlr/pxS4vESnyVUIiKcQ?= =?us-ascii?Q?8ciwIYI1mLHA0po3+KOt3MJCseL5msJ3UtuMTyLZd97m8QqogBAEou3WeUx0?= =?us-ascii?Q?dRolpgqsQiF0fsNEFzRfB2es5H6eUS6gQw0g9Lv4PwK1gEFOau5v1kJsVw5D?= =?us-ascii?Q?W8UjhUo4ddH49Bs6/jsZRamwjbGrvxP9VfZTuqFS/xbGxSIb11sXD42pRCCP?= =?us-ascii?Q?Zm8qqI7b1UzBxF/4C/tQmyGv22wHai1/vYys7aT3dfKWg8kAe3iuUj4G6oVp?= =?us-ascii?Q?jBwiCO92x+Tvtp/heuwpp4d1aD1x8JsKGw9qsIFB+H//NekqMhMrwXZ7VV+d?= =?us-ascii?Q?XETrh/X5mBZ6x0syDHdnRDwOwrAIMrtvUxbUklLR4tqFvXQ4M8tPbgM+XvHL?= =?us-ascii?Q?VkL8fL0y8pL3xQP7CXoA0LkyM5ajIOIsgXnka2O3kLM7wPkqyxHFZaDcXTpT?= =?us-ascii?Q?czt7sYJ+l2GRtrLRJC8bSX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uakr40o/mGqK73KBqmZrZY/6O2lJBflRhvis=;20:TuF++zxe4/noCXFDI4z/B5EMiZ8ywl/kMLwjfThz7mNSXFTG2s8T4AWabnQ4TLcCUgntRLxaRfWvE7b0UsR+7Q== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2015 02:41:46.5129 (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.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1266 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4303 Lines: 98 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 -- 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/