summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorCorneliu Doban <corneliu.doban@broadcom.com>2018-05-18 15:03:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:48:51 +0200
commit089440aa804c0e96b9b8442264dbea5179304125 (patch)
treea1cdfff31dc4aa0ee4edaf5f3ea80a786de5df4c /drivers/ata
parentc04a69fb83974aa25f1065fc0c7b63e046dc46f2 (diff)
downloadlinux-stable-089440aa804c0e96b9b8442264dbea5179304125.tar.gz
linux-stable-089440aa804c0e96b9b8442264dbea5179304125.tar.bz2
linux-stable-089440aa804c0e96b9b8442264dbea5179304125.zip
mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register
commit 5f651b870485ee60f5abbbd85195a6852978894a upstream. When the host controller accepts only 32bit writes, the value of the 16bit TRANSFER_MODE register, that has the same 32bit address as the 16bit COMMAND register, needs to be saved and it will be written in a 32bit write together with the command as this will trigger the host to send the command on the SD interface. When sending the tuning command, TRANSFER_MODE is written and then sdhci_set_transfer_mode reads it back to clear AUTO_CMD12 bit and write it again resulting in wrong value to be written because the initial write value was saved in a shadow and the read-back returned a wrong value, from the register. Fix sdhci_iproc_readw to return the saved value of TRANSFER_MODE when a saved value exist. Same fix for read of BLOCK_SIZE and BLOCK_COUNT registers, that are saved for a different reason, although a scenario that will cause the mentioned problem on this registers is not probable. Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver") Signed-off-by: Corneliu Doban <corneliu.doban@broadcom.com> Signed-off-by: Scott Branden <scott.branden@broadcom.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ata')
0 files changed, 0 insertions, 0 deletions