mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mmc: rtsx: fix incorrect last byte in R2 response
@ 2014-08-15  6:05 rogerable
  2014-08-15  6:06 ` [PATCH 1/2] mmc: rtsx_pci_sdmmc: " rogerable
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: rogerable @ 2014-08-15  6:05 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: rogerable, Dan Carpenter, linux-kernel, linux-mmc,
	driverdev-devel, wei_wang, micky_ching

From: Roger Tseng <rogerable@realtek.com>

(The original patch for PCI and USB was splitted here to make it easier for
stable tree.)

Current code erroneously fill the last byte of R2 response with an undefined
value. In addition, the controller actually 'offloads' the last byte
(CRC7, end bit) while receiving R2 response and thus it's impossible to get the
actual value. This could cause mmc stack to obtain inconsistent CID from the
same card after resume and misidentify it as a different card.

Fix by assigning dummy CRC and end bit: {7'b0, 1} = 0x1 to the last byte of R2.

Roger Tseng (2):
  mmc: rtsx_pci_sdmmc: fix incorrect last byte in R2 response
  mmc: rtsx_usb_sdmmc: fix incorrect last byte in R2 response

 drivers/mmc/host/rtsx_pci_sdmmc.c |    7 +++++++
 drivers/mmc/host/rtsx_usb_sdmmc.c |    7 +++++++
 2 files changed, 14 insertions(+)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-27  2:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15  6:05 [PATCH 0/2] mmc: rtsx: fix incorrect last byte in R2 response rogerable
2014-08-15  6:06 ` [PATCH 1/2] mmc: rtsx_pci_sdmmc: " rogerable
2014-08-18  9:33   ` Ulf Hansson
2014-08-15  6:06 ` [PATCH 2/2] mmc: rtsx_usb_sdmmc: " rogerable
2014-08-18  9:33   ` Ulf Hansson
2014-08-27  2:00 ` [PATCH 0/2] mmc: rtsx: " rh_

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®