From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 201F9C0015E for ; Thu, 29 Jun 2023 11:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231849AbjF2LkR (ORCPT ); Thu, 29 Jun 2023 07:40:17 -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 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.