All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh kumar <viresh.kumar@st.com>
To: linux-mmc@vger.kernel.org
Cc: Shiraz HASHIM <shiraz.hashim@st.com>
Subject: mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled
Date: Wed, 22 Dec 2010 17:29:47 +0530	[thread overview]
Message-ID: <4D11E833.7000506@st.com> (raw)

Hello,

I am using mmc_test.c driver present in drivers/mmc/test.c

Whenever i insert my card after booting linux i get this error:
"mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled"

I debugged a bit and found something strange. In file drivers/mmc/core/bus.c
following code is present.

int mmc_add_card(struct mmc_card *card)
{
...

	ret = device_add(&card->dev);
	if (ret)
		return ret;

#ifdef CONFIG_DEBUG_FS
	mmc_add_card_debugfs(card);
#endif

...
}

After device_add is called mmc_test_register_file_test routine (present in mmc_test.c) is
called and it tries to add "test" file inside card->debugfs_root directory.

But this directory is not actually present till the time mmc_add_card_debugfs() is called,
which actually creates it.

reversing the sequence of above routines seems to solve this issue.
I am not sure if i am doing something wrong or it is actually a bug.

-- 
viresh
ST Microelectronics
India.

             reply	other threads:[~2010-12-22 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 11:59 viresh kumar [this message]
2011-01-04 18:01 ` mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled Chris Ball
2011-01-05  3:37   ` viresh kumar
2011-01-05  3:48     ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D11E833.7000506@st.com \
    --to=viresh.kumar@st.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.