|
| 1 | +ENC624J6Net - A SANA-II driver for the Scratze card |
| 2 | + |
| 3 | +ENC624J6Net Copyright (C) 2018 Henryk Richter <henryk.richter@gmx.net> |
| 4 | + |
| 5 | +This driver is supposed to support ENC624J600 based ethernet on the |
| 6 | +ZII LAN IDE CP card designed by Matze (a1k.org), Buggs (a1k.org) |
| 7 | +and Scrat (a1k.org). |
| 8 | + |
| 9 | +Please see at the end of the file for information about licensing |
| 10 | +conditions. |
| 11 | + |
| 12 | + |
| 13 | +Installation: |
| 14 | +------------- |
| 15 | + |
| 16 | +Installation of the driver is straightforward. |
| 17 | +Just copy the enc624j6net.device to devs:networks and enable |
| 18 | +the interface in your favorite TCP/IP stack as usual. There is a version |
| 19 | +for MC68020 or later (enc624j6net.device) and another version for |
| 20 | +68000 (enc624j6net.device_68000). Choose the right one. |
| 21 | + |
| 22 | +So far, successful tests have been done with the free AmiTCP/IP 3.0b2, |
| 23 | +AmiTCP4.0-4.2, Genesis, MiamiDX and RoadShow. |
| 24 | + |
| 25 | +The Zorro board itself should be visible in early startup with manufacturer |
| 26 | +ID 2588 and card ID 123. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +Configuration options |
| 31 | +--------------------- |
| 32 | + |
| 33 | +No special configuration of the driver is necessary for normal operation. |
| 34 | +The configuration options outlined below are documented for tuning purposes. |
| 35 | + |
| 36 | +The config to be placed in ENVARC:sana2/enc624j6net.config and consists |
| 37 | +of a single line with parameters (much like CLI parameters). |
| 38 | + |
| 39 | +PRIORITY=PRI/K/N,BPS/K/N,MTU/K/N,FULLDUPLEX/S,FLOWCONTROL/S,TIMER/K/N,MULTICAST/S |
| 40 | + |
| 41 | + FULLDUPLEX - change Ethernet module into full duplex mode, |
| 42 | + caution: requires manual configuration of duplex mode |
| 43 | + on the switch, too. |
| 44 | + note: this switch should not be enabled in normal cases. |
| 45 | + The module features autoconfiguration that determines |
| 46 | + speed and duplex automatically. |
| 47 | + note(2): see miitool for changing speed/duplex |
| 48 | + settings at runtime. |
| 49 | + |
| 50 | + PRIORITY - server task priority (default 1) |
| 51 | + |
| 52 | + BPS - bit per seconds for statistics purposes |
| 53 | + |
| 54 | + MTU - maximum transmission unit (default 1500) |
| 55 | + |
| 56 | + MULTICAST - (V2.3+) override fine-grained automatic multicast filtering |
| 57 | + and accept all multicast frames (default: off) |
| 58 | + |
| 59 | + FLOWCONTROL - enable automatic flow control that throttles incoming |
| 60 | + data when the hardware buffer gets full |
| 61 | + |
| 62 | + example (useful for DSL via PPPoE with AmiTCP): |
| 63 | + echo "MTU=1492 PRIORITY=6" >ENVARC:sana2/enc624j6net.config |
| 64 | + |
| 65 | + |
| 66 | +Changelog: |
| 67 | +---------- |
| 68 | + |
| 69 | +2.7 - fixed MuForce hit |
| 70 | + |
| 71 | +2.4 - added second semaphore, specifically for the write list |
| 72 | + - recompiled using GCC 2.95 for slightly smaller binary |
| 73 | + - avoid full ethernet chip reset on startup when the |
| 74 | + registers seem to be in a sane state (faster init, especially |
| 75 | + with DHCP) |
| 76 | + - additional checks for properly built hardware: |
| 77 | + verify data bus bits before accepting card by |
| 78 | + a simple short mem test |
| 79 | + |
| 80 | +2.3 - implemented fine grained multicast filter hashes |
| 81 | + |
| 82 | +2.2 - some more tuning to RX/TX scheduling |
| 83 | + - added optional debug code to lowlevel routines |
| 84 | + - removed some obsolete bus transfers |
| 85 | + - uses DMACopyFromBuffer for IP-stacks supporting |
| 86 | + this capability |
| 87 | + - explicit 32 bit alignment for RX/TX to speed up |
| 88 | + ZIII transfers |
| 89 | + - added experimental support for MII interface to |
| 90 | + poll and modify speed and duplex settings on the |
| 91 | + fly |
| 92 | + - miitool added (see README.miitool) |
| 93 | + |
| 94 | +2.00 - improved RX speed for buffer wraparound cases |
| 95 | + - some more safety checks for boards with unresponsive |
| 96 | + ENC chips (explicit card bus clear before verification of |
| 97 | + chip presence) |
| 98 | + - version bump |
| 99 | + |
| 100 | +1.99 - fixed soft reset for ZIII firmware |
| 101 | + - re-enabled 32 Bit Buffer copies (unless Miami is active) |
| 102 | + - default server task priority for AmiTCP=6 (otherwise 0) |
| 103 | + - tuned RX/TX balancing to make RoadShow happy |
| 104 | + - added Packet Filter hook processing (needs testing) |
| 105 | + |
| 106 | +1.98 - improved TX speed |
| 107 | + - precaution: soft-reset cards in detection loop to make |
| 108 | + sure that no bogus settings are left over after reset |
| 109 | + - optional: disable length check in Sana-II Device Query |
| 110 | + |
| 111 | +1.97 - added New Style Device (NSD) commands |
| 112 | + - implemented SANA-II Device Query Extension |
| 113 | + |
| 114 | +1.93 - recompiled using SAS/C, now 1kB smaller |
| 115 | + |
| 116 | +1.91 - first Beta of completely rewritten driver |
| 117 | + - support for concurrent IP stacks |
| 118 | + - faster handling of statistics |
| 119 | + - multiple board support where applicable |
| 120 | + - workaround for Shapeshifter network plugin bug |
| 121 | + - GCC or VBCC as compiler (cross or native compilation) |
| 122 | + - faster lowlevel read/write |
| 123 | + |
| 124 | + |
| 125 | +Compilation / Development Notes |
| 126 | +------------------------------- |
| 127 | + |
| 128 | +Either VBCC or GCC (tested with version 2.95 only) can be used for |
| 129 | +cross-compiles. General options for compiler usage can be found in |
| 130 | +Common.mk. Also, you might want to adapt the paths to your setup |
| 131 | +(PREFX,SYSINC). In addition to the regular NDK, the sana2.h is expected |
| 132 | +in the devices/ subdir of the includes. sana2.h may be found in the |
| 133 | +AmiTCP or Roadshow SDK, respectively. |
| 134 | + |
| 135 | +Call |
| 136 | + |
| 137 | + make -f Makefile.enc |
| 138 | + |
| 139 | +for building the device. |
| 140 | + |
| 141 | +VBCC note: When calling the GNU Make port supplied with ADE/GG natively on AmigaOS3, |
| 142 | +please make sure that "vc" is within the search path of "/bin/sh". |
| 143 | + |
| 144 | +Native compilation is also supported for GCC and VBCC. In addition, SAS/C |
| 145 | +smakefiles are provided for the hardware targets. |
| 146 | + |
| 147 | +Call |
| 148 | + |
| 149 | + smake -f smakefile.enc |
| 150 | + |
| 151 | +for native building with SAS/C. |
| 152 | + |
| 153 | +Conceptually, the driver was meant to support multiple hardware targets. Therefore, |
| 154 | +it features a SANA-II frontend (device.c,deviceheader.c,deviceinit.c), a main |
| 155 | +server running in a task (server.c) and several hardware backends. A new hardware |
| 156 | +backend requires customized implementation of hw.c and hwprivate.h, along with |
| 157 | +additional hardware-specfic code, if needed. The device unit structure reserves |
| 158 | +three LONGS and three pointers for exclusive use by the hardware instance. Additional |
| 159 | +data for the hardware can be auto-allocated at device initialization time, if necessary. |
| 160 | +See "struct HWData" in hwprivate.h of existing backends. |
| 161 | + |
| 162 | + |
| 163 | +License: |
| 164 | +-------- |
| 165 | + |
| 166 | + This program is free software: you can redistribute it and/or modify |
| 167 | + it under the terms of the GNU General Public License as published by |
| 168 | + the Free Software Foundation, either version 3 of the License, or |
| 169 | + (at your option) any later version. |
| 170 | + |
| 171 | + This program is distributed in the hope that it will be useful, |
| 172 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 173 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 174 | + GNU General Public License for more details. |
| 175 | + |
| 176 | + You should have received a copy of the GNU General Public License |
| 177 | + along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 178 | + |
0 commit comments