Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299946
b: refs/heads/master
c: 1bb57e9
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and David S. Miller committed Apr 26, 2012
1 parent bcf1e43 commit 0c8dbed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 51 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 768f7c7c121e80f458a9d013b2e8b169e5dfb1e5
refs/heads/master: 1bb57e940e1958e40d51f2078f50c3a96a9b2d75
52 changes: 9 additions & 43 deletions trunk/drivers/net/ethernet/dlink/dl2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,55 +1259,21 @@ rio_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
{
int phy_addr;
struct netdev_private *np = netdev_priv(dev);
struct mii_data *miidata = (struct mii_data *) &rq->ifr_ifru;

struct netdev_desc *desc;
int i;
struct mii_ioctl_data *miidata = if_mii(rq);

phy_addr = np->phy_addr;
switch (cmd) {
case SIOCDEVPRIVATE:
break;

case SIOCDEVPRIVATE + 1:
miidata->out_value = mii_read (dev, phy_addr, miidata->reg_num);
case SIOCGMIIPHY:
miidata->phy_id = phy_addr;
break;
case SIOCDEVPRIVATE + 2:
mii_write (dev, phy_addr, miidata->reg_num, miidata->in_value);
case SIOCGMIIREG:
miidata->val_out = mii_read (dev, phy_addr, miidata->reg_num);
break;
case SIOCDEVPRIVATE + 3:
break;
case SIOCDEVPRIVATE + 4:
break;
case SIOCDEVPRIVATE + 5:
netif_stop_queue (dev);
case SIOCSMIIREG:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
mii_write (dev, phy_addr, miidata->reg_num, miidata->val_in);
break;
case SIOCDEVPRIVATE + 6:
netif_wake_queue (dev);
break;
case SIOCDEVPRIVATE + 7:
printk
("tx_full=%x cur_tx=%lx old_tx=%lx cur_rx=%lx old_rx=%lx\n",
netif_queue_stopped(dev), np->cur_tx, np->old_tx, np->cur_rx,
np->old_rx);
break;
case SIOCDEVPRIVATE + 8:
printk("TX ring:\n");
for (i = 0; i < TX_RING_SIZE; i++) {
desc = &np->tx_ring[i];
printk
("%02x:cur:%08x next:%08x status:%08x frag1:%08x frag0:%08x",
i,
(u32) (np->tx_ring_dma + i * sizeof (*desc)),
(u32)le64_to_cpu(desc->next_desc),
(u32)le64_to_cpu(desc->status),
(u32)(le64_to_cpu(desc->fraginfo) >> 32),
(u32)le64_to_cpu(desc->fraginfo));
printk ("\n");
}
printk ("\n");
break;

default:
return -EOPNOTSUPP;
}
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/net/ethernet/dlink/dl2k.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,6 @@ struct ioctl_data {
char *data;
};

struct mii_data {
__u16 reserved;
__u16 reg_num;
__u16 in_value;
__u16 out_value;
};

/* The Rx and Tx buffer descriptors. */
struct netdev_desc {
__le64 next_desc;
Expand Down

0 comments on commit 0c8dbed

Please sign in to comment.