* D-Link DFE-580TX and snmpd problems, who's maintainer of sundance.c ?
@ 2007-10-24 17:11 Volker Sauer
2007-10-24 21:46 ` Francois Romieu
0 siblings, 1 reply; 3+ messages in thread
From: Volker Sauer @ 2007-10-24 17:11 UTC (permalink / raw)
To: linux-kernel; +Cc: adi
[-- Attachment #1: Type: text/plain, Size: 974 bytes --]
Hi,
there already was a thread on this topic in summer but with no result:
http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/4b433f881e3585b2/a36ccba40ef2e59d?hl=en&lnk=gst&q=Re%3A+D-Link+DFE-580TX+4+port+NIC+problems#a36ccba40ef2e59d
Adi tracked down, that the messages in the syslog (in my case appearing
exactly every 30 seconds), come from snmpd running on the same machine
calling SIOCDEVPRIVATE.
This behaviour still exists in 2.6.23.1
I'm neither a skilled C-programmer nor a kernel-expert, but looking at
drivers/net/sundance.c:1605 I see, that SIOCDEVPRIVATE does
nothing else then printing this debug message.
So the questions is: why? What is this good for?
And: can I remove it? I can not abandon snmpd and the messages spam my
syslog.
Or: do I have to patch snmpd?
Regards
Volker
-> Please CC: me, I'm not on the list <-
P.S.: there's no one in the MAINTAINERS file for sundance.c. Is someone
here who still cares about this driver?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: D-Link DFE-580TX and snmpd problems, who's maintainer of sundance.c ?
2007-10-24 17:11 D-Link DFE-580TX and snmpd problems, who's maintainer of sundance.c ? Volker Sauer
@ 2007-10-24 21:46 ` Francois Romieu
2007-10-25 15:13 ` Volker Sauer
0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2007-10-24 21:46 UTC (permalink / raw)
To: Volker Sauer; +Cc: linux-kernel, adi, Jesse Huang
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
Volker Sauer <vsauer@dvs.tu-darmstadt.de> :
[...]
> I'm neither a skilled C-programmer nor a kernel-expert, but looking at
> drivers/net/sundance.c:1605 I see, that SIOCDEVPRIVATE does
> nothing else then printing this debug message.
Yuck.
> So the questions is: why? What is this good for?
> And: can I remove it? I can not abandon snmpd and the messages spam my
> syslog.
> Or: do I have to patch snmpd?
Please try the attached patch.
[...]
> P.S.: there's no one in the MAINTAINERS file for sundance.c. Is someone
> here who still cares about this driver?
Please Cc: netdev@vger.kernel.org on further replies, thanks.
--
Ueimor
[-- Attachment #2: 0001-sundance-SIOCDEVPRIVATE-pollution.patch --]
[-- Type: text/plain, Size: 2553 bytes --]
>From 27ad88dda586b28327e2e1e95e3a46986d30e0c7 Mon Sep 17 00:00:00 2001
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Wed, 24 Oct 2007 23:35:51 +0200
Subject: [PATCH] sundance: SIOCDEVPRIVATE pollution
To quote one of my favorite contemporary author:
[include/linux/sockios.h]
* THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
*/
#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */
[...]
Gentoo's snmpd trips up over this code when trying to figure if the
driver supports the non-SIOCDEVPRIVATE API or not. One can argue over
its choice of heuristic but there no reason to make ioctl more ugly
than needed.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Tester-Cc: Volker Sauer <vsauer@dvs.tu-darmstadt.de>
---
drivers/net/sundance.c | 26 --------------------------
1 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index ff98f5d..f12e727 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -1596,9 +1596,7 @@ static const struct ethtool_ops ethtool_ops = {
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct netdev_private *np = netdev_priv(dev);
- void __iomem *ioaddr = np->base;
int rc;
- int i;
if (!netif_running(dev))
return -EINVAL;
@@ -1606,30 +1604,6 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(&np->mii_if, if_mii(rq), cmd, NULL);
spin_unlock_irq(&np->lock);
- switch (cmd) {
- case SIOCDEVPRIVATE:
- for (i=0; i<TX_RING_SIZE; i++) {
- printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", i,
- (unsigned long long)(np->tx_ring_dma + i*sizeof(*np->tx_ring)),
- le32_to_cpu(np->tx_ring[i].next_desc),
- le32_to_cpu(np->tx_ring[i].status),
- (le32_to_cpu(np->tx_ring[i].status) >> 2)
- & 0xff,
- le32_to_cpu(np->tx_ring[i].frag[0].addr),
- le32_to_cpu(np->tx_ring[i].frag[0].length));
- }
- printk(KERN_DEBUG "TxListPtr=%08x netif_queue_stopped=%d\n",
- ioread32(np->base + TxListPtr),
- netif_queue_stopped(dev));
- printk(KERN_DEBUG "cur_tx=%d(%02x) dirty_tx=%d(%02x)\n",
- np->cur_tx, np->cur_tx % TX_RING_SIZE,
- np->dirty_tx, np->dirty_tx % TX_RING_SIZE);
- printk(KERN_DEBUG "cur_rx=%d dirty_rx=%d\n", np->cur_rx, np->dirty_rx);
- printk(KERN_DEBUG "cur_task=%d\n", np->cur_task);
- printk(KERN_DEBUG "TxStatus=%04x\n", ioread16(ioaddr + TxStatus));
- return 0;
- }
-
return rc;
}
--
1.5.2.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: D-Link DFE-580TX and snmpd problems, who's maintainer of sundance.c ?
2007-10-24 21:46 ` Francois Romieu
@ 2007-10-25 15:13 ` Volker Sauer
0 siblings, 0 replies; 3+ messages in thread
From: Volker Sauer @ 2007-10-25 15:13 UTC (permalink / raw)
To: Francois Romieu; +Cc: linux-kernel, adi, Jesse Huang, netdev
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
On Mi, 24 Okt 2007, Francois Romieu <romieu@fr.zoreil.com> wrote:
> > So the questions is: why? What is this good for?
> > And: can I remove it? I can not abandon snmpd and the messages spam my
> > syslog.
> > Or: do I have to patch snmpd?
>
> Please try the attached patch.
>
Hi Francois,
the patch solves the problem. Thank you.
Regards
Volker
--
Volker Sauer * Poststrasse 1/601 * 64293 Darmstadt * Germany
E-Mail/Jabber: volker(at)volker-sauer.de * http://www.volker-sauer.de
PGPKey-Fingerprint: DB26 11C7 B12E 0B27 3999 2E4F 7E35 4E4D 5DD5 D0E0
http://wwwkeys.de.pgp.net/pks/lookup?op=get&search=0x7E354E4D5DD5D0E0
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-25 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 17:11 D-Link DFE-580TX and snmpd problems, who's maintainer of sundance.c ? Volker Sauer
2007-10-24 21:46 ` Francois Romieu
2007-10-25 15:13 ` Volker Sauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome