Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2004028imm; Thu, 14 Jun 2018 07:19:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL3yRDmMNTEmrquFFRSwrSekspexGacWkMSaeq5TeohLJq8Cl0cGaEzsqmpHZcpS1ys7glu X-Received: by 2002:a65:6504:: with SMTP id x4-v6mr2522113pgv.131.1528985954396; Thu, 14 Jun 2018 07:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528985954; cv=none; d=google.com; s=arc-20160816; b=IXedFKhBYOZFr126rw1CUyuyZlHvl8LZX5sA5eHI+T4O9Jjyoote3G7KvuLOAZNOC5 j1dZWZrPbfrDKAsCZbi8C5crFnWytaHWufM6QK6WdCIRtY4Ib464yxL5Rn3OMeizJCxb 1IdMXN/uPiN/d4qvdI/S0ZEKNAQbVG7+W3yoe0hM10ODFDA9y2z3HrIHo/734llTS2j6 Zob/avD2dhG30WtV9v1J6R4WGCG8yDIeGmydhk+rb6CTj1qbBc+Dxrw98L+FB1ZW5sAx EIZDMBVp+1NACclvroaAhIuCj5sTVFOUCDSR9FWo84HPm97N+7EmOypZop4mWIlk0V2o jT/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=eG5gO2+NiSP9GUDJLa5f4a/uAi0ucXOESUHAQXl4QQo=; b=e1bsGg+UW0/tOMN7zHen+Ed3nRUv2VNizABzuV1MDDNmEBSR9ZPDRZ4n+0Cf0t8Zol 12HJLHzl1YQUvzApdK2dlHOO6kXbwb247u3zXrx2Vd9kg+ipnTSAilfjzuXScsMRybwV /sGYBJI/qwxnWYYDzlezy75JN/wrypgiBJflJ5YwBptNRF5sAO4aZsVwaVyCFGSnu4Qp jk8+pUu4kXUREQ6TjJQZqy+WVNYluBTEgmNybNo+T8kcpKiO9r88Pywrz81ccdKLXxTs +nQpd8yIVL+IDRVZ0tpZrJbm1si2YFbmVM7jXZpBYdybqrhe13LucQmjfwVe7gHOwXxK /dxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mVvdG4Ge; 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 a12-v6si6146632plt.474.2018.06.14.07.19.00; Thu, 14 Jun 2018 07:19:14 -0700 (PDT) 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=mVvdG4Ge; 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 S966351AbeFNORc (ORCPT + 99 others); Thu, 14 Jun 2018 10:17:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:54842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966226AbeFNONX (ORCPT ); Thu, 14 Jun 2018 10:13:23 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 C14F0208DB; Thu, 14 Jun 2018 14:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528985603; bh=A+b8faOiC327zy31dpjy0IYi2F8f1VA6X8rVbR+7sFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mVvdG4GeFeOLS/FaWT05zpd0XyxWuheh/vlHrdnbH6omrigusVxoYLstMuITfoXjG +B7xo4kKO97A3psTQTf/rfjk0+ir92EKUQ1SHFwXfKxr2DQQUuUbtpO/0i2T6RU5nP 3lR0LSQaeM9zr5v1Ws2RTr1LJJvLbsNCH4F6I5y4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH 4.4 19/24] serial: samsung: fix maxburst parameter for DMA transactions Date: Thu, 14 Jun 2018 16:05:14 +0200 Message-Id: <20180614132725.256384869@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180614132724.483802160@linuxfoundation.org> References: <20180614132724.483802160@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marek Szyprowski commit aa2f80e752c75e593b3820f42c416ed9458fa73e upstream. 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 Acked-by: Krzysztof Kozlowski Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/samsung.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -860,15 +860,12 @@ static int s3c24xx_serial_request_dma(st 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_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask);