From patchwork Wed Nov 4 22:53:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 7555761 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 98058BEEA4 for ; Wed, 4 Nov 2015 22:54:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90F74207FB for ; Wed, 4 Nov 2015 22:54:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2B06207F7 for ; Wed, 4 Nov 2015 22:54:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6wN-0007zm-59; Wed, 04 Nov 2015 22:54:03 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6wL-0007vr-DC for linux-rockchip@lists.infradead.org; Wed, 04 Nov 2015 22:54:02 +0000 Received: by pasz6 with SMTP id z6so67915054pas.2 for ; Wed, 04 Nov 2015 14:53:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B4CEINCauNnWGqRbOIj9/3wPOqbhtX5PhAtinmKP/X0=; b=P8ehH5ASv5FcZ6w9iK8TcEXaRE8lWhQ1YnxYy1blidAr2bF70QQH0pvEfnwMyaKLBT A8ZDDCWpywe+1khHKl4ehRf0MGeSv0qxd3+QBIWsRnY3TyE599lJuH86fJiz5feU3Vhb PSJREC6muo+1rEGw6NcISuF2UIqs+bAW5+iQk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B4CEINCauNnWGqRbOIj9/3wPOqbhtX5PhAtinmKP/X0=; b=G2YmY6s4wG7k0Jd1fxXf8fFOU228nP44Tkq77lcEbfEJHoXIhrIDIQAUTkYSqfCDi9 3cFuWfTg0ENFuXf15aKlQXPuhuipBBNglRm66UYV0QxNlqpEUVctZXXc5oJWkpAkOXn6 hy7yWL4JA0e5fiiztNNcdyUYfVmNcTGe+CFpxbmMtbNRcAoLJbOmNUW7rPjWPgXkXQWe b4EmWnol2TdFn+0ZVEcK3mOTm2Rlr/zrFVNNojWT6sfG9ZcDuQeRJhAETwLyEFzINTtN hacrEPPyKnjYRkh/GhNEEcc5IyNjjZGHxGg+LOVr78U5/6CGRLzVJjN5kbeDjX3qeu0n ulQA== X-Gm-Message-State: ALoCoQkvl5ebK9F9U0RZ4jc8dHsCtzuhQvSLhzX6HDGMSO6gyK+IyMkMZ07p1ukd+8UbLUGPdYvj X-Received: by 10.66.140.39 with SMTP id rd7mr5181234pab.86.1446677619524; Wed, 04 Nov 2015 14:53:39 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id ff2sm4023956pac.14.2015.11.04.14.53.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Nov 2015 14:53:38 -0800 (PST) From: Douglas Anderson To: John Youn , balbi@ti.com Subject: [PATCH 1/3] usb: dwc2: rockchip: Make the max_transfer_size automatic Date: Wed, 4 Nov 2015 14:53:03 -0800 Message-Id: <1446677585-28582-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1446677585-28582-1-git-send-email-dianders@chromium.org> References: <1446677585-28582-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151104_145401_486615_C0BE216B X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregory.herrero@intel.com, =?UTF-8?q?Heiko=20St=C3=BCbner?= , johnyoun@synopsys.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, yousaf.kaukab@intel.com, Yunzhi Li , Julius Werner , dinguyen@opensource.altera.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previously we needed to set the max_transfer_size to explicitly be 65535 because the old driver would detect that our hardware could support much bigger transfers and then would try to do them. This wouldn't work since the DMA alignment code couldn't support it. Later in commit e8f8c14d9da7 ("usb: dwc2: clip max_transfer_size to 65535") upstream added support for clipping this automatically. Since that commit it has been OK to just use "-1" (default), but nobody bothered to change it. Let's change it to default now for two reasons: - It's nice to use autodetected params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 5859b0fa19ee..f26e0c31c07e 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -95,7 +95,7 @@ static const struct dwc2_core_params params_rk3066 = { .host_rx_fifo_size = 520, /* 520 DWORDs */ .host_nperio_tx_fifo_size = 128, /* 128 DWORDs */ .host_perio_tx_fifo_size = 256, /* 256 DWORDs */ - .max_transfer_size = 65535, + .max_transfer_size = -1, .max_packet_count = -1, .host_channels = -1, .phy_type = -1,