Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp784270imm; Mon, 21 May 2018 14:23:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8fdn8VmpuQgYlVd+BksACKYA2Ko4ioghYhd+CK8kmaDZq7T0b54QWKFmJTIg6VIJTzyLz X-Received: by 2002:a17:902:7444:: with SMTP id e4-v6mr21320399plt.225.1526937784026; Mon, 21 May 2018 14:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526937784; cv=none; d=google.com; s=arc-20160816; b=0VmUrAEmyTC+f3OGgHo3dm+vfKbRr34GWL5Mj2pj1kGaYQ8lN5AMhwoxJUp20GNXWD pHUcWCX/2OZjqgViFEUAjnm+gq12bGMK8wHibIG/R6HL5h7FR9fsvgHbuhccr6wzqdKq 8z0XGBPpYSHf46TbQnZNKK7iFwpnyFScZytQKY5Fimic6gL/Br+6kQOIIN7WpzxzV5v9 lBE1YgTnSO6E8pzzZJm/4pghfA0rna+MDPt0R8B75KxFe/zc6CL74O+rSG1ykvtrVq5L UQTY/fJGc+kEreIXqz+IaIsPGv5od5bbidyzmBE4f+UriBXW0vNFtmZizhD+agemyzII Xqww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=slO+nuy4y+QPpRsGFJW0d4L/7CmZ690A7TA4dE6zwTU=; b=REJveMeWJ/jzKQ2w2iE0rSWET5YW8n5pI83rMgWN/LXzL/TYsHWIaqDLOznch3lrZo AuzKjM8aULVuRzs3GCnWT7U9M3ppu7g3EvqzDpNilkVHv4ZhtD5OhkHdO1MZFVDfuPAu elFY9LKzsuZNAF+rsq8PdCYXRLy4T+UwFmHmcM2CDAf/GAFfc6niqgFjn8nnpY9MTgaR IV1zBgAuD2KDxgX+XUyspvb5o05LktFPQQcbybECYhszmgu2vuOVbLhnu783b4u+kx0Y 6SX5WPZFihkSHJ4ql0KCcuZWUsm5uGbIVhAo3+eGvYeBJA+X7jt6MmfLimfTHpRqjtye 7Enw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UP3A49mo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3-v6si13251939plc.574.2018.05.21.14.22.49; Mon, 21 May 2018 14:23:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UP3A49mo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754263AbeEUVWj (ORCPT + 99 others); Mon, 21 May 2018 17:22:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:37448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754229AbeEUVWc (ORCPT ); Mon, 21 May 2018 17:22:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D4C52075C; Mon, 21 May 2018 21:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526937752; bh=Zb55EpGTIdLOjRovxASngrwSUONBSeT+Tgh733HfogY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UP3A49moWMo6YLLtOA+qK4QrD2Y+xFxYpk1n9CeFOTDU+IB5TCIcwqZ90VQI03RSf 9tWQIfgfX7sKNBUcqVz/zZMaT28oKd9nNnnjL8OHsaKzPCkqgtgKFL5sJ1w8iauP6D EyFEDN5uCjUtttXYErOyCHvmrq7dv3DD+SAgNGAQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kamal Dasu , Mark Brown Subject: [PATCH 4.16 013/110] spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL Date: Mon, 21 May 2018 23:11:10 +0200 Message-Id: <20180521210505.123001824@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180521210503.823249477@linuxfoundation.org> References: <20180521210503.823249477@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kamal Dasu commit 602805fb618b018b7a41fbb3f93c1992b078b1ae upstream. Always confirm the BSPI_MAST_N_BOOT_CTRL bit when enabling or disabling BSPI transfers. Fixes: 4e3b2d236fe00 ("spi: bcm-qspi: Add BSPI spi-nor flash controller driver") Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -490,7 +490,7 @@ static int bcm_qspi_bspi_set_mode(struct static void bcm_qspi_enable_bspi(struct bcm_qspi *qspi) { - if (!has_bspi(qspi) || (qspi->bspi_enabled)) + if (!has_bspi(qspi)) return; qspi->bspi_enabled = 1; @@ -505,7 +505,7 @@ static void bcm_qspi_enable_bspi(struct static void bcm_qspi_disable_bspi(struct bcm_qspi *qspi) { - if (!has_bspi(qspi) || (!qspi->bspi_enabled)) + if (!has_bspi(qspi)) return; qspi->bspi_enabled = 0;