Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1275499 > unrolled thread
| Started by | Pavel Machek <pavel@ucw.cz> |
|---|---|
| First post | 2015-11-23 16:50 +0100 |
| Last post | 2015-11-23 21:40 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
stmmac: debugfs broken with multiple ethernets. Pavel Machek <pavel@ucw.cz> - 2015-11-23 16:50 +0100
Re: stmmac: debugfs broken with multiple ethernets. Pavel Machek <pavel@ucw.cz> - 2015-11-23 21:40 +0100
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2015-11-23 16:50 +0100 |
| Subject | stmmac: debugfs broken with multiple ethernets. |
| Message-ID | <qy1xo-3M1-21@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2015-11-23 21:40 +0100 |
| Message-ID | <qy641-6NZ-11@gated-at.bofh.it> |
| In reply to | #1275499 |
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. Hmm. It seems this is fixed in v4.1. Sorry for the noise. Best regards, -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web