From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1CB20159574; Mon, 29 Jan 2024 17:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706548400; cv=none; b=JHtMrKmNt2oXlIkIIYuR7OuJ7FjTC7tqeN95fhnHfjdvypAoorUGk/iWHJYcC/G/4tjxvfvGQ5jPr1AW4MdsjgbsKgp2R/QLFnW17AUD5rNtFrzKYVI181r/V77VIJhBubEO3PUaeDYcN8UGfnKSFlfekKyGotuTeedsbuZ33jQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706548400; c=relaxed/simple; bh=DzqBuEWXOFov1BIa19rhjFUFKm2VplSrj/8zBOQsxlE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nPv80zsmSnixEQd0FJRVgYrl94wFlt6TXWT5HnfelrZlETlxW9NbAlRXRKEYaORfKFrCIrUXqmoNE5g/heibOvtDSmIHbgZKp/B1AidKyTzNCDcQw0o6wFJFhAlsUCDMB62gjjCNCsTsWy/p+v46zdwMYIKERc+OCkVZRxMNWcI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gq31Br67; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gq31Br67" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D997FC433B1; Mon, 29 Jan 2024 17:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706548399; bh=DzqBuEWXOFov1BIa19rhjFUFKm2VplSrj/8zBOQsxlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gq31Br67OrN4SfyfDfBaa7ZprUJ1ViuzwUpUSpW/DQHb6tQVgWrUci9P5ZL0tLgpp KdricugLyOm3XJCnV6E6GxZOZF2cadVmN+/na/1xt2MfyqnVJB0mrepch+SVis7gNj spu9Ehq+7o+21VVuTEh+vaeVi6bx3r2A+4R0Cc94= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kamal Dasu , Florian Fainelli , Mark Brown , Sasha Levin Subject: [PATCH 6.1 178/185] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read Date: Mon, 29 Jan 2024 09:06:18 -0800 Message-ID: <20240129170004.311647386@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129165958.589924174@linuxfoundation.org> References: <20240129165958.589924174@linuxfoundation.org> User-Agent: quilt/0.67 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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kamal Dasu [ Upstream commit 574bf7bbe83794a902679846770f75a9b7f28176 ] SFDP read shall use the mspi reads when using the bcm_qspi_exec_mem_op() call. This fixes SFDP parameter page read failures seen with parts that now use SFDP protocol to read the basic flash parameter table. Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Kamal Dasu Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://msgid.link/r/20240109210033.43249-1-kamal.dasu@broadcom.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 137e7315a3cf..b24955910147 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include "spi-bcm-qspi.h" @@ -1221,7 +1221,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem, /* non-aligned and very short transfers are handled by MSPI */ if (!IS_ALIGNED((uintptr_t)addr, 4) || !IS_ALIGNED((uintptr_t)buf, 4) || - len < 4) + len < 4 || op->cmd.opcode == SPINOR_OP_RDSFDP) mspi_read = true; if (!has_bspi(qspi) || mspi_read) -- 2.43.0