From patchwork Fri Jan 29 02:19:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 8157501 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 83D4B9F9A0 for ; Fri, 29 Jan 2016 02:21:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A57CF20375 for ; Fri, 29 Jan 2016 02:21:10 +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 D79B3201C0 for ; Fri, 29 Jan 2016 02:21:09 +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 1aOygO-0006mK-3L; Fri, 29 Jan 2016 02:21:08 +0000 Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOygD-0006fH-MM for linux-rockchip@lists.infradead.org; Fri, 29 Jan 2016 02:21:02 +0000 Received: by mail-pf0-x229.google.com with SMTP id x125so33720444pfb.0 for ; Thu, 28 Jan 2016 18:20:37 -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=sQjcxlyUDyEVo3YXfMyeXdCclYY/UxEbYliulmJE1vs=; b=H9Nb+1Nj12cowjYIarXU08iAwKCLjVwkYUqGmP/lRGcPa8T6FvUNXUDyuekHwqZDle gy6MQl//tXbNNxKL1KIPTfSLEYcvmbAA5VkQqtad1Hx5MWqHZeoYh3Fiep4FvX5/7e8K noh4i5nsbejG3SnXnQJN8IjqOBk2f7xAtJxZg= 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=sQjcxlyUDyEVo3YXfMyeXdCclYY/UxEbYliulmJE1vs=; b=dexZxIGwz6+wI05NO/d8t3fA0KtVWXvvQSiXCwOpr+Yb0UDclClgQ/TBoK067YBf1A Vac48xYXAewAwT4RUK7TdP9DfsKwmTKCmdT7ELhba2U1pohvKcyhWY+qmBzRYW/iMhBz MNRlfKF6/kajcJJeyM1KZ+bkA81xmjPslT7DtXFLtRPVCIV4A7oQCO+tmQfQwllB1FC2 MV5wW7BUFsncucQio2ayJG7E+EpXLgaswHS/34oqufRRB5H4X43ED3z8vmqNkmrbNjlB xtDkygkkneuskViooQGPWzxNJ4MWd9mvAY/GuXuj3xxyF7t6TrhWTKMzQKQWy69K5pZ1 QWDA== X-Gm-Message-State: AG10YOTIglUoYC8vMN9YU2uJjlD9ANNTd+vcvNHNDDqr48drbePS8I1546ZgyAraQTHn6w== X-Received: by 10.98.73.29 with SMTP id w29mr9638940pfa.106.1454034037037; Thu, 28 Jan 2016 18:20:37 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id ux2sm19314864pac.46.2016.01.28.18.20.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jan 2016 18:20:36 -0800 (PST) From: Douglas Anderson To: John Youn , balbi@ti.com, kever.yang@rock-chips.com Subject: [PATCH v6 01/22] usb: dwc2: rockchip: Make the max_transfer_size automatic Date: Thu, 28 Jan 2016 18:19:52 -0800 Message-Id: <1454034013-24657-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1454034013-24657-1-git-send-email-dianders@chromium.org> References: <1454034013-24657-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_182057_875141_D1BE0148 X-CRM114-Status: GOOD ( 11.44 ) 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: huangtao@rock-chips.com, stefan.wahren@i2se.com, heiko@sntech.de, johnyoun@synopsys.com, gregkh@linuxfoundation.org, ming.lei@canonical.com, linux-usb@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, yousaf.kaukab@intel.com, stern@rowland.harvard.edu, linux-rpi-kernel@lists.infradead.org, gregory.herrero@intel.com, william.wu@rock-chips.com, 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,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Acked-by: John Youn Tested-by: Heiko Stuebner --- Changes in v6: None Changes in v5: None Changes in v4: - Add John's Acks from Changes in v3: None Changes in v2: None 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 510f787434b3..5008a467ce06 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -129,7 +129,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,