trivial cleanup
Subsystems (3)
cover trivial cleanup
I found the RAM size in comments isn't correct,
fix it.
Amos Kong (2):
mvme147: fix ram size in comment
hplance: fix ram size in comment
drivers/net/ethernet/amd/hplance.c | 4 ++-- drivers/net/ethernet/amd/mvme147.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/2 mvme147: fix ram size in comment
The order of ram pages is 3, so the ram size is 2^3 * 4K = 32K.
Signed-off-by Amos Kong <[email protected]>
--- drivers/net/ethernet/amd/mvme147.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/amd/mvme147.c +3 -3
@@ -26,9 +26,9 @@#include <asm/pgtable.h> #include <asm/mvme147hw.h> -/* We have 16834 bytes of RAM for the init block and buffers. This places +/* We have 32K of RAM for the init block and buffers. This places * an upper limit on the number of buffers we can use. NetBSD uses 8 Rx -* buffers and 2 Tx buffers. +* buffers and 2 Tx buffers, it takes (8 + 2) * 1544 bytes. */ #define LANCE_LOG_TX_BUFFERS 1#define LANCE_LOG_RX_BUFFERS 3
@@ -111,7 +111,7 @@ struct net_device * __init mvme147lance_probe(int unit) dev->dev_addr); lp =netdev_priv (dev); - lp->ram =__get_dma_pages (GFP_ATOMIC ,3 );/* 16K */ + lp->ram =__get_dma_pages (GFP_ATOMIC ,3 );/* 32K */ if (!lp->ram) {printk ("%s: No memory for LANCE buffers\n" , dev->name);free_netdev (dev);
Signature · 1 line
1.9.3
PATCH 2/2 hplance: fix ram size in comment
In reply to Amos Kongdrivers/net/ethernet/amd/hplance.h:
#define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */
#define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */
The offset of RAM start is 0x8000, the offset of RAM end is 0xC008, so the RAM size is 16392 bytes.
Signed-off-by Amos Kong <[email protected]>
--- drivers/net/ethernet/amd/hplance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/amd/hplance.c +2 -2
@@ -27,9 +27,9 @@#include "hplance.h" -/* We have 16834 bytes of RAM for the init block and buffers. This places +/* We have 16392 bytes of RAM for the init block and buffers. This places * an upper limit on the number of buffers we can use. NetBSD uses 8 Rx -* buffers and 2 Tx buffers. +* buffers and 2 Tx buffers, it takes (8 + 2) * 1544 bytes. */ #define LANCE_LOG_TX_BUFFERS 1#define LANCE_LOG_RX_BUFFERS 3
Signature · 1 line
1.9.3
David Miller
maintainerFrom: Amos Kong <[email protected]>
Date: Thu, 5 Jun 2014 11:01:20 +0800
Quoted 2 lines
I found the RAM size in comments isn't correct,
fix it.
Both patches applied, thank you.