Source
x
// Now the mantissa is in positions bit 16-25. Excepf for the "hidden 1" that's in bit 26.
/* drivers/atm/firestream.c - FireStream 155 (MB86697) and
* FireStream 50 (MB86695) device driver
*/
/* Written & (C) 2000 by R.E.Wolff@BitWizard.nl
* Copied snippets from zatm.c by Werner Almesberger, EPFL LRC/ICA
* and ambassador.c Copyright (C) 1995-1999 Madge Networks Ltd
*/
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The GNU GPL is contained in /usr/doc/copyright/GPL on a Debian
system and in the file COPYING in the Linux kernel source.
*/
/* for request_region */
static int loopback = 0;
static int num=0x5a;
/* According to measurements (but they look suspicious to me!) done in
* '97, 37% of the packets are one cell in size. So it pays to have
* buffers allocated at that size. A large jump in percentage of
* packets occurs at packets around 536 bytes in length. So it also
* pays to have those pre-allocated. Unfortunately, we can't fully
* take advantage of this as the majority of the packets is likely to
* be TCP/IP (As where obviously the measurement comes from) There the
* link would be opened with say a 1500 byte MTU, and we can't handle
* smaller buffers more efficiently than the larger ones. -- REW
*/
/* Due to the way Linux memory management works, specifying "576" as
* an allocation size here isn't going to help. They are allocated
* from 1024-byte regions anyway. With the size of the sk_buffs (quite
* large), it doesn't pay to allocate the smallest size (64) -- REW */
/* This is all guesswork. Hard numbers to back this up or disprove this,
* are appreciated. -- REW */
/* The last entry should be about 64k. However, the "buffer size" is
* passed to the chip in a 16 bit field. I don't know how "65536"
* would be interpreted. -- REW */
static int rx_buf_sizes[NP] = {128, 256, 512, 1024, 2048, 4096, 16384, 65520};
/* log2: 7 8 9 10 11 12 14 16 */
static int rx_pool_sizes[NP] = {1024, 1024, 512, 256, 128, 64, 32, 32};