Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3494413imu; Sun, 11 Nov 2018 16:22:28 -0800 (PST) X-Google-Smtp-Source: AJdET5czBT30+CYHWXQqc/5auNTw8Mix3viEhXJpxs3QJGTZ3s4s0JVvrbcxAqQok+NbpnJ/CpRQ X-Received: by 2002:a17:902:9698:: with SMTP id n24-v6mr18315977plp.9.1541982148606; Sun, 11 Nov 2018 16:22:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541982148; cv=none; d=google.com; s=arc-20160816; b=PuBQxuaKaK9GMTONyCAn7VM9DocXC4VDEeaVA6UmogstpiEBTKy3r17THWl0J2oIqJ YUmdDLmTxTALDY5QbWZP7ZxEKS0uGG7oMkDl9GFLjE+hlVbacsGs78COOA8sTlpVEGIn YPvmchHXNbx3W5sWQxdCxuXV9TLBeURMbeCYCE6hDtuwXYfpDYQ1WsfbhjarKp0Ylnaj gjAUykdCuP16CGK20UGVfzt8pEcVVVyUk5CzXM7bBovTTQByj3BaW6HnPSgtsoIj8v/v ji2MGNvJXtNtVlNbMY7iqvbG2O6J+pGTHJFkkZA9HeQbmO+3wy+V1gh1IJL476r4JRiy JhjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HFsdyL57sDhpZwAtRdR8O+yYDt2OlgWKaucAyhtVBkY=; b=uvJ9yueuz0UR3Fd93nygwjvqPf+nxKcRS7l1qGJs/P2R2T9eKcEtIEtVPO9fIlVicL QIi/FzNBj/SVEusYyc/2tllZmhO0Wf3CsYieZtxRLlA0zwMYXek3G5ywReGA43v47fTM K58VUg7WXPD6i5CFMF9a31uVZN2KAXNuYG4iJZsKAcVlD9zlNvw4R16wA7+1rFpPoOZg 4+87jReX6pmnp/vbCiVvTrCGBjR0dxqYpt1Tl3H4JpFtAoWq9iYnpHfgalHegdde++4f a88+L+umQNeh8zMC5xZ9mnhw2OVg4uuUxDIJrIHI5cOsBPIzwFykIt05/wAcuUPhEAGQ R0qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="zt1/NqmB"; 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 3-v6si15777830plz.12.2018.11.11.16.22.13; Sun, 11 Nov 2018 16:22:28 -0800 (PST) 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="zt1/NqmB"; 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 S1730030AbeKLKLD (ORCPT + 99 others); Mon, 12 Nov 2018 05:11:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:58370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729645AbeKLIQv (ORCPT ); Mon, 12 Nov 2018 03:16:51 -0500 Received: from localhost (unknown [206.108.79.134]) (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 DE193214DB; Sun, 11 Nov 2018 22:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975215; bh=tQw1cr1bTY8AbC+jWkZyZ9AlZJErzp8KTznYOri2n+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zt1/NqmBLFE8y3Wf35LrH5GsyNcKtt9UZ0L4nK5+gYi86M87QSPVt3HcESp+4+vvQ p4jwyD5rlaR+i4F+cVwPoRk4/ugz0QaLea02YgmyCv/3fjZgerLEgvSYG8Kaf7yWSg OaWaq1Zd0sH9SpPdqWvGCHm+N9eCdgYgddMUgkIA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Boris Brezillon , Mark Brown Subject: [PATCH 4.19 011/361] spi: bcm-qspi: fix calculation of address length Date: Sun, 11 Nov 2018 14:15:58 -0800 Message-Id: <20181111221621.515068616@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafał Miłecki commit 0976eda7915507fe94e07870c19d717c9994b57a upstream. During implementation of the new API bcm_qspi_bspi_set_flex_mode() has been modified breaking calculation of address length. An unnecessary multiplication was added breaking flash reads. Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Rafał Miłecki Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -355,7 +355,7 @@ static int bcm_qspi_bspi_set_flex_mode(s int bpc = 0, bpp = 0; u8 command = op->cmd.opcode; int width = op->cmd.buswidth ? op->cmd.buswidth : SPI_NBITS_SINGLE; - int addrlen = op->addr.nbytes * 8; + int addrlen = op->addr.nbytes; int flex_mode = 1; dev_dbg(&qspi->pdev->dev, "set flex mode w %x addrlen %x hp %d\n",