Hi Amos, On Wed, May 28, 2014 at 6:07 AM, Amos Kong <akong@xxxxxxxxxx> wrote:
16K is 2^2 * PAGE_SIZE, so the page order should be 2, not 3. This patch uses get_order() to get correct order, and fixes one typo in comment.
Thanks for your patch!
Signed-off-by: Amos Kong <akong@xxxxxxxxxx> --- This patch wasn't built. Geert, can you help to test it? I don't know if it needs a head file by using get_order().
It builds fine. The get_order() is nicely expanded to "2" in the assembler output. Now, I'd like to get some feedback from the MVME hackers first. Perhaps the comment was wrong?
-/* We have 16834 bytes of RAM for the init block and buffers. This places +/* We have 16384 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. */ +#define M147LANCE_RAM_SIZE 16384 /* 16K */ #define LANCE_LOG_TX_BUFFERS 1 #define LANCE_LOG_RX_BUFFERS 3
BTW,I also find it fishy why the driver uses only 1+3 buffers, since more RAM is available. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html