aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2007-11-01 03:52:13 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:46 -0500
commit3627947e84dd2f6dbfd01f796139949f65a43b31 (patch)
tree86f4a5382cde3a8da303f6a6d81838fd08502c05 /drivers/net/sundance.c
parent993fb90c5b1727342362c43ed4e29c26682f54f7 (diff)
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> Tested-by: Volker Sauer <vsauer@dvs.tu-darmstadt.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 0a6186d4a48e..7d5561b8241c 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -1596,9 +1596,7 @@ static const struct ethtool_ops ethtool_ops = {
1596static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 1596static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1597{ 1597{
1598 struct netdev_private *np = netdev_priv(dev); 1598 struct netdev_private *np = netdev_priv(dev);
1599 void __iomem *ioaddr = np->base;
1600 int rc; 1599 int rc;
1601 int i;
1602 1600
1603 if (!netif_running(dev)) 1601 if (!netif_running(dev))
1604 return -EINVAL; 1602 return -EINVAL;
@@ -1606,30 +1604,6 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1606 spin_lock_irq(&np->lock); 1604 spin_lock_irq(&np->lock);
1607 rc = generic_mii_ioctl(&np->mii_if, if_mii(rq), cmd, NULL); 1605 rc = generic_mii_ioctl(&np->mii_if, if_mii(rq), cmd, NULL);
1608 spin_unlock_irq(&np->lock); 1606 spin_unlock_irq(&np->lock);
1609 switch (cmd) {
1610 case SIOCDEVPRIVATE:
1611 for (i=0; i<TX_RING_SIZE; i++) {
1612 printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", i,
1613 (unsigned long long)(np->tx_ring_dma + i*sizeof(*np->tx_ring)),
1614 le32_to_cpu(np->tx_ring[i].next_desc),
1615 le32_to_cpu(np->tx_ring[i].status),
1616 (le32_to_cpu(np->tx_ring[i].status) >> 2)
1617 & 0xff,
1618 le32_to_cpu(np->tx_ring[i].frag[0].addr),
1619 le32_to_cpu(np->tx_ring[i].frag[0].length));
1620 }
1621 printk(KERN_DEBUG "TxListPtr=%08x netif_queue_stopped=%d\n",
1622 ioread32(np->base + TxListPtr),
1623 netif_queue_stopped(dev));
1624 printk(KERN_DEBUG "cur_tx=%d(%02x) dirty_tx=%d(%02x)\n",
1625 np->cur_tx, np->cur_tx % TX_RING_SIZE,
1626 np->dirty_tx, np->dirty_tx % TX_RING_SIZE);
1627 printk(KERN_DEBUG "cur_rx=%d dirty_rx=%d\n", np->cur_rx, np->dirty_rx);
1628 printk(KERN_DEBUG "cur_task=%d\n", np->cur_task);
1629 printk(KERN_DEBUG "TxStatus=%04x\n", ioread16(ioaddr + TxStatus));
1630 return 0;
1631 }
1632
1633 1607
1634 return rc; 1608 return rc;
1635} 1609}