Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1327992lqh; Mon, 6 May 2024 04:41:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHNFTVzS9qNWnwhfnXqLuFp/ivrgKMzIG+6PAcR1BZXSS685oTGi/DHlqP5tVIV5joCXfmGcd4pzR94cdwfxAJMQ2zyZRk0QMnXUsQnw== X-Google-Smtp-Source: AGHT+IFxUOIcVFuzwp6BqF1mbSiMCWtNDq3S6/b1EGQS7GMrl/bgpfqVl67kg5bInjxLAtxJysdZ X-Received: by 2002:a05:6808:1a17:b0:3c8:6416:3c36 with SMTP id bk23-20020a0568081a1700b003c864163c36mr12596755oib.40.1714995662486; Mon, 06 May 2024 04:41:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714995662; cv=pass; d=google.com; s=arc-20160816; b=l/xjc1h8tMcMJv6TM5IRK3uVqesj6i0n/AOcWlylqxR6PjOJpaxXLdEbsuQ9BWh3Ig v6O5ii5+Oo9m5uvBgdHEMYpuBv9HzzYCn9NwhxlE18GNbPThfY0Wq4r+/OOd+Ll1RfFv lqm+CjDe7iJ67y1CmvqgflvIJZBefvlMcNOmvZm/mNBuhItlA9+c61jI+4hK7d/ZvqiB l+/c55PJ0WvQreKHUZlL/591pG9tojUQUOZHIDf8q341m1KyGEhb4XBgpSZoX3dOu6HB REHj5BJUuclw5Brh8xy3AU2zplpUWDTUQLHcQaAXEHqFV3GlP+m3dRE1CE5u84vlGrr/ Vjuw== 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=ZCxAXUXWhe/lP8ZzWL2nsZSe47Ajm+jt6/VkocVA0zE=; fh=aG7hBLBmw1l015ofgK5wdSVNBW5CuCZaxxDB1+c/8fI=; b=rvBv+zMhPTkZn21kvSNHYjX/tUncBxWLPZgpWH0C4D3FpQniNJA9tHV4rwoOJ52GNi 9jBsBccANQ1wY5dCfprGZnUHppF0O0kH68jtPo40BMCaHEpnO6PVb89YoRpnkkGWZ0U5 eh8eR8jN/6JeMR7DLP+He7E0KNcjUgRpiYXrwiAH/7yI+yPyrbiAt4fgmuSgq2rMQz3H da/3VFbQO5yRMqQr9vFoTUG25j80rL6RSXf+EkpPCRV13mqfKP/oMbmTrpXd2wLY0BL9 x2gEBx2FvgvxoUcGNx6ytAgoOwcoQ0ns0AE3blKqHm8oooic0ixKB/NjItnqYW0q/k7F fmmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=Uzbc6M+2; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-169748-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169748-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id et26-20020a05622a4b1a00b0043ac18dc088si6023899qtb.716.2024.05.06.04.41.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 04:41:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169748-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=@sang-engineering.com header.s=k1 header.b=Uzbc6M+2; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-169748-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169748-linux.lists.archive=gmail.com@vger.kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 33F591C21016 for ; Mon, 6 May 2024 11:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E955E143C56; Mon, 6 May 2024 11:40:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Uzbc6M+2" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EC07143745 for ; Mon, 6 May 2024 11:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995636; cv=none; b=sAukGRuhbpweQUiM00tJh67y3GBVotHalgpbZRC7qJxOjG84HRLU7KXGwZzuhpP3UrQUxiDGsQ/o9qpTL8mdyYgVN9kmL0pi+rgdRAY8XZwpBzAQ+uoRyT0+plm59AdLxll7NckS9KoBisdPyktgIk4z9iG+62ihSuNTJiihkmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995636; c=relaxed/simple; bh=Cx+qQfcFxGp5OesTOD7Dtc00hMsXj5vjxdEpJZm+BBs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rx6nlpCyVa/p9aTiXjKScSLQ31ANtNZI1dglyfDV3uWM4BQ3rLs8uQ8rK2Z0ucutt1HAKfm4c34KDnqwN8Je7hAn0oq/w9FTqV76RZoXumZuvE7sC/NjSwmzB0h1THHXxShYMA3JXA2NMkbHc1YPbvt73lfstTjM45Ja5PsasBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Uzbc6M+2; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=ZCxAXUXWhe/lP8 ZzWL2nsZSe47Ajm+jt6/VkocVA0zE=; b=Uzbc6M+2v2gBMjSTAQ6DGh08HILRQm psDwDwdniyES0MjXhqRava67Pa7J0dDtnxtiyEKEbiEZqZC7USGdB7kAS45ezWWq wfZChMkj2AqmJlYErP7zmHirh/ftpbs0dO2fR3EM5GdBcxrP4R7cxdv3SZ5xkkN2 Rf6XdnLMR7JEI6wO8PdmQEbHRnX795UDO3LCEQSPv5dZO9vmsn3RmtMabNCV6sw4 J6oQ1fUSU0C6abVw3ldBH/nkW+0+PXMTIJ6DztMXrV85dm6AEHQAnyk1TwHKTI7m OlulJp25KpSTzEIg13XL+AUxIPyitp8HHCd75lDVzevtiJDWdrRQYM5Q== Received: (qmail 172746 invoked from network); 6 May 2024 13:40:28 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 6 May 2024 13:40:28 +0200 X-UD-Smtp-Session: l3s3148p1@tVc7iccXXrYgAwDPX0CuAO+oYiCi4tWm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 0/4] serial: sh-sci: response to Dirk's bugreport Date: Mon, 6 May 2024 13:40:16 +0200 Message-ID: <20240506114016.30498-6-wsa+renesas@sang-engineering.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-Transfer-Encoding: 8bit Investigating the issue Dirk reported [1], and after the RFC sent[2], here is now the series with my conclusions. Patch 1 fixes a real issue IMHO and is the minimal solution for backporting. Patch 2 adds some documentation. Patch 3 reduces potential race windows by letting the timer only run when we really want it. Patch 4 is a simplification because locking should be as simple as possible, right? I could trigger the code path meanwhile and did not encounter a regression. But I could not reproduce the initial report from Dirk, so I can't say this is a 100% fix. Yet, I think, we want these patches nonetheless. Dirk metioned that his system could have been shutting down. If so, patch 1 is probably the solution, but we don't know for sure. [1] https://lore.kernel.org/r/ee6c9e16-9f29-450e-81da-4a8dceaa8fc7@de.bosch.com [2] https://lore.kernel.org/r/20240416123545.7098-4-wsa+renesas@sang-engineering.com Wolfram Sang (4): serial: sh-sci: protect invalidating RXDMA on shutdown serial: sh-sci: describe locking requirements for invalidating RXDMA serial: sh-sci: let timeout timer only run when DMA is scheduled serial: sh-sci: simplify locking when re-issuing RXDMA fails drivers/tty/serial/sh-sci.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) -- 2.43.0