]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel.git/commit
mmc: block: fix packed command header endianness
authorTaras Kondratiuk <takondra@cisco.com>
Wed, 13 Jul 2016 22:05:38 +0000 (22:05 +0000)
committerSasha Levin <alexander.levin@verizon.com>
Sat, 6 Aug 2016 16:59:31 +0000 (12:59 -0400)
commitc30e87bae9b4bfa7918e30a18b8522eea08ae61f
tree5edcdfda38fccfe1cc965ac6f73fdce123af33c2
parentce05d315cec02835c77fa3f4b5119960e1654913
mmc: block: fix packed command header endianness

[ Upstream commit f68381a70bb2b26c31b13fdaf67c778f92fd32b4 ]

The code that fills packed command header assumes that CPU runs in
little-endian mode. Hence the header is malformed in big-endian mode
and causes MMC data transfer errors:

[  563.200828] mmcblk0: error -110 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc40
[  563.219647] mmcblk0: packed cmd failed, nr 2, sectors 16, failure index: -1

Convert header data to LE.

Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Fixes: ce39f9d17c14 ("mmc: support packed write command for eMMC4.5 devices")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/mmc/card/block.c