netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stmmac: debugfs broken with multiple ethernets.
@ 2015-11-23 15:49 Pavel Machek
  2015-11-23 20:33 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2015-11-23 15:49 UTC (permalink / raw)
  To: peppe.cavallaro, netdev, linux-kernel

Hi!

stmmac_main will happily try to create two directories with the same
name.

I guess something like

static int id;
char name[100];

sprintf(name, STMMAC_RESOURCE_NAME "_%d", id++)
...

might be suitable, but did not try that further.

Best regards,

									Pavel

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 static int stmmac_init_fs(struct net_device *dev)
{
  -       /* Create debugfs entries */
  +       /* Create debugfs entries: FIXME: this is broken with more
  +          than one ethernet device. */
          stmmac_fs_dir = debugfs_create_dir(STMMAC_RESOURCE_NAME,
  NULL);

        if (!stmmac_fs_dir || IS_ERR(stmmac_fs_dir)) {
	
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2015-11-23 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 15:49 stmmac: debugfs broken with multiple ethernets Pavel Machek
2015-11-23 20:33 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).