Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* nicstar.c  v0.22  Jawaid Bazyar (bazyar@hypermall.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2)  * nicstar.c, M. Welsh (matt.welsh@cl.cam.ac.uk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  * Hacked October, 1997 by Jawaid Bazyar, Interlink Advertising Services Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * 	http://www.hypermall.com/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * 10/1/97 - commented out CFG_PHYIE bit - we don't care when the PHY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *	interrupts us (except possibly for removal/insertion of the cable?)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  * 10/4/97 - began heavy inline documentation of the code. Corrected typos
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  *	and spelling mistakes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)  * 10/5/97 - added code to handle PHY interrupts, disable PHY on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)  *	loss of link, and correctly re-enable PHY when link is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)  *	re-established. (put back CFG_PHYIE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)  *   Modified to work with the IDT7721 nicstar -- AAL5 (tested) only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)  * Linux driver for the IDT77201 NICStAR PCI ATM controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * see init_nicstar() for PHY initialization to change this. This driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  * expects the Linux ATM stack to support scatter-gather lists 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  * (skb->atm.iovcnt != 0) for Rx skb's passed to vcc->push.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)  * Implementing minimal-copy of received data:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)  *   IDT always receives data into a small buffer, then large buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)  *     as needed. This means that data must always be copied to create
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)  *     the linear buffer needed by most non-ATM protocol stacks (e.g. IP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)  *     Fix is simple: make large buffers large enough to hold entire
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)  *     SDU, and leave <small_buffer_data> bytes empty at the start. Then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)  *     copy small buffer contents to head of large buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)  *   Trick is to avoid fragmenting Linux, due to need for a lot of large
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)  *     buffers. This is done by 2 things:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)  *       1) skb->destructor / skb->atm.recycle_buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)  *            combined, allow nicstar_free_rx_skb to be called to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)  *            recycle large data buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)  *       2) skb_clone of received buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)  *   See nicstar_free_rx_skb and linearize_buffer for implementation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)  *     details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)  * Copyright (c) 1996 University of Cambridge Computer Laboratory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)  *   This program is free software; you can redistribute it and/or modify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)  *   it under the terms of the GNU General Public License as published by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)  *   the Free Software Foundation; either version 2 of the License, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)  *   (at your option) any later version.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)  * 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)  *   This program is distributed in the hope that it will be useful,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)  *   GNU General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)  *   You should have received a copy of the GNU General Public License
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)  *   along with this program; if not, write to the Free Software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)  * M. Welsh, 6 July 1996
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)  */