Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp569294ybx; Wed, 6 Nov 2019 23:05:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwqo4RI7z4DwWN7XT9uJ0smSs5+MSOMavQ9WElrmduCiAM5kBLG4gI9+J7yNYfTYD8memBk X-Received: by 2002:a50:b2c4:: with SMTP id p62mr1898198edd.128.1573110356099; Wed, 06 Nov 2019 23:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573110356; cv=none; d=google.com; s=arc-20160816; b=u03Wpsu8R9Ot1aOImCDLM/hUjpZ9fVBgYKeFYSxhXtphaWo5oE8bpH6TX3FbEKMtBo 86xc17rXSK7ZCHpzefXdIetEmsP9qmdI2//k/qwnYucuYbO/8GJf/CQnCtz7GFJtsqvo pnqbnFaCde8arFzslthmJbUc7zTxwh2L7b6QIa+b0ppbSG9y43tFZsI1VUQ1VyUgTpw1 EBjdu7Axl1ZoFOVNwijmkkJkRU9d55AydJapT2uU45Q25KvRjA6sRYzSkS7HJlYXsQRM DhQoicKm3uN1n0nvC+p3JHG/1oIwmsP99j2viDrmn7xjXve8NMn5t/tyXCtxPDMzEikY pRbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4vJV7p+0y818z43vWqPNfGZBo/6pz/3p24DJPgIXfLg=; b=bz2QFJe3AFubsUP50uLCE1ZlhxP/ncqKVtvjMu6blIDUKXmFIDuJ/Bw1VVp//uIRNz KnvUAa9FJP+P8liSzwmV8pUJ7c7h8S3mH58YkTfPpic6sdRZ3ChSgo5ypekljVq+MJer PrMm9Mw770/0mI4Yu4RVoEjVmQDfUinakxn+0PDjVGIi3MYkvyERCElnRgbligpq0Pbr OIXuuHR7Lq39hfIh6YOdMAQEyFmzzY+UyRUMooFQXg3W+GrW2M92JtMRGnlxEaSuQb7P l3Mw/y6wMCBT6D1AKyXJ8Pw8r0V8dIxwproDCyY4mvBr//H7jcp5JGrRtM53nfen7vPX w27g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V6780Uw3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb6si847175ejb.359.2019.11.06.23.05.32; Wed, 06 Nov 2019 23:05:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V6780Uw3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbfKGHCc (ORCPT + 99 others); Thu, 7 Nov 2019 02:02:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:40814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbfKGHCc (ORCPT ); Thu, 7 Nov 2019 02:02:32 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8520321D6C; Thu, 7 Nov 2019 07:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573110152; bh=C0qKGWBwYAN5IFKplG7JtqECFX8LEuxfkAJy6R2ZCbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V6780Uw3vWRRG7whEOuSYGo7DmqTh9GbCycqZPK7pQFY5Vl0/e35MJH9vhkIRfVsc UVqDugjbZ/utvPVOxY+yxzU5+DwIjNwIV5lqy9Ov88+7MlpA+lS3aPQda94QjgSYc1 ctWNtn+0RccVPhnF57CJUJAnIuYiSPKbEJPMHbUs= Date: Thu, 7 Nov 2019 08:02:29 +0100 From: "gregkh@linuxfoundation.org" To: Peng Fan Cc: "jslaby@suse.com" , "shawnguo@kernel.org" , "festevam@gmail.com" , dl-linux-imx , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andy Duan , "stable@vger.kernel.org" Subject: Re: [PATCH V2] tty: serial: fsl_lpuart: use the sg count from dma_map_sg Message-ID: <20191107070229.GA1114824@kroah.com> References: <1573094911-448-1-git-send-email-peng.fan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573094911-448-1-git-send-email-peng.fan@nxp.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 02:50:11AM +0000, Peng Fan wrote: > From: Peng Fan > > The dmaengine_prep_slave_sg needs to use sg count returned > by dma_map_sg, not use sport->dma_tx_nents, because the return > value of dma_map_sg is not always same with "nents". > > When enabling iommu for lpuart + edma, iommu framework may concatenate > two sgs into one. > > Fixes: 6250cc30c4c4e ("tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx") > Cc: > Signed-off-by: Peng Fan > --- > > V2: > Assign ret to sport->dma_tx_nents, then we no need to fix dma_unmap_sg > Hi Greg, > I saw v1 patch merged to tty-next, please help to replace with V2 if this > is ok for you, or you need I have a follow up fix for v1. I can not "replace" anything, my tree does not rebase, sorry. Please send fix-up patches on top of it if there is any changes that need to happen. thanks, greg k-h