Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22357
b: refs/heads/master
c: 77b3d6a
h: refs/heads/master
i:
  22355: f28d1f5
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Mar 21, 2006
1 parent a11e078 commit 2455815
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 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: e07b1aa8b3ebedd3c7e0e1b4b524f1b2d62707cf
refs/heads/master: 77b3d6a2d56be5af87ffae5bb78a39c847d49f99
19 changes: 6 additions & 13 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,8 @@ static int sky2_reset(struct sky2_hw *hw)
sky2_write8(hw, STAT_FIFO_ISR_WM, 16);

sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 7));
sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 20));
sky2_write32(hw, STAT_LEV_TIMER_INI, sky2_us2clk(hw, 100));

/* enable status unit */
sky2_write32(hw, STAT_CTRL, SC_STAT_OP_ON);
Expand Down Expand Up @@ -2758,19 +2759,11 @@ static int sky2_set_coalesce(struct net_device *dev,
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
const u32 tmin = sky2_clk2us(hw, 1);
const u32 tmax = 5000;
const u32 tmax = sky2_clk2us(hw, 0x0ffffff);

if (ecmd->tx_coalesce_usecs != 0 &&
(ecmd->tx_coalesce_usecs < tmin || ecmd->tx_coalesce_usecs > tmax))
return -EINVAL;

if (ecmd->rx_coalesce_usecs != 0 &&
(ecmd->rx_coalesce_usecs < tmin || ecmd->rx_coalesce_usecs > tmax))
return -EINVAL;

if (ecmd->rx_coalesce_usecs_irq != 0 &&
(ecmd->rx_coalesce_usecs_irq < tmin || ecmd->rx_coalesce_usecs_irq > tmax))
if (ecmd->tx_coalesce_usecs > tmax ||
ecmd->rx_coalesce_usecs > tmax ||
ecmd->rx_coalesce_usecs_irq > tmax)
return -EINVAL;

if (ecmd->tx_max_coalesced_frames >= TX_RING_SIZE-1)
Expand Down

0 comments on commit 2455815

Please sign in to comment.