From patchwork Tue Dec 13 15:08:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 32853 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp183438wrn; Tue, 13 Dec 2022 07:19:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tPd3epzaaUfPzQ9VwWoSwe5pYR76WSUFfFKX4KGAVTQkDCN1JYUJbQ3FTA1UCEbpUnawk X-Received: by 2002:a17:906:b114:b0:7ae:72ae:264c with SMTP id u20-20020a170906b11400b007ae72ae264cmr17275779ejy.77.1670944790347; Tue, 13 Dec 2022 07:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670944790; cv=none; d=google.com; s=arc-20160816; b=qptag1KaOrPNKraT0xui123oHdhul7v8ZE/tGq3xgVr7tQ0weqPCEV3fGmc4qGg2K1 JillqsLW4IrU0iQTisoXZAUC7SUH4irvpFNRD+YLw2DwoHcwkbNYq7lVoyglQW7tuL7S ox5AHNiz+mBMYXHIN5WPwy55z7X6fdjF5G9e/2ZGHwTaAJd3Y89X03zmvzzFYC5Tit3G +K7cfnGHfk4HjMhZLQBK9dWFiVYaMtsMA5+aXuGuBvk42Oa5dgWVXjq6xuOjnBS+YNbN ZqSFyTKIw9HplvaPZwu71ZfCuigA60FQxif0RghyButTSetC+TXGXGzmgppPYKynJZFh 5NVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=fmCSRNYWGRh53ANKHIG9zq2BxJtN1OCNfzLk/Oj3LyI=; b=tyziiZfYOFrb3SS6vhMwfNUJ5kRI1Rn8tIT10z+4YSh+hyveN41lCOktRyycS2diaC Dz43mizpf9EwrYCSZX2saFn4s2KhrkOSAjW8ji6YcPK5ht8RGTtPY+8GeVcU71c3xIrp kAD6B3SF7ScFeRDOWfGyRFNmkGo+7UWhQUlmoulVtitZr2EM1xoNpoWBDEmpuEzGGUvP TUdUSZyHS/u64Qz9C1bA1SzidzJJsVGS9+w5IIuVtzYVwZEkK0sj4LOKIKnpimhpdUId 5dlBe8qilvmNn4y0Q/mYHFellcPKK6d8PI1Wio4jJW3foAQVJypTcXttcbUKeIlMGEbi D/Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kguGhTJ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qq16-20020a17090720d000b007b790c183e0si7756753ejb.290.2022.12.13.07.19.27; Tue, 13 Dec 2022 07:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kguGhTJ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236027AbiLMPIy (ORCPT + 99 others); Tue, 13 Dec 2022 10:08:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236061AbiLMPIt (ORCPT ); Tue, 13 Dec 2022 10:08:49 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F369266 for ; Tue, 13 Dec 2022 07:08:48 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id d14so18101140edj.11 for ; Tue, 13 Dec 2022 07:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=fmCSRNYWGRh53ANKHIG9zq2BxJtN1OCNfzLk/Oj3LyI=; b=kguGhTJ+Ndrw26kfqS1x05TdFZofEt0wYOIaG0NPY+Zl9ZuQLI4hkznOrhzIPa5YGH zfc0Tx0gqFBz84QCwZamDYAyq0aw0MMfgCX8/2cgXZKiQ8KOLco2cKreU4dyfaHoH/O7 zNYYrRAxWPyBxPkcB9HbWzkQMnxQf0RK+Mmg0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fmCSRNYWGRh53ANKHIG9zq2BxJtN1OCNfzLk/Oj3LyI=; b=z56qPZD7jVF7ImV0njLg0xIH2tEc0jLlwsM8Q1o/VBPfVNDJJ4i/+j731ANnfYui1n SRRxmsSzcmHW9+gZgGtJgyUkBu7vtkU8OZhCmR8zqS6cJx/MpO+tN0PMSNE+5jlXTvuj CqOUn13avB+Wfg3HKifQ1XpCV0GH7V6nWnjlOvCRllsqlzb3f6TPdEbM4iMtsEQRU/i7 w3GJoS2X4jVV7D/JB4PaMZWFojKmuHfuI8GAquAVoLpmkZDb2g5eH4H0y6WA5Rv8n4SU 8sSyV5VxocqCaRRFk3Tx5Yb4y/Ju094ELUO+fphd5Pqn0rFyfKXWtuHWRN8CToN33nWb iafA== X-Gm-Message-State: ANoB5pn2cJinCswm2ltLJX8+cx21OuZoKnmjvngU4I4S1TRyacip+8Tr 2l/r/9gMBUS5s/tjSnucJKmBkg== X-Received: by 2002:a05:6402:3710:b0:45c:835b:8fb3 with SMTP id ek16-20020a056402371000b0045c835b8fb3mr15637831edb.30.1670944127112; Tue, 13 Dec 2022 07:08:47 -0800 (PST) Received: from alco.roam.corp.google.com ([100.104.168.209]) by smtp.gmail.com with ESMTPSA id i15-20020a50fd0f000000b0046b4e0fae75sm5070258eds.40.2022.12.13.07.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 07:08:46 -0800 (PST) From: Ricardo Ribalda Date: Tue, 13 Dec 2022 16:08:22 +0100 Subject: [PATCH] xhci-pci: set the dma max_seg_size MIME-Version: 1.0 Message-Id: <20221213-xhci-max_seg_size-v1-0-608f716a3792@chromium.org> To: Mathias Nyman , Greg Kroah-Hartman Cc: Takashi Iwai , linux-usb@vger.kernel.org, Ricardo Ribalda , linux-kernel@vger.kernel.org X-Mailer: b4 0.11.0-dev-696ae X-Developer-Signature: v=1; a=openpgp-sha256; l=1151; i=ribalda@chromium.org; h=from:subject:message-id; bh=dnER4XXok/jcs6u5Dn/oTOUm9ImEIHCydXeSr3eDf9c=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjmJV3L8s4WP9dFOY1ICJVhhrMxiLx29uWVGYiOrZu Y1rzt/iJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY5iVdwAKCRDRN9E+zzrEiKtsEA CVdiyfiAKrzrdAgVEZHiEXJ7k2+96oeUwCVcF6vuON+IVpDOiU+vqSlv6dqjugCwaA1OuSDZYOD/dd bYQnJcG7YrMpKHTQsd0qRaf/f5/KxTL+M7q/5y17hp86PH6vKhofJpNRoXLXgqab1C6V09ZQMljaqC 2bOAkCoD12u2dkAVAiUJNZCo7ITTUK6f6wgtl1WlFmwcZilRxW00ZvP7M5zU54zFwtibJ/Lgm+tOlc Vvj2K2FffEbe/yLllbXN7mqsAGqoVAvAP+Ppv5IfyTRabQ9HLFxkiqMRDM1QgS9WmrERFbGd4iCJYH EAKgJolrnarFIa6OiGmve9AIPcMaLl2IWSR3RNrOGq7f/uuO/+Ja15ZrrG+WXVrLfXQ8y4HLS+JSmo dHZrPuIX25VinT1dXf7hwmJqv6hOEZGyLeRoIzN9d4D5ZXmFq+1N46WOh332GmBmQ7AtOCbOeKBiZH Sy/800gqdF4yxGePFiuiV0mUzrj7TZkXbx9DPmRfV1uyc6coNfdNuK7R2VnUSEuc/9xcKH27XAZ6Ch 0hGXtJdRc5o6HAetElUHajHuJbAM8kFIHnZaUC9QY9cJYabPIG2YP88sqr78/ed0NGHALRLL1929jc fNquFZe/9Y/KdiWsDSTEd17gf1JLko2iYGBcm7hwQI6bCOqsk+sKI/7nNsPQ== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752112604385797642?= X-GMAIL-MSGID: =?utf-8?q?1752112604385797642?= Allow devices to have dma operations beyond 64K, and avoid warnings such as: xhci_hcd 0000:00:14.0: mapping sg segment longer than device claims to support [len=98304] [max=65536] Cc: Takashi Iwai Signed-off-by: Ricardo Ribalda --- To: Mathias Nyman To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) --- base-commit: 0ec5a38bf8499f403f81cb81a0e3a60887d1993c change-id: 20221213-xhci-max_seg_size-de366fbf12bc Best regards, diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 7bccbe50bab1..116a2f328772 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -453,6 +453,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW) pm_runtime_allow(&dev->dev); + dma_set_max_seg_size(&dev->dev, UINT_MAX); + return 0; put_usb3_hcd: