Commit 29816d9a authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

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: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 1c147885
...@@ -2619,8 +2619,8 @@ static int skge_up(struct net_device *dev) ...@@ -2619,8 +2619,8 @@ static int skge_up(struct net_device *dev)
yukon_mac_init(hw, port); yukon_mac_init(hw, port);
spin_unlock_bh(&hw->phy_lock); spin_unlock_bh(&hw->phy_lock);
/* Configure RAMbuffers */ /* Configure RAMbuffers - equally between ports and tx/rx */
chunk = hw->ram_size / ((hw->ports + 1)*2); chunk = (hw->ram_size - hw->ram_offset) / (hw->ports * 2);
ram_addr = hw->ram_offset + 2 * chunk * port; ram_addr = hw->ram_offset + 2 * chunk * port;
skge_ramset(hw, rxqaddr[port], ram_addr, chunk); skge_ramset(hw, rxqaddr[port], ram_addr, chunk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment