Revert "block: blk-merge: don't merge the pages with non-contiguous descriptors"

This reverts commit 2a0a33a38e2da51f30fb42bd962b2c444a39ce9c.
Revert "mmc: card: Add Sanitize unit test"

This reverts commit 22f7abfd7f866ce603735f00a833fec391aec877.
Revert "mmc: msm_sdcc: Advertise erase capability"

This reverts commit 2f32fa2a220beb380244e1d5e6e1b10cc3b605da.

Conflicts:

	drivers/mmc/host/msm_sdcc.c

Change-Id: I0d329eb9df0873201c796921976a7be109d16078
mmc: sdhci: fix incorrect command used in tuning

commit 473b095a72a95ba719905b1f2e82cd18d099a427 upstream.

For SD hosts using retuning mode 1, when retuning timer expired, it will
need to do retuning in sdhci_request before processing the actual
request. But the retuning command is fixed: cmd19 for SD card and cmd21
for eMMC card, so we can't use the original request's command to do the
tuning.

And since the tuning command depends on the card type attached to the
host, we will need to know the card type to use the correct tuning
command.

Signed-off-by: Aaron Lu <aaron.lu@amd.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Conflicts:

	drivers/mmc/host/sdhci.c

Change-Id: Iaa2fa9215bf79148fb9850c581047f4ea31413fc
mmc: card: Skip secure erase on MoviNAND; causes unrecoverable corruption.

commit 3550ccdb9d8d350e526b809bf3dd92b550a74fe1 upstream.

For several MoviNAND eMMC parts, there are known issues with secure
erase and secure trim.  For these specific MoviNAND devices, we skip
these operations.

Specifically, there is a bug in the eMMC firmware that causes
unrecoverable corruption when the MMC is erased with MMC_CAP_ERASE
enabled.

References:

http://forum.xda-developers.com/showthread.php?t=1644364
https://plus.google.com/111398485184813224730/posts/21pTYfTsCkB#111398485184813224730/posts/21pTYfTsCkB

Signed-off-by: Ian Chen <ian.cy.chen@samsung.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Conflicts:

	drivers/mmc/card/block.c

Change-Id: Ic813d266a3e411f457531e2123ee2fb374ca7c7e
mmc: sh-mmcif: avoid oops on spurious interrupts

commit 8464dd52d3198dd05cafb005371d76e5339eb842 upstream.

On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious
interrupts without any active request. To prevent the Oops, that results
in such cases, don't dereference the mmc request pointer until we make
sure, that we are indeed processing such a request.

Reported-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mmc: sdhci: fix NULL dereference in sdhci_request() tuning

commit 14efd957209461bbdf285bf0d67e931955d04a4c upstream.

Commit 473b095a72a9 ("mmc: sdhci: fix incorrect command used in tuning")
introduced a NULL dereference at resume-time if an SD 3.0 host controller
raises the SDHCI_NEEDS_TUNING flag while no card is inserted.  Seen on an
OLPC XO-4 with sdhci-pxav3, but presumably affects other controllers too.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"

commit 6984f3c31bb57cb7491dbec1be44b74bd00f4648 upstream.

This reverts commit 8464dd52d3198dd05, which was a misapplied debugging
version of the patch, not the final patch itself.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Revert "mmc: msm_sdcc: Add support for dynamic bus clock vote"

This reverts commit 9dbaf9d8bfc4e2f95abe1153d8f46fbbc47ac92a.
Revert "mmc: msm_sdcc: fix a type mismatch in msmsdccc_config_dma()"

This reverts commit 6252fbd31de540e87ed071a794784fb0a80e4410.
Revert "mmc: msm_sdcc: Enable clock scaling capability"

This reverts commit aa513e706c2f3db9ee5b9010f160aa9dde9d1333.
Revert "mmc: core: remove the polling for BKOPS completion"

This reverts commit 6f366e81592a9bc50c1ff6cc2606db9a0f51491a.
Revert "mmc: core: Fix MMC clock scaling in case of tuning failure"

This reverts commit 0e8654c78825bdeb1a8f3ed0fdf779fedd924ff5.
Revert "mmc: msm_sdcc: change the bkops_busy flag check to ignore_timeout"

This reverts commit 6a234a865b90a4cea4e91fb65a7bb55f0a7566d2.
Revert "mmc: core: handle flush requests timeout"

This reverts commit 651acc49bb2d2ae4270cb5b7ec7cc8c386c5fb5c.
PMEM: compatibility with older camera libs

Change-Id: I2a05277782e5a9e107453f445b0c193077701010
Revert "mmc: core: expose HPI capability to SWITCH commands"

This reverts commit 1d821b2eda8c8d7fc09f6c150b82247602f6939d.

Conflicts:

	include/linux/mmc/core.h

Change-Id: I9af1703f3e8919b8614016eb020fa08b43ca39cd
jenad: 3.4.84

Change-Id: I318f02691696c095b57c0d2c62f71f7fa3b0f709
Merge branch 'kk2.7-wip' of ssh://review.android-legacy.com:29418/android-legacy/android_kernel_msm_caf into wippie