|
@@ -26,6 +26,7 @@
|
|
|
#include "card.h"
|
|
|
#include "host.h"
|
|
|
#include "bus.h"
|
|
|
+#include "mmc_ops.h"
|
|
|
|
|
|
#define RESULT_OK 0
|
|
|
#define RESULT_FAIL 1
|
|
@@ -3264,6 +3265,14 @@ static int mmc_test_probe(struct mmc_card *card)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
+ if (card->ext_csd.cmdq_en) {
|
|
|
+ mmc_claim_host(card->host);
|
|
|
+ ret = mmc_cmdq_disable(card);
|
|
|
+ mmc_release_host(card->host);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
dev_info(&card->dev, "Card claimed for testing.\n");
|
|
|
|
|
|
return 0;
|
|
@@ -3271,6 +3280,11 @@ static int mmc_test_probe(struct mmc_card *card)
|
|
|
|
|
|
static void mmc_test_remove(struct mmc_card *card)
|
|
|
{
|
|
|
+ if (card->reenable_cmdq) {
|
|
|
+ mmc_claim_host(card->host);
|
|
|
+ mmc_cmdq_enable(card);
|
|
|
+ mmc_release_host(card->host);
|
|
|
+ }
|
|
|
mmc_test_free_result(card);
|
|
|
mmc_test_free_dbgfs_file(card);
|
|
|
}
|