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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 623E6C5DF61 for ; Thu, 7 Nov 2019 07:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3257721D7B for ; Thu, 7 Nov 2019 07:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573110161; bh=C0qKGWBwYAN5IFKplG7JtqECFX8LEuxfkAJy6R2ZCbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Dn0zzBieGDw9O7sSvSlyDVNEdA5KOwzuvlDLQe8+7vTd/OBvLNOv6xoDitrPz0OyG cCSLeg7/FeA+91EYb/w1kepuqdQYgPU4ghZbM7jvD1rOgqxgirJShAiPgwr0+BGE73 ie5I6W/YjwGYrdxPU6MnnFqWQdxxCFmRueTXb5bM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfKGHCc (ORCPT ); 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-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@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