lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 30 Mar 2018 11:41:23 +0200
From:   Arkadiusz Kwiatkowski <arkadiusz.kwiatkowski@...iv.com>
To:     <vigneshr@...com>, <sourav.poddar@...com>, <broonie@...nel.org>
CC:     <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Arkadiusz Kwiatkowski" <arkadiusz.kwiatkowski@...iv.com>
Subject: [PATCH v2 1/2] spi: spi-ti-qspi: Fix parameters order in regmap_update_bits calls

This commit fixes the order of parameters passed to regmap_update_bits
function inside spi-ti-qspi driver. Accidentally the code worked
correctly when cs=0, but it is not the case for other values.

Signed-off-by: Arkadiusz Kwiatkowski <arkadiusz.kwiatkowski@...iv.com>
---
 drivers/spi/spi-ti-qspi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index c24d9b4..d0ea62d 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -490,8 +490,8 @@ static void ti_qspi_enable_memory_map(struct spi_device *spi)
        ti_qspi_write(qspi, MM_SWITCH, QSPI_SPI_SWITCH_REG);
        if (qspi->ctrl_base) {
                regmap_update_bits(qspi->ctrl_base, qspi->ctrl_reg,
-                                  MEM_CS_EN(spi->chip_select),
-                                  MEM_CS_MASK);
+                                  MEM_CS_MASK,
+                                  MEM_CS_EN(spi->chip_select));
        }
        qspi->mmap_enabled = true;
 }
@@ -503,7 +503,7 @@ static void ti_qspi_disable_memory_map(struct spi_device *spi)
        ti_qspi_write(qspi, 0, QSPI_SPI_SWITCH_REG);
        if (qspi->ctrl_base)
                regmap_update_bits(qspi->ctrl_base, qspi->ctrl_reg,
-                                  0, MEM_CS_MASK);
+                                  MEM_CS_MASK, 0);
        qspi->mmap_enabled = false;
 }

--
2.7.4

**************************************************************************************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. ****************************************************************************************

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ