Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29816d9aa55c99d463bd5507a46535b5fe79c33a
Commit:     29816d9aa55c99d463bd5507a46535b5fe79c33a
Parent:     1c1478859017452a1179dbbdf7b9eb5b48438746
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 26 11:54:48 2007 -0800
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Dec 1 16:32:29 2007 -0500

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/skge.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 6d62250..14f06ae 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2619,8 +2619,8 @@ static int skge_up(struct net_device *dev)
                yukon_mac_init(hw, port);
        spin_unlock_bh(&hw->phy_lock);
 
-       /* Configure RAMbuffers */
-       chunk = hw->ram_size / ((hw->ports + 1)*2);
+       /* Configure RAMbuffers - equally between ports and tx/rx */
+       chunk = (hw->ram_size  - hw->ram_offset) / (hw->ports * 2);
        ram_addr = hw->ram_offset + 2 * chunk * port;
 
        skge_ramset(hw, rxqaddr[port], ram_addr, chunk);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to