From patchwork Thu May 10 06:41:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 135393 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp636397lji; Wed, 9 May 2018 23:41:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpXlHiV26meailDDx9pGKCTtbx7VU1FUz+Nh5NvhnXdGODknaE5sjSyH53j0zaslOQ4XOnt X-Received: by 2002:a17:902:7e4a:: with SMTP id a10-v6mr194628pln.276.1525934493753; Wed, 09 May 2018 23:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525934493; cv=none; d=google.com; s=arc-20160816; b=ys8I5CnSdZZknxMdj5jygtIDGMnXWr+9d9qOTOrGqySHBdThvCV3GTvTNuCuCh5Z6k lJU5oRDceV4KPG7q2Wvrky6vwFOHxAC2+HEEHuNqLxl/poZ4c40kGSPpd81lYFxuUSgP 86xJP8pg/RXw/1BvnxaxldTmAfNRiVdhmbJ8DttRz8yS8Bf11ZGTlGMOT7Y0ru2WGuA4 YOKQ+ChVeuBGGbupoptEAU10xHwHVIg/FO1E69uiea2CRVXChlI6hXf2+wNMkNv2Mvbc X16tnAshE+P364Xmz6upKewvdmZqAxA19TPzpqmjlRXPkQ1tjiLN2HpMq0p+DNVXhnUi 8+eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=0xbju5bKHSpYH5x9VGsJ/4RT3OrBRF6x0NDZXwofjEM=; b=HSfkV1BSRtqib5Z8AuW05COhCgfO3W0cqZSsANz2xkb5F+YhvyBNYjh3Vc2gvVSfTz Bn++/mV72jtuJuAfJDhTKukrpQGG3SwZiRn1vrD7WhHb0u0t3UjzjzRTpi7Ca3xbA+Bc 61EGVWPl8B3733k+fTwJVnUo6BgBybbVbqdUq/MLA7DJMrePMrI8Yrr6BRNfJ7rqoVkl +z8gYeCPBqIjQGscum/5qWwPGKFbM9Z0tU5E06gAcO5JJYvbSB9tkZWTiOIYBSwE8wvI 8dnvTG9DlVx6vf64a5IKC5YQUKHwvGZ677sRRkwUfAz9QsKQyOkDky2MFBbil+cA2vUO C/pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=Zw+DedvZ; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k65-v6si118970pfg.38.2018.05.09.23.41.33; Wed, 09 May 2018 23:41:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=Zw+DedvZ; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750854AbeEJGlc (ORCPT + 2 others); Thu, 10 May 2018 02:41:32 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53191 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756618AbeEJGlb (ORCPT ); Thu, 10 May 2018 02:41:31 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180510064129euoutp020c7890f57d2c837371fd2814ae470013~tNVVE3gCf2489724897euoutp02x; Thu, 10 May 2018 06:41:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180510064129euoutp020c7890f57d2c837371fd2814ae470013~tNVVE3gCf2489724897euoutp02x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1525934489; bh=N9mD7ywtOSsCgezUWHZIU1n22vOwxHFJuuqvMfdOEoo=; h=From:To:Cc:Subject:Date:References:From; b=Zw+DedvZOEv4TdM0ue0d7soJK392TV0zg8q4snqxRM9FkwLnZao2tteCIsUV+C79z vCMaKvicMmEy3CSyCU+f8qNSEyZvcSxSAesfqK9TZLN8E2mEUt0I6GFHNkag7v4nTZ QFhKkvYkZJ9vwVWOVJ8RrFACEQZnKQaW40fc1LKc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180510064128eucas1p1c073d82f94d8c09777877d4f9c78a3eb~tNVUEtx8g0632606326eucas1p1B; Thu, 10 May 2018 06:41:27 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 26.AF.17380.799E3FA5; Thu, 10 May 2018 07:41:27 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180510064127eucas1p1e9a918988f80421ecbe8eb371c38d665~tNVTLShnt2583725837eucas1p1n; Thu, 10 May 2018 06:41:27 +0000 (GMT) X-AuditID: cbfec7f4-6f9ff700000043e4-db-5af3e9972f46 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 63.FB.04183.699E3FA5; Thu, 10 May 2018 07:41:27 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P8I00K042KZPZ30@eusync3.samsung.com>; Thu, 10 May 2018 07:41:26 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman Subject: [PATCH] serial: samsung: fix maxburst parameter for DMA transactions Date: Thu, 10 May 2018 08:41:13 +0200 Message-id: <20180510064113.4369-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsWy7djPc7rTX36OMmj6rmCxccZ6VovmxevZ LM6f38BuMeP8PiaLM4t72S3WHrnLbnH4TTurA7vHplWdbB77565h9+jbsorR4/MmuQCWKC6b lNSczLLUIn27BK6Mhes2MBbc4KqY2RHawNjD2cXIySEhYCJx51gLSxcjF4eQwApGic72NlYI 5zOjRPu9HlaYqne7WtkhEssYJXa+fsEE4TQwSXzbf5EdpIpNwFCi620XG4gtIuAsMfvsQrAi ZoEPjBIL179mBkkIC/hLNHxpY+xi5OBgEVCVOHEyEyTMK2AjsX7KFXaIbfISz6bPA9smIfCU VWLTvY/MEAkXiQnnz7NB2MISr45vgWqQkbg8uZsFwq6X6Pt+hAmiuYdRYm/LVCaIhLXE4eMX wf5hFuCTmLRtOjPIERICvBIdbUIQJR4S2xasgip3lJi0ZRLYLiGBWInjO+6wT2CUXMDIsIpR PLW0ODc9tdgoL7Vcrzgxt7g0L10vOT93EyMw6k7/O/5lB+OuP0mHGAU4GJV4eD/wfI4SYk0s K67MPcQowcGsJML74xxQiDclsbIqtSg/vqg0J7X4EKM0B4uSOG+cRl2UkEB6YklqdmpqQWoR TJaJg1OqgdFztmbSztVFLm4nzHbGhL3wvsNxMe6hz2HGGIdLX5SZl3nMZ6y/KnOWtZa1oN6g JU3WQGHheW/DtYEt2Q+Pn3mR5m0jcCjBzC5D2F6+YSrDvwuRBa4WmbO1Amcc5X/8zO3LCq4o 2YBD55NWclk95pf1LttVtH7+UqsVlw8+vbhKRtWmdM4VBSWW4oxEQy3mouJEAD5JFfW2AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBJMWRmVeSWpSXmKPExsVy+t/xq7rTX36OMji2hNFi44z1rBbNi9ez WZw/v4HdYsb5fUwWZxb3slusPXKX3eLwm3ZWB3aPTas62Tz2z13D7tG3ZRWjx+dNcgEsUVw2 Kak5mWWpRfp2CVwZC9dtYCy4wVUxsyO0gbGHs4uRk0NCwETi3a5W9i5GLg4hgSWMEl8OfWOE cJqYJO58WsEEUsUmYCjR9baLDcQWEXCWmH12IRNIEbPAJ0aJlkXXgDo4OIQFfCWONgeBmCwC qhInTmaClPMK2Eisn3KFHWKZvMSz6fPYJzByLWBkWMUoklpanJueW2ykV5yYW1yal66XnJ+7 iRHo/23Hfm7Zwdj1LvgQowAHoxIP7weez1FCrIllxZW5hxglOJiVRHh/nAMK8aYkVlalFuXH F5XmpBYfYpTmYFES5z1vUBklJJCeWJKanZpakFoEk2Xi4JRqYBSYzjjt6X+jxa17LA9OLD1T livyYffk+w4zhCeekzrkHH391d9k4YvLlilKXr9c86yucN/h2YUsLv8PXNlxxyVUVs3zfPpp td8rl9YX6nR2nrnvp1Ultb1k5x+lRe2zVfq3SC08eOP6ThH3Ny8ZBRgn/GDvZLh8ot3T7h8f x1K9MCsb65hV128psRRnJBpqMRcVJwIAl8vntvsBAAA= X-CMS-MailID: 20180510064127eucas1p1e9a918988f80421ecbe8eb371c38d665 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180510064127eucas1p1e9a918988f80421ecbe8eb371c38d665 X-RootMTR: 20180510064127eucas1p1e9a918988f80421ecbe8eb371c38d665 References: Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The best granularity of residue that DMA engine can report is in the BURST units, so the serial driver must use MAXBURST = 1 and DMA_SLAVE_BUSWIDTH_1_BYTE if it relies on exact number of bytes transferred by DMA engine. Fixes: 62c37eedb74c ("serial: samsung: add dma reqest/release functions") Signed-off-by: Marek Szyprowski --- drivers/tty/serial/samsung.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Krzysztof Kozlowski diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 3f2f8c118ce0..64e96926f1ad 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -862,15 +862,12 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) dma->rx_conf.direction = DMA_DEV_TO_MEM; dma->rx_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; dma->rx_conf.src_addr = p->port.mapbase + S3C2410_URXH; - dma->rx_conf.src_maxburst = 16; + dma->rx_conf.src_maxburst = 1; dma->tx_conf.direction = DMA_MEM_TO_DEV; dma->tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; dma->tx_conf.dst_addr = p->port.mapbase + S3C2410_UTXH; - if (dma_get_cache_alignment() >= 16) - dma->tx_conf.dst_maxburst = 16; - else - dma->tx_conf.dst_maxburst = 1; + dma->tx_conf.dst_maxburst = 1; dma->rx_chan = dma_request_chan(p->port.dev, "rx");