From 971c250e68e3f0e1c1b330cfbd1f0aaf6458cdb3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:10:13 -0500 Subject: [PATCH] Import 1.3.25 --- CREDITS | 16 +- ...arcnet-jumpers.txt => arcnet-hardware.txt} | 292 +++++- Documentation/networking/arcnet.txt | 291 +++++- Documentation/networking/z8530drv.txt | 953 +++++++++++++++++ Makefile | 2 +- Rules.make | 2 + arch/alpha/boot/Makefile | 5 +- arch/alpha/config.in | 201 ++-- arch/i386/config.in | 37 +- arch/i386/kernel/bios32.c | 3 - arch/i386/kernel/process.c | 4 - arch/i386/kernel/ptrace.c | 2 + drivers/block/sonycd535.c | 22 +- drivers/char/README.scc | 943 +---------------- drivers/char/cyclades.c | 984 +++++++++++------- drivers/char/scc.c | 4 +- drivers/net/3c501.c | 3 +- drivers/net/3c505.c | 4 + drivers/net/3c507.c | 5 +- drivers/net/3c509.c | 2 + drivers/net/8390.c | 2 + drivers/net/Makefile | 64 +- drivers/net/arcnet.c | 164 ++- drivers/net/at1700.c | 5 +- drivers/net/atp.c | 2 + drivers/net/de4x5.c | 2 + drivers/net/depca.c | 2 + drivers/net/dummy.c | 4 + drivers/net/eepro.c | 3 +- drivers/net/eexpress.c | 2 + drivers/net/eql.c | 13 + drivers/net/ewrk3.c | 4 + drivers/net/ibmtr.c | 115 +- drivers/net/loopback.c | 2 + drivers/net/ni52.c | 2 + drivers/net/ni65.c | 2 + drivers/net/plip.c | 2 +- drivers/net/seeq8005.c | 3 +- drivers/net/sk_g16.c | 2 + drivers/net/tunnel.c | 9 +- drivers/net/wavelan.c | 2 + drivers/pci/pci.c | 239 +++-- fs/binfmt_elf.c | 13 + fs/exec.c | 7 + fs/nfs/dir.c | 33 +- fs/nfs/inode.c | 1 + fs/proc/array.c | 7 +- fs/proc/inode.c | 4 - fs/proc/root.c | 13 +- fs/smbfs/dir.c | 9 + include/asm-alpha/pgtable.h | 5 +- include/linux/cyclades.h | 27 +- include/linux/netdevice.h | 4 + include/linux/nfs_fs.h | 1 + include/linux/pci.h | 301 +++--- include/linux/sched.h | 4 + init/main.c | 33 +- kernel/fork.c | 10 +- kernel/sched.c | 9 +- mm/filemap.c | 1 + mm/memory.c | 2 +- net/Changes | 26 +- net/ax25/af_ax25.c | 2 + net/core/dev.c | 6 + net/core/iovec.c | 10 +- net/ipv4/arp.c | 20 +- net/ipv4/ip.c | 19 +- net/ipv4/ip_fw.c | 41 +- net/ipv4/tcp.c | 263 ++++- net/netrom/nr_dev.c | 2 + 70 files changed, 3255 insertions(+), 2038 deletions(-) rename Documentation/networking/{arcnet-jumpers.txt => arcnet-hardware.txt} (87%) create mode 100644 Documentation/networking/z8530drv.txt diff --git a/CREDITS b/CREDITS index 98ba55d838ae..704d44de7365 100644 --- a/CREDITS +++ b/CREDITS @@ -7,7 +7,7 @@ Linus ---------- -M: Matti Aarnio +N: Matti Aarnio E: mea@utu.fi D: LILO for AHA1542, modularized several of drivers/net/, D: dynamic SLIP devices, dynamic /proc/net/, true size /proc/ksyms, @@ -15,8 +15,13 @@ D: and other hacks.. D: Documenting various parts of network subsystem (kernel side) N: Werner Almesberger -E: almesber@bernina.ethz.ch +E: werner.almesberger@lrc.di.epfl.ch D: dosfs, LILO, some fd features, various other hacks here and there +S: Ecole Polytechnique Federale de Lausanne +S: DI-LRC +S: INR (Ecublens) +S: CH-1015 Lausanne +S: Switzerland N: H. Peter Anvin E: Peter.Anvin@linux.org @@ -673,6 +678,13 @@ S: Reinholdstrasse 14 S: D-37083 Goettingen S: Germany +N: David Mosberger-Tang +E: davidm@azstarnet.com +D: Linux/Alpha +S: 2552 E. Copper Street +S: Tucson, AZ 85716-2406 +S: USA + N: Ian A. Murdock E: imurdock@gnu.ai.mit.edu D: Creator of Debian distribution diff --git a/Documentation/networking/arcnet-jumpers.txt b/Documentation/networking/arcnet-hardware.txt similarity index 87% rename from Documentation/networking/arcnet-jumpers.txt rename to Documentation/networking/arcnet-hardware.txt index 09c4a696039d..ae4b303a07ef 100644 --- a/Documentation/networking/arcnet-jumpers.txt +++ b/Documentation/networking/arcnet-hardware.txt @@ -5,16 +5,253 @@ driver configuration help. ----------------------------------------------------------------------------- Because so many people (myself included) seem to have obtained ARCnet cards -without manuals, this will be a quick listing of all jumper settings I can -find. Please e-mail apenwarr@foxnet.net with any settings for -your particular card. +without manuals, this file contains a quick introduction to ARCnet hardware, +some cabling tips, and a listing of all jumper settings I can find. Please +e-mail apenwarr@foxnet.net with any settings for your particular card, or +any other information you have! + + +INTRODUCTION TO ARCNET +---------------------- + +ARCnet is a network type which works in a way similar to popular "ethernet" +networks but which is also different in some very important ways. + +First of all, you can get ARCnet cards in two speeds: 2.5Mbps (slower than +ethernet) and 100Mbps (faster than ethernet). The two hardware types, as +far as I'm aware, are not compatible and so you cannot wire a 100Mbps card +to a 2.5Mbps card, and so on. From what I hear, my driver does work with +100Mbps cards, but I haven't been able to verify this myself, since I only +have the 2.5Mbps variety. + +You also cannot connect an ARCnet card to any kind of ethernet card and +expect it to work. + +There are two "types" of ARCnet - STAR topology and BUS topology. This +refers to how the cards are meant to be wired together. According to all +available documentation, you can only connect STAR cards to STAR cards and +BUS cards to BUS cards. That makes sense, right? Well, it's not quite +true; see below under "Cabling." + +Once you get past these little stumbling blocks, ARCnet is actually quite a +well-designed standard. It uses something called "modified token passing" +which makes it completely incompatible with so-called "Token Ring" cards, +but which makes transfers much more reliable than with ethernet. In fact, +ARCnet will guarantee that a packet arrives safely at the destination, and +even if it can't possibly be delivered properly (ie. because of a cable +break) it will at least tell the sender about it. + +In addition, all known ARCnet cards have an (almost) identical programming +interface. This means that with one "arcnet" driver you can support any +card; whereas, with ethernet, each manufacturer uses what is sometimes a +completely different programming interface, leading to a lot of different, +sometimes very similar, ethernet drivers. Of course, always using the same +programming interface also means that when high-performance hardware +facilities like PCI busmastering DMA appear, it's hard to take advantage of +them. + +One thing that makes ARCnet cards difficult to program for, however, is the +limit on their packet sizes; standard ARCnet can only send packets that are +up to 508 bytes in length. This is smaller than the internet "bare minimum" +of 576 bytes, let alone the ethernet MTU of 1500. To compensate, an extra +level of encapsulation is defined by RFC1201 called "packet splitting" which +allows "virtual packets" to grow as large as 64K each, although they are +generally kept down to the ethernet-style 1500 bytes. + + +CABLING ARCNET NETWORKS +----------------------- + - Information in this section is from several contributors, including: + Stephen A. Wood + John Paul Morrison + Joachim Koenig + Vojtech Pavlik + + - I, Avery Pennarun, tried to arrange it into something that makes sense + when all put together. All mistakes, then, are most likely my fault. + Bug me about them. + +Ideally, according to documentation, ARCnet networks should be connected +with 93 Ohm cables with 93 Ohm resistors as terminators. I use TV cable and +no resistors to connect two STAR cards. Blah. Your mileage may vary. + +Here's some more specific information about cables, sent in by Joachim +Koenig (slight touchups by me): + + The following cables are valid for ARCnet: + RG-62 93 Ohm up to 610 m + RG-59/U 75 Ohm up to 457 m + RG-11/U 75 Ohm up to 533 m + IBM Typ 1 150 Ohm up to 200 m + IBM Typ 3 100 Ohm up to 100 m + +So you can see that while 93 Ohms is ideal, you can still go half a +kilometer with 75 Ohm TV cable. + +The above applies to all known ARCnet cards. Specific to STAR cards, +though, Stephen A. Wood has some information: + + When I bought my two cards at a garage sale, they came with little + box with four BNC connectors on the outside. The shields of the + four connectors are all grounded together, and the center conductors + were connected by the following resistor network. + + | + | + R + | + ---R-+-R--- + | + R + | + | + + Where R is 47 Ohms. A little math shows that if you terminate three + of the outputs with 90 ohms (A cable or a terminator), the remaining + input sees 90 Ohms. Therefore this box is impedance matched to 90 + Ohm cable. So this box can be used to connect 2 to 4 nodes + together. + +If you really use your imagination, you can see how the above diagram kind +of looks like a "star." John Paul Morrison makes a few notes about the +above: + + The "little box with four BNC connectors on the outside" is an + Arcnet passive hub. They're worth about $5 (just so you don't get + ripped off). + + I don't have specs at my fingertips. Basically, don't use too many + passive hubs (or none at all, apparently passive hubs are A Bad + Thing. On the other hand, they're a really cheap way to do things.) + + Arcnet active hubs are available; they are analogous to Ethernet + twisted pair hubs. You can plug either a single station or a passive + hub into each port on the active hub. If you plug in a passive hub, + that lets you connect three more stations. + +According to Vojtech Pavlik, there shouldn't be more than one passive hub +between two "active ends", an active end being an active hub or an ARCnet +card. + +As for BUS cards, they're even easier (for more than two cards, anyway; you +can't get much simpler than direct-connecting two STAR cards with a TV +cable). They work just like Thinnet ethernet; it looks like this: + + R------+------+------+------R + | | | + NODE NODE NODE + +Where R is the terminator as usual, and '+' represents a T connector. + +Okay, then, what if you have a combination of BUS cards and STAR cards? You +probably can't do ANY combination you want, but Vojtech Pavlik explains what +works for him (WARNING: I, Avery, haven't tried anything this weird myself): + + All that I need is to terminate each end with a STAR card. I think I + can even connect the cards like this: + + STAR------+-----+-----STAR + BUS BUS + + Where "-" stands for coax, "+" for T connector, "STAR" for star-type + arcnet card and BUS for bus-type arcnet cards. I think there will be + no terminators necessary. + +He also explains (I paraphrase slightly here): + + R-+----------STAR + BUS + + In this case, I have to terminate the end with the bus card + using a terminator. ("R" - terminator, "+" - T connector "-" - coax, + everything other is probably clear) + + [...] + + And _MAYBE_ you can do even more complicated and insane combinations + when just thinking of the STAR card as a BUS one with an inside + installed terminator. (STAR cards are NOT bus ones with terminator, + but I believe that they electrically act like them). + +And finally, he gives a shortcut for BUS users that are low on supplies: + + When you have really short cables (about four meters in total) and have lack + of terminators or T's you can leave one of the terminators out .... or put + it in the middle like this: + + BUS-----T-----BUS + R + + It's ugly, but it works. + +I don't pretend to understand what's happening there, but then again, I +don't have BUS cards either. + + + +SETTING THE JUMPERS +------------------- + +All ARCnet cards should have a total of four or five different settings: + + - the I/O address: this is the "port" your ARCnet card is on. Probed + values, as of v0.14, are only from 0x200 through 0x3F0. (If your card + has additional ones, which is possible, please tell me.) This should not + be the same as any other device on your system. According to a doc I + got from Novell, MS Windows prefers values of 0x300 or more, eating + netconnections on my system otherwise. + - Avery's favourite: 0x300. + + - the IRQ: on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7. + on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 10-15. Make + sure this is different from any other card on your system. Note that + IRQ2 is the same as IRQ9, as far as Linux is concerned. + - Avery's favourite: IRQ2. + + - the memory address: Unlike most cards, ARCnets use "shared memory" for + copying buffers around. Make SURE it doesn't conflict with any other + used memory in your system! + A0000 - VGA graphics memory (ok if you don't have VGA) + B0000 - Monochrome text mode + C0000 \ One of these is your VGA BIOS - usually C0000. + E0000 / + F0000 - System BIOS + + Anything less than 0xA0000 is, well, a BAD idea since it isn't above + 640k. + - Avery's favourite: 0xD0000 + + - the station address: Every ARCnet card has its own "unique" network + address from 0 to 255. Unlike ethernet, you can set this address + yourself with a jumper. Since it's only 8 bits, you can only have 254 + ARCnet cards on a network. DON'T use 0 or 255, since these are + reserved. (although neat stuff will probably happen if you DO use them). + By the way, if you haven't already guessed, don't set this the same as + any other ARCnet on your network! + - Avery's favourite: 3 and 4. Not that it matters. + + - There may be ETS1 and ETS2 settings. These may or may not make a + difference, but are used to change the delays used when powering up + a computer on the network. This is only necessary when wiring VERY + long range ARCnet networks, on the order of 4km or so; in any case, + the only real requirement here is that all cards on the network with + ETS1 and ETS2 jumpers have them in the same position. + -Even if your ARCnet model isn't listed, but has the same jumpers, please -e-mail me to say so. +Here's the all the jumper information I could obtain for individual card +types. Unfortunately, there is a lot of duplicated information here. +Someday, I may get around to actually organizing it. Until then... too much +is better than too little, I say :) + +The model # is listed right above specifics for that card, so you should be +able to use your text viewer's "search" function to find the entry you want. If your model isn't listed, and has different settings, PLEASE PLEASE tell me. I had to figure mine out without the manual, and it WASN'T FUN! +Even if your ARCnet model isn't listed, but has the same jumpers as another +model that is, please e-mail me to say so. + Cards Listed in this file (in this order, mostly): Manufacturer Model # Bits @@ -40,9 +277,6 @@ Cards Listed in this file (in this order, mostly): ** SMC = Standard Microsystems Corp. ** CNet Tech = CNet Technology, Inc. -The model # is listed right above specifics for that card. Don't forget to -read "quick briefing" first, since it applies to all ARCnets. - Unclassified Stuff ------------------ @@ -67,48 +301,6 @@ Unclassified Stuff --- CUT --- -Quick Briefing: ---------------- - -All ARCnet cards should have a total of four different settings: - - - the I/O address: this is the "port" your ARCnet card is on. Probed - values, as of v0.14, are only from 0x200 through 0x3F0. (If your card - has additional ones, which is possible, please tell me.) This should not - be the same as any other device on your system. According to a doc I - got from Novell, MS Windows prefers values of 0x300 or more, eating - netconnections on my system otherwise. - - Avery's favourite: 0x300. - - - the IRQ: on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7. - on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 10-15. Make - sure this is different from any other card on your system. Note that - IRQ2 is the same as IRQ9, as far as Linux is concerned. - - Avery's favourite: IRQ2. - - - the memory address: Unlike most cards, ARCnets use "shared memory" for - copying buffers around. Make SURE it doesn't conflict with any other - used memory in your system! - A0000 - VGA graphics memory (ok if you don't have VGA) - B0000 - Monochrome text mode - C0000 \ One of these is your VGA BIOS - usually C0000. - E0000 / - F0000 - System BIOS - - Anything less than 0xA0000 is, well, a BAD idea since it isn't above - 640k. - - Avery's favourite: 0xD0000 - - - the station address: Every ARCnet card has its own "unique" network - address from 0 to 255. Unlike ethernet, you can set this address - yourself. Since it's only 8 bits, you can only have 254 ARCnet cards on - a network. DON'T use 0 or 255, since these are reserved. (although neat - stuff will probably happen if you DO use them). By the way, if you - haven't already guessed, don't set this the same as any other ARCnet on - your network! - - Avery's favourite: 3 and 4. Not that it matters. - - ** Standard Microsystems Corp (SMC) ** PC100, PC110, PC120, PC130 (8-bit cards) PC500, PC600 (16-bit cards) diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 0ff778bab97e..0fa3286fec2f 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt @@ -1,15 +1,15 @@ ---------------------------------------------------------------------------- -NOTE: See also README.arcnet-jumpers in this directory for jumper-setting -information if you're like many of us and didn't happen to get a manual with -your ARCnet card. +NOTE: See also README.arcnet-hardware in this directory for jumper-setting +and cabling information if you're like many of us and didn't happen to get a +manual with your ARCnet card. ---------------------------------------------------------------------------- Since no one seems to listen to me otherwise, perhaps a poem will get your attention: - This is alpha software + This is scary software If it works I DO CARE. - + Hmm, I think I'm allowed to call that a poem, even though it's only two lines. Hey, I'm in Computer Science, not English. Give me a break. @@ -24,26 +24,32 @@ Come on, be a sport! Send me a success report! (hey, that was even better than my original poem... this is getting bad!) -Anyway, enough complaining. Let's get started: ---------------------------------------------------------------------------- - -These are the ARCnet drivers for Linux. +-------- +WARNING: +-------- -We're now back to more ALPHA releases after the 1.01 release which made it -into Linux 1.2.2, so please be careful, and send all possible -success/failure reports to me. If I don't know when/if/how it works, I -won't be able to answer people's questions. Do we want that? Of course -not. +If you don't e-mail me about your success/failure soon, I may be forced to +start SINGING. And we don't want that, do we? -Once again: DO send me success reports! I want to know if this is working! (You know, it might be argued that I'm pushing this point a little too much. If you think so, why not flame me in a quick little e-mail? Please also include the type of card(s) you're using, software, size of network, and whether it's working or not.) -My e-mail address is: - apenwarr@foxnet.net +My e-mail address is: apenwarr@foxnet.net + + +--------------------------------------------------------------------------- + + +These are the ARCnet drivers for Linux. + +This new "stable" release has come from many months of on-and-off effort +from me (Avery Pennarun), many bug reports from users, and in particular a +lot of input and coding from Tomasz Motylewski. (I've held off on Tomasz' +latest patches - but his all-new RFC1051 support is here and waiting for the +next ALPHA release!) Where do I discuss these drivers? @@ -62,38 +68,44 @@ Remember to remove your signature, or you'll get an error back. Send all bug (or success) reports to me or to the list. The people on linux-net@vger.rutgers.edu have also been known to be very -helpful! :) +helpful, especially when we're talking about ALPHA Linux kernels that may or +may not work right in the first place. Other Drivers and Info ---------------------- -Also, SMC (one of the companies that makes ARCnet cards) has a WorldWideWeb -site you might be interested in, which includes several drivers for various -cards including ARCnet. Try: +You can try my ARCNET page on the World Wide Web at: + http://www.foxnet.net/~apenwarr/arcnet/ + +Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you +might be interested in, which includes several drivers for various cards +including ARCnet. Try: http://www.smc.com/ Performance Technologies makes various network software that supports -ARCnet. +ARCnet: http://www.perftech.com/ or ftp to ftp.perftech.com. Novell makes a networking stack for DOS which includes ARCnet drivers. Try ftp'ing to ftp.novell.com. You can get the Crynwr packet driver collection (including arcether.com, the -one you'll want for arcnet cards) from oak.oakland.edu:/simtel/msdos/pktdrvr. -It won't work perfectly on a 386+ without patches, though, and also doesn't -like several cards. Mail me if you want a fixed version. (Ahem: I may or -may not have a 100% fixed version by the time I get your mail!) +one you'll want to use with arcnet cards) from +oak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+ +without patches, though, and also doesn't like several cards. Mail me if +you want a fixed version. (Ahem: I may or may not have a 100% fixed version +by the time I get your mail!) Loadable Module Support ----------------------- -This is a available starting with 0.42 ALPHA. +Configure and rebuild Linux. When asked, answer 'n' to "arcnet support" if +you want to use the loadable module. -Configure and rebuild Linux. When asked, say NO to "arcnet support" if you -want loadable module support. +Actually, with Linux 1.3.24 and higher, you should answer 'm' to build the +module. make config make dep @@ -101,10 +113,6 @@ want loadable module support. make zImage make modules - -Booting into your "ARCnet" Kernel ---------------------------------- - If you're using a loadable module, you need to use insmod to load the module, and you need to specify various characteristics of your card on the command line. For example: @@ -113,9 +121,14 @@ command line. For example: You can also add a num=1, num=2 etc for additional arcnet cards that will use arc1, arc2 etc for their device names (instead of the default, arc0). -Otherwise the driver will load and probe for your card automatically. - -Now go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be + +Using the Driver +---------------- + +If you build your kernel with ARCnet support included, it should probe for +your card automatically when you boot. + +Go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be available where you picked up this driver. Think of your ARCnet as a souped-up (or down, as the case may be) ethernet card. @@ -145,34 +158,199 @@ Windows: See DOS :) Trumpet Winsock works fine with either the Novell or LAN Manager and Windows for Workgroups: These programs use protocols that are incompatible with the internet standard. They try to pretend the cards are ethernet, and confuse everyone else on the network. - However, v1.93 ALPHA and later of the Linux ARCnet driver support - this protocol via the 'arc0e' device. After setting up arc0 as - usual, ifconfig and set up routes to your ethernet-encap hosts - through arc0e. There may be non-Microsoft products that support - this protocol as well, so it was changed in 1.93 ALPHA from arc0w - to arc0e. + + However, v2.00 of the Linux ARCnet driver supports this protocol via + the 'arc0e' device. See the section on "Multiprotocol Support" for + more information. Using the freeware Samba server and clients for Linux, you can now interface quite nicely with TCP/IP-based WfWg or Lan Manager - networks. In addition, the Linux host can be used as a router - between the standard and WfWg protocols, so hosts that could - previously never talk to each other should now be able to. - - This feature is still in early testing, so please e-mail with any - comments/questions you might have. + networks. +Windows 95: Tools are included with Win95 that let you use either the LANMAN + style network drivers (NDIS) or Novell drivers (ODI) to handle your + ARCnet packets. If you use ODI, you'll need to use the 'arc0' + device with Linux. If you use NDIS, then try the 'arc0e' device. + See the "Multiprotocol Support" section below if you need arc0e, + you're completely insane, and/or you need to build some kind of + hybrid network that uses both encapsulation types. + OS2: Has not been tested. The "correct" solution would be to buy either of IBM's "TCP/IP for OS/2" or "Warp Connect" packages. However, ftp.microsoft.com also has a freeware Lan Manager for OS/2 client - which should use the same protocol as WfWg does. This has not been - tested, however. Please mail me with any results. - + which should use the same protocol as WfWg does. I had no luck + installing it under Warp, however. Please mail me with any results. + NetBSD/AmiTCP: These use an old version of the Internet standard ARCnet - protocol which is incompatible with the Linux driver at present. - Work to support these is underway and should be available in a - standard release soon. + protocol (RFC1051) which is incompatible with the Linux driver at + present. Work to support these is underway and should be available + in an ALPHA release very soon. + +Using Multiprotocol ARCnet +-------------------------- +The ARCnet driver v2.00 supports two protocols, each on its own "virtual +network device": + arc0 - RFC1201 protocol, the official internet standard which just + happens to be 100% compatible with Novell's TRXNET driver. + Version 1.00 of the ARCnet driver _only_ supported this + protocol. arc0 is the faster of the two protocols, and + allows larger packets to be used because it supports RFC1201 + "packet splitting" operations. Unless you have a specific + need to use a different protocol, I highly suggest that you + stick with this one. + + arc0e - "Ethernet-Encapsulation" which sends packets over ARCnet + that are actually a lot like Ethernet packets, including the + 6-byte hardware addresses. This protocol is compatible with + Microsoft's NDIS ARCnet driver, like the one in WfWg and + LANMAN. Because the MTU of 493 is actually smaller than the + one "required" by TCP/IP (576), there is a chance that some + network operations will not work properly. The Linux TCP/IP + layer can compensate in most cases, however, by + automatically fragmenting the TCP/IP packets to make them + fit. arc0e also works slightly more slowly than arc0, for + reasons yet to be determined. (Probably it's the smaller + MTU that does it) + +The arc0e device is created automatically when you first 'ifconfig' the arc0 +device. To actually use arc0e, though, you need to 'ifconfig' it as well. +There are a number of ways you can set up your network then: + + +1. Single Protocol. + + This is the simplest way to configure your network: use just one of the + two available protocols. As mentioned above, it's a good idea to use + only arc0 unless you have a good reason (like some other software, ie. + WfWg, that only works with arc0e). + + If you need only arc0, then the following commands should get you going: + ifconfig arc0 MY.IP.ADD.RESS + route add MY.IP.ADD.RESS arc0 + route add SUB.NET.ADD.RESS arc0 + [etc] + + If you need arc0e (and only arc0e), it's a little different: + ifconfig arc0 up /* the IP address doesn't matter on arc0 */ + ifconfig arc0e MY.IP.ADD.RESS + route add MY.IP.ADD.RESS arc0e + route add SUB.NET.ADD.RESS arc0e + + +2. More than one protocol on the same wire. + + Now things start getting confusing. To even try it, you may need to be + partly crazy. Here's what *I* did. :) + + I have three computers on my home network; two Linux boxes (which prefer + RFC1201 protocol), and one XT that can't run Linux but runs the free + Microsoft LANMAN Client instead. + + Worse, one of the Linux computers (freedom) also has a modem and acts as + a router to my information provider. The other Linux box (insight) also + has its own IP address and needs to use freedom as its default gateway. + The XT (patience), however, does not have its own internet IP address and + so I assigned it one on a "private subnet" (as defined by RFC1597). + + To start with, take a simple network with just insight and freedom. + Insight needs to: + - talk to freedom via RFC1201 (arc0) protocol, because I like it + more and it's faster. + - use freedom as its internet gateway. + + That's pretty easy to do. Set up insight like this: + ifconfig arc0 insight + route add insight arc0 + route add freedom arc0 /* I would use the subnet here (like I said + to to in "single protocol" above), + but the rest of the subnet + unfortunately lies across the PPP + link on freedom, which confuses + things. */ + route add default gw freedom + + And freedom gets configured like so: + ifconfig arc0 freedom + route add freedom arc0 + route add insight arc0 + /* and default gateway is configured by PPP */ + + Great, now insight talks to freedom directly on arc0, and sends packets + to the internet through freedom. If you didn't know how to do the above, + you should probably stop reading this section now because it only gets + worse. + + Now, how do I add patience into the network? It will be using LANMAN + Client, which means I need the arc0e device. It needs to be able to talk + to both insight and freedom, and also use freedom as a gateway to the + internet. (Recall that patience has a "private IP address" which won't + work on the internet; that's okay, I configured Linux IP masquerading on + freedom for this subnet). + + So patience (necessarily; I don't have another IP number from my + provider) has an IP address on a different subnet than freedom and + insight, but needs to use freedom as an internet gateway. Worse, most + DOS networking programs, including LANMAN, have braindead networking + schemes that rely completely on the netmask and a 'default gateway' to + determine how to route packets. This means that to get to freedom or + insight, patience WILL send through its default gateway, regardless of + the fact that both freedom and insight (courtesy of the arc0e device) + could understand a direct transmission. + + I compensate by giving freedom an extra IP address - aliased 'gatekeeper' + - that is on my private subnet, the same subnet that patience is on. I + then define gatekeeper to be the default gateway for patience. + + To configure freedom (in addition to the commands above): + ifconfig arc0e gatekeeper + route add gatekeeper arc0e + route add patience arc0e + + This way, freedom will send all packets for patience through arc0e, + giving its IP address as gatekeeper (on the private subnet). When it + talks to insight or the internet, it will use its "freedom" internet IP + address. + + You will notice that we haven't configured the arc0e device on insight. + This would work, but is not really necessary, and would require me to + assign insight another special IP number from my private subnet. Since + both insight and patience are using freedom as their default gateway, the + two can already talk to each other. + + It's quite fortunate that I set things up like this the first time + through (cough cough) because it's really handy when I boot insight into + DOS. There, it runs the Novell ODI protocol stack, which only works with + RFC1201 ARCnet. In this mode it would be impossible for insight to + communicate directly with patience, since the Novell stack is + incompatible with Microsoft's Ethernet-Encap. Without changing any + settings on freedom or patience, I simply set freedom as the default + gateway for insight (now in DOS, remember) and all the forwarding happens + "automagically" between the two hosts that would normally not be able to + communicate at all. + + For those who like diagrams, I have created two "virtual subnets" on the + same physical ARCnet wire. You can picture it like this: + + + [RFC1201 NETWORK] [ETHER-ENCAP NETWORK] + (registered internet subnet) (RFC1597 private subnet) + + (IP Masquerade) + /---------------\ * /---------------\ + | | * | | + | +-Freedom-*-Gatekeeper-+ | + | | | * | | + \-------+-------/ | \-------+-------/ + | | | + Insight | Patience + (Internet) + + + + + It works: what now? ------------------- @@ -221,13 +399,16 @@ You can change the debug level without recompiling the kernel by typing: ifconfig arc0 down metric 1xxx /etc/rc.d/rc.inet1 where "xxx" is the debug level you want. For example, "metric 1015" would put -you at debug level 15. Debug level 7 is currently the default. +you at debug level 15. Debug level 3 is currently the default. Note that the debug level is (as of v1.90 ALPHA) a binary combination of different debug flags; so debug level 7 is really 1+2+4 or D_NORMAL+D_INIT+D_EXTRA. To reach D_DURING, you would add 8 to this, resulting in debug level 15. +If you don't understand that, you probably don't want to know anyway. +E-mail me about your problem. + I want to send money: what now? ------------------------------- diff --git a/Documentation/networking/z8530drv.txt b/Documentation/networking/z8530drv.txt new file mode 100644 index 000000000000..61f47b0e417d --- /dev/null +++ b/Documentation/networking/z8530drv.txt @@ -0,0 +1,953 @@ +// 950824: note -- I will upload the new version 1.9 to ftp.ucsd.edu +// as soon as possible... +// +// ****** +// ****** The driver has a n e w MAJOR number (34) now! ****** +// ****** +// +// please remake /dev/sc*: +// +// mknod /dev/sc1 c 34 0 +// mknod /dev/sc2 c 34 1 +// mknod /dev/sc3 c 34 2 +// mknod /dev/sc4 c 34 3 +// +// (and so on...) +// +// -dl1bke- + +This is a subset of the documentation. To use this driver you MUST have the +full package from: + +Internet: +========= + +ftp.ucsd.edu:/hamradio/packet/tcpip/incoming/z8530drv-1.9.dl1bke.tar.gz + +[ + if you can't find it there, try: + .../tcpip/linux/z8530drv-1.9.dl1bke.tar.gz + +] + +and various mirrors (i.e. nic.switch.ch) + +AX.25 BBS +========= + +UNIX @ DB0ACH.#NRW.DEU.EU, subject: Z8530D19.Pxx/Pyy + +(AX.25 call: DB0ACH-8) + +and various BBS that received the file through AUTO7P or 7PSERV +with the filename Z8530D19.TGZ + + +--------------------------------------------------------------------------- + + + SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 + + ******************************************************************** + + (c) 1994 by Joerg Reuter DL1BKE + + portions (c) 1994 Hans Alblas PE1AYX + and (c) 1993 Guido ten Dolle PE1NNZ + + for the complete copyright notice see >> Copying.Z8530DRV << + + ******************************************************************** + + +0. Installation of the package +============================== + +Run SCC-Install. If one (or more) of the patches fails PLEASE consult +chapter 2 (and READ IT of course!) + + + +1. Initialization and attachment of the channels +================================================ + +To use the driver, 3 steps must be performed: + + 1. Global initialization of the driver in the kernel + 2. Setup of parameters with sccinit + 2. Attachment of each channel in the packet software + +The global initialization is needed to reset all SCCs and to +install a common interrupt handler. Also, the hardware addresses +of the chips are defined in this step. In the second step, each +channel is set up for the intended use. + + + +1.1. Initialization +=================== + +Initialization of the hardware is performed by setting the defines and +variables in the file "/linux/drivers/char/scc_config.h". You can change +a number of parameters. + + + +################################################################################################ +# For OptoSCC card e.g: +# + +int Nchips = 2 ; /* number of chips */ +io_port Vector_Latch = 0x168 ; /* addr. of INTACK-Latch (0 for poll mode) +*/ +int Ivec = 9 ; /* interrupt vector */ +long Clock = 4915200 ; /* frequency of the scc clock */ +char Pclk = 1 ; /* use PCLK (1) or RTxC (0) */ +char Board = PA0HZP ; /* what type of SCC card do you use? */ +int Option = 0 ; /* command for extra hardware */ +io_port Special_Port = 0 ; /* port address for special hardware */ + /* (for EAGLE, PC100, PRIMUS, DRSI) */ + + /* ^ never remove the semicolon !! */ + + +/* Channel A B Chip */ +/* ============ ======== */ +/* Control ports: */ + +io_port SCC_ctrl[MAXSCC * 2] = {0x152, 0x150, /* ...one... */ + 0x156, 0x154, /* ...two... */ + 0, 0, /* ...three... */ + 0, 0}; /* ...four... */ + + +/* Data ports: */ + +io_port SCC_data[MAXSCC * 2] = {0x153, 0x151, /* ...one... */ + 0x157, 0x155, /* ...two... */ + 0, 0, /* ...three... */ + 0, 0}; /* ...four... */ + + +/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */ + +/* Chip */ +/* ======== */ +int SCC_Enhanced[MAXSCC] = {0, /* ...one... */ + 0, /* ...two... */ + 0, /* ...three... */ + 0}; /* ...four... */ + +/* some useful #defines. You might need them or not */ + +#define VERBOSE_BOOTMSG 1 +#undef SCC_DELAY /* perhaps a 486DX2 is a *bit* too fast */ +#undef SCC_LDELAY /* slow it even a bit more down */ +#undef DONT_CHECK /* don't look if the SCCs you specified are available */ + + +/*********** END OF CONFIGURATION PARAMETERS ********************************************/ + + + + +################################################################################################ +# For Baycom (U)SCC card e.g: +# + +int Nchips = 2 ; /* number of chips */ +io_port Vector_Latch = 0 ; /* addr. of INTACK-Latch (0 for poll mode) */ +int Ivec = 7 ; /* interrupt vector */ +long Clock = 4915200 ; /* frequency of the scc clock */ +char Board = BAYCOM ; /* what type of SCC card do you use? */ +int Option = 0 ; /* command for extra hardware */ +io_port Special_Port = 0 ; /* port address for special hardware */ + /* (for EAGLE, PC100, PRIMUS, DRSI) */ + + /* ^ never remove the semicolon !! */ + + + +/* Channel A B Chip */ +/* ============ ======== */ +/* Control ports: */ + +io_port SCC_ctrl[MAXSCC * 2] = {0x304, 0x305, /* ...one... */ + 0x306, 0x307, /* ...two... */ + 0, 0, /* ...three... */ + 0, 0}; /* ...four... */ + +/* Data ports: */ + +io_port SCC_data[MAXSCC * 2] = {0x300, 0x301, /* ...one... */ + 0x302, 0x303, /* ...two... */ + 0, 0, /* ...three... */ + 0, 0}; /* ...four... */ + + +/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */ + +/* Chip */ +/* ======== */ +int SCC_Enhanced[MAXSCC] = {0, /* ...one... */ + 0, /* ...two... */ + 0, /* ...three... */ + 0}; /* ...four... */ + +/* some useful #defines. You might need them or not */ + +#define VERBOSE_BOOTMSG 1 +#undef SCC_DELAY /* perhaps a 486DX2 is a *bit* too fast */ +#undef SCC_LDELAY /* slow it even a bit more down */ +#undef DONT_CHECK /* don't look if the SCCs you specified are available */ + +After you changed a parameter you have to recompile a new kernel image file. + +The channel number ranges from 0 to (2 * Nchips) - 1, +where Nchips is the number of chips. + +The crystal clock is specified as 4.9152 MHz. Other frequencies +can be used, and this parameter should be adjusted accordingly. + + +You can define your scc type with Board + + SCC type value + --------------------------------- + PA0HZP SCC card PA0HZP + EAGLE card EAGLE + PC100 card PC100 + PRIMUS-PC (DG9BL) card PRIMUS + BayCom (U)SCC card BAYCOM + + +NOTE: +===== + +If you only know the parameters for the PE1CHL driver for DOS, +run gencfg. It will generate the correct port addresses (I hope). +Its parameters are exactly the same as the ones you use with +the "attach scc" command in net, except that the string "init" must +not appear. Example: + +gencfg 2 0x150 4 2 0 1 0x168 9 4915200 + +will print a short form of scc_config.h for the OptoSCC to stdout. +("short" <=> few comments). + +gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 + +does the same for the BayCom USCC card. I my opinion it is much easier +to edit scc_config.h... + + +1.2 initializing the driver on bootup +===================================== + + +To setup a number parameters you must run /sbin/sccinit from one +of your rc.*-files. This has to be done BEFORE the start of +NET or the ax25attach. Sccinit reads the file /etc/z8530drv.rc +and sets the MODEM and KISS parameters. A sample file is +delivered with this package. Change it to your needs: + +Each channel definition is divided into three sections. An +example for /dev/sc1: + +# DEVICE + +device /dev/sc1 # the device for the following params + +# MODEM + +speed 1200 # the default baudrate +clock dpll # clock source: + # dpll = normal halfduplex operation + # external = MODEM provides own Rx/Tx clock + # divider = use fullduplex divider if + # installed (1) +mode nrzi # HDLC encoding mode + # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM + # nrz = DF9IC 9k6 MODEM +# KISS (Layer 1) + +txdelay 36 # (see chapter 1.4) +persist 64 +slot 8 +tail 8 +fulldup 0 +wait 12 +min 3 +maxkey 7 +idle 3 +maxdef 120 +group 0 +txoff off +softdcd on +slip off + +The order WITHIN these sections is unimportant. The order OF these +sections IS important. The MODEM parameters are set with the first +recognized KISS paramer... + +Please note that you can initialize the board only once after boot. +You can change all paramters but "mode" and "clock" later with the +Sccparam program or through KISS. Just to avoid securety holes... + +(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not + present at all (BayCom). It feeds back the output of the DPLL + (digital pll) as transmit clock. Using this mode without a divider + installed will normally result in keying the transceiver until + maxkey expires --- of course without sending anything (useful). + + +1.3. Attach commands +==================== + +When the linux has startup, the SCC driver has been initialized, +you can attach the channels in your packet software. This is done +by open the scc devices by using the attach asy command. +The SCC-drivers emulates the scc devices as serial asy ports, +this means e.g. that the baudrate can be set in the attach command. + + +Example Wampes: + +############################################################################################# +# Wampes device attach +# NOTE: Interfacename and the device must be the same!! +# Usage: attach asy 0 0 slip|vjslip|ax25ui|ax25i|nrs|kissui