Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41455
b: refs/heads/master
c: 24b46a0
h: refs/heads/master
i:
  41453: 79cc299
  41451: 03fc3a0
  41447: 9be948a
  41439: 4bb8223
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Dec 2, 2006
1 parent c93b513 commit 72e4e11
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83717cf054214d144165c576cba6362d07fc6656
refs/heads/master: 24b46a0f0a9a736f125141f271102f70c2612a9f
26 changes: 26 additions & 0 deletions trunk/drivers/net/sk98lin/skethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,30 @@ static int setRxCsum(struct net_device *dev, u32 data)
return 0;
}

static int getRegsLen(struct net_device *dev)
{
return 0x4000;
}

/*
* Returns copy of whole control register region
* Note: skip RAM address register because accessing it will
* cause bus hangs!
*/
static void getRegs(struct net_device *dev, struct ethtool_regs *regs,
void *p)
{
DEV_NET *pNet = netdev_priv(dev);
const void __iomem *io = pNet->pAC->IoBase;

regs->version = 1;
memset(p, 0, regs->len);
memcpy_fromio(p, io, B3_RAM_ADDR);

memcpy_fromio(p + B3_RI_WTO_R1, io + B3_RI_WTO_R1,
regs->len - B3_RI_WTO_R1);
}

const struct ethtool_ops SkGeEthtoolOps = {
.get_settings = getSettings,
.set_settings = setSettings,
Expand All @@ -599,4 +623,6 @@ const struct ethtool_ops SkGeEthtoolOps = {
.set_tx_csum = setTxCsum,
.get_rx_csum = getRxCsum,
.set_rx_csum = setRxCsum,
.get_regs = getRegs,
.get_regs_len = getRegsLen,
};

0 comments on commit 72e4e11

Please sign in to comment.