All of lore.kernel.org
 help / color / mirror / Atom feed
* mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled
@ 2010-12-22 11:59 viresh kumar
  2011-01-04 18:01 ` Chris Ball
  0 siblings, 1 reply; 4+ messages in thread
From: viresh kumar @ 2010-12-22 11:59 UTC (permalink / raw)
  To: linux-mmc; +Cc: Shiraz HASHIM

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.

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

end of thread, other threads:[~2011-01-05  3:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22 11:59 mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled viresh kumar
2011-01-04 18:01 ` Chris Ball
2011-01-05  3:37   ` viresh kumar
2011-01-05  3:48     ` Chris Ball

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.