Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp87964lqb; Tue, 16 Apr 2024 09:29:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtbkSQl6rWekHtW/jcawcFZs/AJE3rfUOX5f8PIyayoqOBSKcZ27Pi+p+L1rvX55vd6Gro/7QOc5yIU4rPWtZaHA4WIGt+bhT8QEIzZQ== X-Google-Smtp-Source: AGHT+IH26Tm6+r2MOflKjrYe1aplAh0Nt4mxIYfHOqGnzozhS/4CSkHa2XnPCls9ilBAXPXi1ZAX X-Received: by 2002:a05:6214:b14:b0:69b:7b95:8ef1 with SMTP id u20-20020a0562140b1400b0069b7b958ef1mr6280316qvj.22.1713284973214; Tue, 16 Apr 2024 09:29:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713284973; cv=pass; d=google.com; s=arc-20160816; b=EhZI/OBw49D0oeyZ+PYxtuMDGJo1kVYrBwDz7Q2co8Du7bXlA4oC0/kdmvwfMfNcWP agVBLbhS+NyPXeb54raKdh3DhTbsA5MGyjxEGK0hMRNQbf+Bk3x0QQQ3O3/aUk9yBbj+ 1uD+67PrStsh/ic/FtAivG1jlfUJMWkSEazCwmVjAQtqYSs9WRT/zAB3NIIzwxE0o9Ww 40zYnT8fojs4sdLoLVl+LoLfs8o1/0r/kzcaJBKcebK0eKboPARVn0EXNZarzJ65uiUa lxiKuEcn4CIhISLNGA+6r0hD8vQOmgK0hfP12KNWqNxVQZwQoYCrD8rKZRcEh8VgBndJ EqoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=s15Rb4mbYoAFWiPnMFdoi3VC5Ubr4PDTS6LvLNYlcXw=; fh=c3iqikivk7ppGXn6jtjAvFDTTdHqXPY6ng31a5L+QYA=; b=pjZ12NZ8gKxIg84Eha916QTbVPlvV22SQHtmHI0Ve7dVlmwqCgX9Zdc7lR158Pf30g UGwORdzl2vfvzxLxiop6CfTg54acCEroazQsIB3vbVGrwyWVCz2u21ETUpYtnyqOakyO dFVm7hhTSF4870zXbLasHxkv2Lmx9epo/OeVOmswZRYmlQUkI7qQGVfSmy4DCKdDOZcG Qg2IXgnzNBHYWeQSC5D0Cyqzjc0QRVJ7lDcLZzd57a+jcIMcjVrjgJbEJMiuHHBfrgF2 yQ3v6cQ2GtpVtrzNBEFetzMyUw9Fgbz2cdpUp3jhKc/c0878IQbKM9pOM//nu6Qlut7u 5i2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ktn8pm/i"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-147236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fn14-20020ad45d6e000000b0069b60b6cf90si10273440qvb.529.2024.04.16.09.29.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 09:29:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ktn8pm/i"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-147236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E4FCD1C217BB for ; Tue, 16 Apr 2024 16:29:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3EA0131BDB; Tue, 16 Apr 2024 16:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ktn8pm/i" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DBB013281F; Tue, 16 Apr 2024 16:29:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713284957; cv=none; b=j/6qPcVFlame3m7/u1vP/5U+ekdhe1FFh1VVofEskX0e4gUarwCdLtirA9r8LLIco+0N7+zPWX87iJfbEOYaMIaEeHo7jitJNKYXKbeXIqYO1adAULjpyFCFkYnml0KkhjOfKeNCaKfI2RC2PVS0Xitshp7GUu7acTJHMm0Wmoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713284957; c=relaxed/simple; bh=ksIMmot1Zu3RpcmxxuMwT29YF/YfRaoJNZVygL1gpD4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=f6HxDpPJTq0FyXpNYmMJxcxBqUZNLQuQNnW2DwlwBJu2N5AFFFZJBjbaZN+mCfmmAv0xKI5KSsWX3cX1KvjEU9ku7JbFk/AnzWQUs/Iysn8u3V2WiTZRDVj4z//DNgNfsz4uFqGYhOfpW4mURAfAbEBND7/xZe4difN/EOSgvPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ktn8pm/i; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-518e5a74702so1700757e87.1; Tue, 16 Apr 2024 09:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713284954; x=1713889754; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=s15Rb4mbYoAFWiPnMFdoi3VC5Ubr4PDTS6LvLNYlcXw=; b=ktn8pm/i2O4AkjDHmO65wO1mu3aNwa5jaAtodBuLpBXcK9C7DzLnDvYgX8kBOc3X+X wo3gBQuD0i5x6l5hRQUC3Yvc6liDmOaTspb9SVVEwDtQcMe2m6c+B2l0+NCY3rQO648a WkLkumaakOEPScmSnnk6ym3Zm2tCu8q5uMPa5hLZq/ZZ4D2nl7F/h/u8XU2YI4uuehNN pvGpE5rnw0qPLcuUA0c7bHV6js4Ibs/VI31cGSHUHUYGTnqouQQhm21CP0KanjF5/ywC qZODyY8mIOm2HUFTmxs9HyjxAxbhqGSoWQyxLfEwhgIRoIwh6jNBdcs/ycooOd1wR5Jz rtcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713284954; x=1713889754; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s15Rb4mbYoAFWiPnMFdoi3VC5Ubr4PDTS6LvLNYlcXw=; b=iYrQ+AGu4CMU+zKcK9tMe7mdxW22RsdLunt+8y/dk5TArpv3B39hUWZw2seT0p5QUY sgIddpoSas+GZVoecsqWX0DWJYgtOtuWk9peUENCNbUciMSC1ixHW1VShWC+9RBSslYW VFN1CkpOqIfaX6fSe0fQlb8fx3OmyGuC74hPtgXAGxhdDy8CrCRqsLTpWyzMu/FNNIMd mOQF5++GLEgnQKu7gPtdX+yabXBQPrMNYPvRhu1L0zmGms45q4CMTLWNK9hzHGqhpOc/ bajvCKxjPxS1NjyegsHCax2tvCEFc/V80Qy/ngwTmZx5xuuGGmJ8bLp1QwiV0YroIosj AR3w== X-Forwarded-Encrypted: i=1; AJvYcCW238vy0erKGs5gHgtvijLJERk7q6ay9ABwHY1DtrRUpPhx/zZMwRBqppBYmHBGjVpJrksSm8Ncsw0k5aaSw2uQjIiKFITEw0Ds0AS9bHcAm+FMARzE4Rmkqe8NyflzrY7Fvm7LsqYFB4SP4s7IUi7zDYUMEnlzyJYwG4zleG287Tm92EHJ X-Gm-Message-State: AOJu0YyrNUVojxync6oUddlNFJi6LgLe2eN6RH1mbneXUtSNuhZGRqlq sQLZqgQk0J2SHHADui4p7zMVfykQXTYS+mx4vtCHePqlQsW1/kSDSWbE4+rZ X-Received: by 2002:a05:6512:e89:b0:513:dcd2:1267 with SMTP id bi9-20020a0565120e8900b00513dcd21267mr1342082lfb.23.1713284953511; Tue, 16 Apr 2024 09:29:13 -0700 (PDT) Received: from localhost (srv1.baikalchip.ru. [87.245.175.227]) by smtp.gmail.com with ESMTPSA id i11-20020ac25b4b000000b00518a37a7c2fsm1080400lfp.51.2024.04.16.09.29.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 09:29:13 -0700 (PDT) From: Serge Semin To: Viresh Kumar , Andy Shevchenko , Vinod Koul Cc: Serge Semin , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , dmaengine@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] dmaengine: dw: Fix src/dst addr width misconfig Date: Tue, 16 Apr 2024 19:28:54 +0300 Message-ID: <20240416162908.24180-1-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main goal of this series is to fix the data disappearance in case of the DW UART handled by the DW AHB DMA engine. The problem happens on a portion of the data received when the pre-initialized DEV_TO_MEM DMA-transfer is paused and then disabled. The data just hangs up in the DMA-engine FIFO and isn't flushed out to the memory on the DMA-channel suspension (see the second commit log for details). On a way to find the denoted problem fix it was discovered that the driver doesn't verify the peripheral device address width specified by a client driver, which in its turn if unsupported or undefined value passed may cause DMA-transfer being misconfigured. It's fixed in the first patch of the series. In addition to that two cleanup patch follow the fixes described above in order to make the DWC-engine configuration procedure more coherent. First one simplifies the CTL_LO register setup methods. Second one simplifies the max-burst calculation procedure and unifies it with the rest of the verification methods. Please see the patches log for more details. Signed-off-by: Serge Semin Cc: "Ilpo Järvinen" Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: dmaengine@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Semin (4): dmaengine: dw: Add peripheral bus width verification dmaengine: dw: Add memory bus width verification dmaengine: dw: Simplify prepare CTL_LO methods dmaengine: dw: Simplify max-burst calculation procedure drivers/dma/dw/core.c | 97 ++++++++++++++++++++++++++++++++++++----- drivers/dma/dw/dw.c | 43 +++++++++++------- drivers/dma/dw/idma32.c | 25 +++++++---- drivers/dma/dw/regs.h | 1 - 4 files changed, 129 insertions(+), 37 deletions(-) -- 2.43.0