mmc: core: change test of auto_bkops configured

Changing the test of whether auto_bkops is configured
allows for a case where the host tried to configure
auto_bkops yet the CMD6 failed in configuring the
device. This allows a case where manual bkops is configured
on a eMMC 5.1 device

Change-Id: Ia6c411f516bf27b8a5865109dcf4b290eb3d8e46
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts &
fixed compilation error]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Dov Levenglick 2015-07-20 17:33:03 +03:00 committed by Subhash Jadavani
parent d25b9c4733
commit 42dd0264d1
2 changed files with 5 additions and 7 deletions

View file

@ -759,7 +759,7 @@ void mmc_add_card_debugfs(struct mmc_card *card)
goto err; goto err;
if (mmc_card_mmc(card) && (card->ext_csd.rev >= 5) && if (mmc_card_mmc(card) && (card->ext_csd.rev >= 5) &&
(mmc_card_support_auto_bkops(card) || (mmc_card_configured_auto_bkops(card) ||
mmc_card_configured_manual_bkops(card))) mmc_card_configured_manual_bkops(card)))
if (!debugfs_create_file("bkops_stats", S_IRUSR, root, card, if (!debugfs_create_file("bkops_stats", S_IRUSR, root, card,
&mmc_dbg_bkops_stats_fops)) &mmc_dbg_bkops_stats_fops))

View file

@ -665,12 +665,10 @@ static inline bool mmc_card_configured_manual_bkops(const struct mmc_card *c)
return c->ext_csd.man_bkops_en & EXT_CSD_BKOPS_MANUAL_EN; return c->ext_csd.man_bkops_en & EXT_CSD_BKOPS_MANUAL_EN;
} }
/* static inline bool mmc_card_configured_auto_bkops(const struct mmc_card *c)
* By software design, auto_bkops will be enabled on the device if it supports {
* it. Therefore, testing if a card is configured to run bkops is synonymous return c->ext_csd.man_bkops_en & EXT_CSD_BKOPS_AUTO_EN;
* to checking if it supports bkops }
*/
#define mmc_card_configured_auto_bkops(c) mmc_card_support_auto_bkops(c)
#define mmc_card_name(c) ((c)->cid.prod_name) #define mmc_card_name(c) ((c)->cid.prod_name)
#define mmc_card_id(c) (dev_name(&(c)->dev)) #define mmc_card_id(c) (dev_name(&(c)->dev))