Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20628990rwd; Thu, 29 Jun 2023 05:08:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ517WsHAHsOCzGP1+rLDE7BduNGiXjWYrSZ8+sPKnyI1UVKw/PjQHqDDKtBAPDn817q9U3g X-Received: by 2002:a05:6a20:8e09:b0:12c:518:b8de with SMTP id y9-20020a056a208e0900b0012c0518b8demr5224856pzj.17.1688040523057; Thu, 29 Jun 2023 05:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688040523; cv=none; d=google.com; s=arc-20160816; b=yLngRCK5P0meRXNihlUZ/mAZOZjQG+ynRgdmvB9kU5w/rmlf5yQeJWAvv6DFMyGO3v cJVMoDf1sNBm3OxIW63OSSYZN31UlvU0+DHROx1i/cZvsmUSS4HMFN2icLPmkMASVUFO YVNF5ysvMHhZk+hQdgzHzGptHClSUcEkGBWOp2srukZ01G6lTQF+oxxDHBsvxfBqu3Tl I1kJHXqymnAiEslgIVghLND3Cg+/DUhmWssNmiPVpjiWlVIlh+HpjFQG4VrCvEpjFwi6 7KKKNgJ2vfnGNdM5zufUypIPzKfbKUymPw2+R+mcoXbAbz4DP0L9/uTu2gCvkKE0cJNr gToQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=EuRgflA7W+GB2OzUJcPWqnf9eFGcWgW+fc96i17TXMs=; fh=BbhhThynS2Op3C9nGlsC074Iv3zClkDFnkUuXXFIZKc=; b=ZyfpGhpSYQ+SInyE0lAOegheXVFb3mHuzDEYprxI5Msa8be32TSBQT0NEClGeEahgh P3kEsRqVPJfagta1REfz5hSyh+Klrtph+RlH3bqxUnxybDtLfe1lLHda0NZFBoqBzAxF LZPKN1lRD49FUvKzwt5w1HjenIJvR8X6bzKRKeFotaEEjsXcitScHbFP+lfwsjUhBugf KnQNT79lf6TL0B/59H3Fxkj9Mx2q0AZ8Obsk7P/H1KKphgfKaa3oCX7kNjodgcce5C/f gSaqVA/NpBaH3DQfxXWDvVKlwdlpbOTZJH3ri/+eeLil7GaYgdQ3qzyVUxYZQIbo5MrJ vG2g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a638843000000b0054ff53233f2si10989155pgd.567.2023.06.29.05.08.25; Thu, 29 Jun 2023 05:08:43 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231817AbjF2LkP (ORCPT + 99 others); Thu, 29 Jun 2023 07:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjF2LkO (ORCPT ); Thu, 29 Jun 2023 07:40:14 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDF0610F0; Thu, 29 Jun 2023 04:40:12 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D592C14; Thu, 29 Jun 2023 04:40:56 -0700 (PDT) Received: from [10.57.33.98] (unknown [10.57.33.98]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BD5BB3F64C; Thu, 29 Jun 2023 04:40:10 -0700 (PDT) Message-ID: <11d40d12-bb6c-25b3-ef44-43f4ded0e628@arm.com> Date: Thu, 29 Jun 2023 12:40:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] usb: xhci-mtk: set the dma max_seg_size Content-Language: en-GB To: Greg Kroah-Hartman , Ricardo Ribalda Cc: Zubin Mithra , Chunfeng Yun , Mathias Nyman , Matthias Brugger , AngeloGioacchino Del Regno , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230628-mtk-usb-v1-1-3c5b2ea3d6b9@chromium.org> <2023062942-thumb-giddily-f0e0@gregkh> From: Robin Murphy In-Reply-To: <2023062942-thumb-giddily-f0e0@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 2023-06-29 09:40, Greg Kroah-Hartman wrote: > On Thu, Jun 29, 2023 at 09:13:23AM +0200, Ricardo Ribalda wrote: >> Hi Zubin >> >> On Wed, 28 Jun 2023 at 23:57, Zubin Mithra wrote: >>> >>> On Wed, Jun 28, 2023 at 11:04:20PM +0200, Ricardo Ribalda wrote: >>>> On Wed, 28 Jun 2023 at 23:00, Ricardo Ribalda wrote: >>>>> >>>>> Allow devices to have dma operations beyond 64K, and avoid warnings such >>>>> as: >>>>> >>>>> DMA-API: xhci-mtk 11200000.usb: mapping sg segment longer than device claims to support [len=98304] [max=65536] >>>>> >>>>> Signed-off-by: Ricardo Ribalda >>>> Reported-by: Zubin Mithra >>> >>> Should this be cc'd to stable@ as well? >> >> Not sure, in most of the cases this is "just" a warning fix. Let the >> maintainer decide: > > Warnings can cause reboots as the majority of the linux systems in the > world run panic-on-warn, so yes, it should be backported. Although in this particular case, running DMA_API_DEBUG=y on production systems is a pretty inadvisable thing to do anyway ;) However I'm glad I looked, since I think this also points to a bug in dma_alloc_noncontiguous() - it's one thing to blame a driver for trying to map a malformed scatterlist of its own, but if the DMA API is generating one internally without respecting the device's (claimed) parameters, then that's on us. I'll have a look into it... Thanks, Robin.