0001 /* nicstar.c v0.22 Jawaid Bazyar (bazyar@hypermall.com)
0002 * nicstar.c, M. Welsh (matt.welsh@cl.cam.ac.uk)
0003 *
0004 * Hacked October, 1997 by Jawaid Bazyar, Interlink Advertising Services Inc.
0005 * http://www.hypermall.com/
0006 * 10/1/97 - commented out CFG_PHYIE bit - we don't care when the PHY
0007 * interrupts us (except possibly for removal/insertion of the cable?)
0008 * 10/4/97 - began heavy inline documentation of the code. Corrected typos
0009 * and spelling mistakes.
0010 * 10/5/97 - added code to handle PHY interrupts, disable PHY on
0011 * loss of link, and correctly re-enable PHY when link is
0012 * re-established. (put back CFG_PHYIE)
0013 *
0014 * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only.
0015 *
0016 * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997
0017 *
0018 * Linux driver for the IDT77201 NICStAR PCI ATM controller.
0019 * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155;
0020 * see init_nicstar() for PHY initialization to change this. This driver
0021 * expects the Linux ATM stack to support scatter-gather lists
0022 * (skb->atm.iovcnt != 0) for Rx skb's passed to vcc->push.
0023 *
0024 * Implementing minimal-copy of received data:
0025 * IDT always receives data into a small buffer, then large buffers
0026 * as needed. This means that data must always be copied to create
0027 * the linear buffer needed by most non-ATM protocol stacks (e.g. IP)
0028 * Fix is simple: make large buffers large enough to hold entire
0029 * SDU, and leave <small_buffer_data> bytes empty at the start. Then
0030 * copy small buffer contents to head of large buffer.
0031 * Trick is to avoid fragmenting Linux, due to need for a lot of large
0032 * buffers. This is done by 2 things:
0033 * 1) skb->destructor / skb->atm.recycle_buffer
0034 * combined, allow nicstar_free_rx_skb to be called to
0035 * recycle large data buffers
0036 * 2) skb_clone of received buffers
0037 * See nicstar_free_rx_skb and linearize_buffer for implementation
0038 * details.
0039 *
0040 *
0041 *
0042 * Copyright (c) 1996 University of Cambridge Computer Laboratory
0043 *
0044 * This program is free software; you can redistribute it and/or modify
0045 * it under the terms of the GNU General Public License as published by
0046 * the Free Software Foundation; either version 2 of the License, or
0047 * (at your option) any later version.
0048 *
0049 * This program is distributed in the hope that it will be useful,
0050 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0051 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0052 * GNU General Public License for more details.
0053 *
0054 * You should have received a copy of the GNU General Public License
0055 * along with this program; if not, write to the Free Software
0056 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0057 *
0058 * M. Welsh, 6 July 1996
0059 *
0060 *
0061 */