From patchwork Wed Feb 21 21:22:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1305519dyc; Wed, 21 Feb 2024 13:23:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXlO399tbM0uukek8WP4QxC5IdRkOxGGglpBC9dZTgb+m74ewW4Eg0OTfm8kSPnBPAbDb7Yf7xLnCBylgNla0c+pM08ng== X-Google-Smtp-Source: AGHT+IGc/7Aw6n7vBRwFuL5Vh8GJvSpOzyr0C1XNnltMDAtk04GOWEgkOSoh/P70v4WW60uGO/ig X-Received: by 2002:a05:6a21:9209:b0:19e:bc6b:e1ae with SMTP id tl9-20020a056a21920900b0019ebc6be1aemr24206189pzb.54.1708550614569; Wed, 21 Feb 2024 13:23:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708550614; cv=pass; d=google.com; s=arc-20160816; b=YL3WBu/O9wC1RnWU5RAxWwSgsO2bZiPVHjElGY1dGumX9OhKayfTx2/rvufvawCDRQ 80m6Axjqvp4kFRDVnrXOTknaYAeq7/z+yL8ogodWzwgN7WG913HB48eCLpmF3hZDFiXm fKIgiCy78iYBloeT4eO0QH85laY1fQUZou0uAkfrCOZ9TQAfe4/z8dQoK8fSXIxK4Ht3 n/txU0/ssR99Kbw4snqh+Ay0PkK8KoMp7hDYb3ZaFb4iqLjHlVyB9Y06sj/oVEUz9Q4U hi1Sx7ROnQmP7bEc1hwzBLdT8+hwY30aOySXOTA0gPRGIN4D6vhUMMC8YiuyLEX0v7MN PMRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=+9Q8p0SNxiEFE6O8wlGL+9mnBksm30FOR3CroGvtLII=; fh=XTmf0HW3WQRMFiQMJ7V6eCqOsjPIqmGu75N/fCHLvZc=; b=NvOnj6TP9Chx2EQ265H4ldUJklkbeoDuRuPaAgC8t2dveX1fMdZuVkEeYtuuFdCnyM IYSYD1QJ9Hp6iBxvo+ECS7uqQxO/n68PGdk8Xm731MtGur/TUhI5VRwroBY5F3f4fLTb 6fcdHt6hUXFaOba0Szfe8xoRroXQmOtylgS9DaM4W5PJXsUzEU8hx7vglOem75hp3awC eYO+gQyCNBLcAgPgIwOVsX1EQe8Xhb3hXpaMdUywSmlbXrbrslVbO9FNjKM1y1GiJN8k bb4TacVs9ugqmpBRhcyhegotqoNbLr983oeOJBIT0ShokprtMfRHh8nHv/o4n+TB19oh ENnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeU+u+gH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75516-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id nb9-20020a17090b35c900b002995df256d9si8360145pjb.164.2024.02.21.13.23.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:23:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeU+u+gH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75516-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75516-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 67F59286BB5 for ; Wed, 21 Feb 2024 21:23:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2004112837E; Wed, 21 Feb 2024 21:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CeU+u+gH" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 B720C86158 for ; Wed, 21 Feb 2024 21:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550589; cv=none; b=LLsHmwI3OaYAhzdPtTDLgy7H9kOhEpO7YQop97DVSawXKeN4LYStbt3tZ3yd5TTQFQl8iLJlsE4j+17HfcgtNq11skk/09U/R11LifX8Z9RJGeA4hnHEJzusOl6sjsZwoHIXJqc7QuJkcmD+thVP4uhN7/YCpERHWDhhb0YY44o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550589; c=relaxed/simple; bh=iiRktMYHLIJ9fptDhlCR5IFkYS+XarAW+y4+IYRyFw8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=pYXSA7a6I+8HgUafMzFeuaW5ljWrsl5TtSmbmPO7/CKWudTTSAMla7gZuZ/Ztfacow2M2Qt0WIbKoM7yVDGMnQ/8M9QZhumpRbEgjBfxpM9Ijere0nB5E0ijjiqx1vfQgsyG0PwoQ6is6CA1hd/XlKP9czG4LVZaAutFu1lyJTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CeU+u+gH; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-55a8fd60af0so10453719a12.1 for ; Wed, 21 Feb 2024 13:23:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708550586; x=1709155386; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=+9Q8p0SNxiEFE6O8wlGL+9mnBksm30FOR3CroGvtLII=; b=CeU+u+gHSpthGT9lD1Z7wo9COU75Ry8rfrq+gqRGck12/9xV5bW7HP+Fv/+bAwC2MA 21xfSvuSRDy2+DzOLShNmbuAeIpkTiDBgHxXbhKzXHBOKnKF46jNqjKiMaSO2UxINLJe 2z0WhZNqi9kBEHNxFW51BF+HwQ3NJgwpSF3TBHNhXYAuSmjvyKATuaDviiZxglKL3dKu /SPb+T/HJ1o4P8B6mqP16iUezS+uNPKu91cEVvGP+6BVCdPyx0C9SR8mOktZ89WSd2Pi 4iqZg6pZLAqotiIYvgdV0fnC+ACoQwtl8OWw74a9ZrTiKg36kwyfaqmJNMQkFiZVp5az /Wkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708550586; x=1709155386; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+9Q8p0SNxiEFE6O8wlGL+9mnBksm30FOR3CroGvtLII=; b=VmG5hcjCRiYw6QhTyS8uhlyxsZdT/qm5zDAa/Q+AxedCK6tPUT90ksoQNFiWonaeZf ZN7H1Z63+WR7X+6xWyMRLS/iUSs0e86xse12M82kDfUkwJGm+hFjJdxEnYZzKoVK5cY9 iIEveuOY+u+U1hPywhMl3Ra8qdfiAdu0NLnE3eDff/Ug35UVbrO4kqbphFzXfhIs75EY MZTktyemnxiJmNRIVL3wP9b2ZzTSBEIILDaOrKisYPy2ykNCCxB7pLQOK0sl8v6mtpCw Jfc/w3ZDp30d7fL80QhqfZ6n1ovnp46lqjZL9rzbqzGKnYOSahQiJ30bMqRplpBOrPfD gp6Q== X-Forwarded-Encrypted: i=1; AJvYcCVXZoa/xWz4OMi9ZAzjpJ6872VljyKSVkw0qmC3LYhJD6gisCtYWLxQObc+0CLiYvTyxyQEL73qAZZ+9GgSpEC6MpEMB0/9HavzpsQX X-Gm-Message-State: AOJu0YxuAffk+tED60Ju4lJ9AMv0Y85nRWv+Jhmc/J1DcyehQ/HEMtxA NZjao3Ik+whaSDDR7EA0Xvi1FAHDuO1CywB9G5o1DtkBI+McIiHeYAV9ZjjKHLw= X-Received: by 2002:aa7:d697:0:b0:564:56ce:5570 with SMTP id d23-20020aa7d697000000b0056456ce5570mr6568833edr.33.1708550585958; Wed, 21 Feb 2024 13:23:05 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id h14-20020a056402094e00b005644221a3desm4018764edz.3.2024.02.21.13.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:23:05 -0800 (PST) From: Linus Walleij Subject: [PATCH v2 0/2] Try to fix the sg_mitet bugs in SH MMCIF Date: Wed, 21 Feb 2024 22:22:59 +0100 Message-Id: <20240221-fix-sh-mmcif-v2-0-5e521eb25ae4@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIALNp1mUC/3WMywrCMBBFf6XM2pEkVNK68j+kizSPZsAmMpGil Py7sXuX517O2aF4Jl/g2u3AfqNCOTVQpw5sNGnxSK4xKKF6oZTAQG8sEdfVUsB+tNJ5Lexl1tC UJ/v2H7n71DhSeWX+HPVN/tY/oU2ixHl0YjB60FaG24OS4XzOvMBUa/0Cd6QVcqkAAAA= To: Geert Uytterhoeven , Ulf Hansson Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Geert Uytterhoeven X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791545169344273242 X-GMAIL-MSGID: 1791545169344273242 This adresses some bugs found after the introduction of the memory iterator sg_miter to the sh mmcif driver. This was first just one patch for fixing the atomic bug, but now also a second patch is needed to fix a semantic issue. Signed-off-by: Linus Walleij --- Changes in v2: - Collect Geerts test tag on patch 1 - Add a second patch fixing the problem with advancing to the next sglist entry before reading/writing the first block and after reading/writing each block in a multiblock operation. - Link to v1: https://lore.kernel.org/r/20240220-fix-sh-mmcif-v1-1-b9d08a787c1f@linaro.org --- Linus Walleij (2): mmc: sh_mmcif: sg_miter does not need to be atomic mmc: sh_mmcif: Advance sg_miter before reading blocks drivers/mmc/host/sh_mmcif.c | 46 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) --- base-commit: 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e change-id: 20240220-fix-sh-mmcif-49c1de70c5b7 Best regards,