From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E54B0191F93; Sat, 12 Sep 2026 14:42:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789224140; cv=none; b=QnDLuZxfkqkbifPB/EGpkmrMDoCdiv4f+wlkuE9YoSpN7WNUy2Vrscy0DgkK6hbf7+DwmgaCSdt/EiTOk+qJU4w+wYX+QjbIDqqnDGSm53kIDVoBZLxphaZhpu0aKGeCGWVJAiL9IP+UJkKtVlgFQcoxPet/g5nej8EbCKig7X0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789224140; c=relaxed/simple; bh=LqHeUEyiw+uKCqjMabybDJpKIWRIvBny1ul06rtioo4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RhNYU3/zxZ521smsKfze6U+/Hpz8jFaHambZmJtkD5eYEtQS1N59JBIi8mMsERb8ENUEdyCvQaYwHgazJPmFxq+MnPA7ChW3K49pbjt0EN+45QorizodXBCc0etyKfk65xX2j5yK9P0A+tzyE2owLDEajsbw2C+G+Hvez4tTWPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DgV3MsIA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DgV3MsIA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FC6A1F000FF; Sat, 12 Sep 2026 14:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789224138; bh=VJ2BKBPYjJN+g80LnP+2C382UtKPZzPpmaV7RblVOrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DgV3MsIAQ8cYvroJsqBuXSwyvwjywHeBc5OxwVu0sNELhK19Z0Pk4RKEncfNJc4nf 0I5ZvcDNlj1aXfaWaPKpXVuAGS4B7/JLT89AYSiu15pcpFFYPlk70ImMfISFcvM26b nJddZuNg2ZVt6ls+5ISmUKi91IINz7pzGqeco68E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Williamson , Manivannan Sadhasivam , Manivannan Sadhasivam , Jeff Hugo , Sasha Levin Subject: [PATCH 6.6 0932/1424] bus: mhi: host: Flush the posted write after writing to MHI_SOC_RESET_REQ_OFFSET Date: Sat, 12 Sep 2026 08:56:04 +0200 Message-ID: <20260912065628.193992221@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Manivannan Sadhasivam [ Upstream commit 24f4423cbc89548def2b05ae86de6175086dbf94 ] mhi_soc_reset() tries to reset the device by writing to the MHI_SOC_RESET_REQ_OFFSET register. But it doesn't do a read-back to ensure that the write gets flushed to the device before returning to the caller. This may lead to the delay (if implemented) on the caller to be insufficient, if the posted write doesn't reach the device before the delay. So add a read-back after writing to the MHI_SOC_RESET_REQ_OFFSET register. Fixes: b5a8d233a588 ("bus: mhi: core: Add device hardware reset support") Reported-by: Alex Williamson Closes: https://lore.kernel.org/linux-pci/20260622160822.09350246@shazbot.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeff Hugo Link: https://patch.msgid.link/20260623145134.43976-1-manivannan.sadhasivam@oss.qualcomm.com Signed-off-by: Sasha Levin --- drivers/bus/mhi/host/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c index 196929fff243e..e99ac5e72ac04 100644 --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c @@ -168,6 +168,9 @@ EXPORT_SYMBOL_GPL(mhi_get_mhi_state); void mhi_soc_reset(struct mhi_controller *mhi_cntrl) { + int __maybe_unused ret; + u32 tmp; + if (mhi_cntrl->reset) { mhi_cntrl->reset(mhi_cntrl); return; @@ -176,6 +179,9 @@ void mhi_soc_reset(struct mhi_controller *mhi_cntrl) /* Generic MHI SoC reset */ mhi_write_reg(mhi_cntrl, mhi_cntrl->regs, MHI_SOC_RESET_REQ_OFFSET, MHI_SOC_RESET_REQ); + /* Flush the posted write to the device (ignore return value) */ + ret = mhi_read_reg(mhi_cntrl, mhi_cntrl->regs, MHI_SOC_RESET_REQ_OFFSET, + &tmp); } EXPORT_SYMBOL_GPL(mhi_soc_reset); -- 2.53.0