stmmac: debugfs broken with multiple ethernets.
Subsystems (2)
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)) {Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
Quoted 5 lines
stmmac_mainwill happily try to create two directories with the same name.I guess something like
Quoted 7 lines
static int id;
char name[100];
sprintf(name, STMMAC_RESOURCE_NAME "_%d", id++)
...might be suitable, but did not try that further.
Hmm. It seems this is fixed in v4.1. Sorry for the noise.
Best regards,
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html