Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58379
b: refs/heads/master
c: 3ead5db
h: refs/heads/master
i:
  58377: 2f0dddd
  58375: baad5d3
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jul 9, 2007
1 parent e0939ca commit 86cb566
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 3213e3abc68c776589d574decf3e6aee0467d12c
refs/heads/master: 3ead5db7bcd343917e567c083f5faf45f5301664
14 changes: 9 additions & 5 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3330,23 +3330,27 @@ static int sky2_get_regs_len(struct net_device *dev)

/*
* Returns copy of control register region
* Note: access to the RAM address register set will cause timeouts.
* Note: ethtool_get_regs always provides full size (16k) buffer
*/
static void sky2_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *p)
{
const struct sky2_port *sky2 = netdev_priv(dev);
const void __iomem *io = sky2->hw->regs;

BUG_ON(regs->len < B3_RI_WTO_R1);
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);
/* skip diagnostic ram region */
memcpy_fromio(p + B3_RI_WTO_R1, io + B3_RI_WTO_R1, 0x2000 - B3_RI_WTO_R1);

/* copy GMAC registers */
memcpy_fromio(p + BASE_GMAC_1, io + BASE_GMAC_1, 0x1000);
if (sky2->hw->ports > 1)
memcpy_fromio(p + BASE_GMAC_2, io + BASE_GMAC_2, 0x1000);

}

/* In order to do Jumbo packets on these chips, need to turn off the
Expand Down

0 comments on commit 86cb566

Please sign in to comment.