aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-11-26 14:54:48 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-01 16:32:29 -0500
commit29816d9aa55c99d463bd5507a46535b5fe79c33a (patch)
tree0a76ac1b18417d819eaa16066104876c16ef8545 /drivers/net/skge.c
parent1c1478859017452a1179dbbdf7b9eb5b48438746 (diff)
skge: FIFO Ram calculation error
The calculation of usable FIFO RAM is wrong in the skge driver. First, is doesn't take into account the reserved area on the original SysKonnect Genesis boards. Second it has an off-by-one error because hw->ports is either 1 or 2. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 6d62250fba07..14f06aea9ca0 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2619,8 +2619,8 @@ static int skge_up(struct net_device *dev)
2619 yukon_mac_init(hw, port); 2619 yukon_mac_init(hw, port);
2620 spin_unlock_bh(&hw->phy_lock); 2620 spin_unlock_bh(&hw->phy_lock);
2621 2621
2622 /* Configure RAMbuffers */ 2622 /* Configure RAMbuffers - equally between ports and tx/rx */
2623 chunk = hw->ram_size / ((hw->ports + 1)*2); 2623 chunk = (hw->ram_size - hw->ram_offset) / (hw->ports * 2);
2624 ram_addr = hw->ram_offset + 2 * chunk * port; 2624 ram_addr = hw->ram_offset + 2 * chunk * port;
2625 2625
2626 skge_ramset(hw, rxqaddr[port], ram_addr, chunk); 2626 skge_ramset(hw, rxqaddr[port], ram_addr, chunk);