1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun=========== 4*4882a593SmuzhiyunLTPC Driver 5*4882a593Smuzhiyun=========== 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis is the ALPHA version of the ltpc driver. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunIn order to use it, you will need at least version 1.3.3 of the 10*4882a593Smuzhiyunnetatalk package, and the Apple or Farallon LocalTalk PC card. 11*4882a593SmuzhiyunThere are a number of different LocalTalk cards for the PC; this 12*4882a593Smuzhiyundriver applies only to the one with the 65c02 processor chip on it. 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunTo include it in the kernel, select the CONFIG_LTPC switch in the 15*4882a593Smuzhiyunconfiguration dialog. You can also compile it as a module. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunWhile the driver will attempt to autoprobe the I/O port address, IRQ 18*4882a593Smuzhiyunline, and DMA channel of the card, this does not always work. For 19*4882a593Smuzhiyunthis reason, you should be prepared to supply these parameters 20*4882a593Smuzhiyunyourself. (see "Card Configuration" below for how to determine or 21*4882a593Smuzhiyunchange the settings on your card) 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunWhen the driver is compiled into the kernel, you can add a line such 24*4882a593Smuzhiyunas the following to your /etc/lilo.conf:: 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun append="ltpc=0x240,9,1" 27*4882a593Smuzhiyun 28*4882a593Smuzhiyunwhere the parameters (in order) are the port address, IRQ, and DMA 29*4882a593Smuzhiyunchannel. The second and third values can be omitted, in which case 30*4882a593Smuzhiyunthe driver will try to determine them itself. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunIf you load the driver as a module, you can pass the parameters "io=", 33*4882a593Smuzhiyun"irq=", and "dma=" on the command line with insmod or modprobe, or add 34*4882a593Smuzhiyunthem as options in a configuration file in /etc/modprobe.d/ directory:: 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun alias lt0 ltpc # autoload the module when the interface is configured 37*4882a593Smuzhiyun options ltpc io=0x240 irq=9 dma=1 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunBefore starting up the netatalk demons (perhaps in rc.local), you 40*4882a593Smuzhiyunneed to add a line such as:: 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun /sbin/ifconfig lt0 127.0.0.42 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunThe address is unimportant - however, the card needs to be configured 45*4882a593Smuzhiyunwith ifconfig so that Netatalk can find it. 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunThe appropriate netatalk configuration depends on whether you are 48*4882a593Smuzhiyunattached to a network that includes AppleTalk routers or not. If, 49*4882a593Smuzhiyunlike me, you are simply connecting to your home Macintoshes and 50*4882a593Smuzhiyunprinters, you need to set up netatalk to "seed". The way I do this 51*4882a593Smuzhiyunis to have the lines:: 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033" 54*4882a593Smuzhiyun lt0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033" 55*4882a593Smuzhiyun 56*4882a593Smuzhiyunin my atalkd.conf. What is going on here is that I need to fool 57*4882a593Smuzhiyunnetatalk into thinking that there are two AppleTalk interfaces 58*4882a593Smuzhiyunpresent; otherwise, it refuses to seed. This is a hack, and a more 59*4882a593Smuzhiyunpermanent solution would be to alter the netatalk code. Also, make 60*4882a593Smuzhiyunsure you have the correct name for the dummy interface - If it's 61*4882a593Smuzhiyuncompiled as a module, you will need to refer to it as "dummy0" or some 62*4882a593Smuzhiyunsuch. 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunIf you are attached to an extended AppleTalk network, with routers on 65*4882a593Smuzhiyunit, then you don't need to fool around with this -- the appropriate 66*4882a593Smuzhiyunline in atalkd.conf is:: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun lt0 -phase 1 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun 71*4882a593SmuzhiyunCard Configuration 72*4882a593Smuzhiyun================== 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunThe interrupts and so forth are configured via the dipswitch on the 75*4882a593Smuzhiyunboard. Set the switches so as not to conflict with other hardware. 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun Interrupts -- set at most one. If none are set, the driver uses 78*4882a593Smuzhiyun polled mode. Because the card was developed in the XT era, the 79*4882a593Smuzhiyun original documentation refers to IRQ2. Since you'll be running 80*4882a593Smuzhiyun this on an AT (or later) class machine, that really means IRQ9. 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun === =========================================================== 83*4882a593Smuzhiyun SW1 IRQ 4 84*4882a593Smuzhiyun SW2 IRQ 3 85*4882a593Smuzhiyun SW3 IRQ 9 (2 in original card documentation only applies to XT) 86*4882a593Smuzhiyun === =========================================================== 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun DMA -- choose DMA 1 or 3, and set both corresponding switches. 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun === ===== 92*4882a593Smuzhiyun SW4 DMA 3 93*4882a593Smuzhiyun SW5 DMA 1 94*4882a593Smuzhiyun SW6 DMA 3 95*4882a593Smuzhiyun SW7 DMA 1 96*4882a593Smuzhiyun === ===== 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun I/O address -- choose one. 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun === ========= 102*4882a593Smuzhiyun SW8 220 / 240 103*4882a593Smuzhiyun === ========= 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunIP 107*4882a593Smuzhiyun== 108*4882a593Smuzhiyun 109*4882a593SmuzhiyunYes, it is possible to do IP over LocalTalk. However, you can't just 110*4882a593Smuzhiyuntreat the LocalTalk device like an ordinary Ethernet device, even if 111*4882a593Smuzhiyunthat's what it looks like to Netatalk. 112*4882a593Smuzhiyun 113*4882a593SmuzhiyunInstead, you follow the same procedure as for doing IP in EtherTalk. 114*4882a593SmuzhiyunSee Documentation/networking/ipddp.rst for more information about the 115*4882a593Smuzhiyunkernel driver and userspace tools needed. 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun 118*4882a593SmuzhiyunBugs 119*4882a593Smuzhiyun==== 120*4882a593Smuzhiyun 121*4882a593SmuzhiyunIRQ autoprobing often doesn't work on a cold boot. To get around 122*4882a593Smuzhiyunthis, either compile the driver as a module, or pass the parameters 123*4882a593Smuzhiyunfor the card to the kernel as described above. 124*4882a593Smuzhiyun 125*4882a593SmuzhiyunAlso, as usual, autoprobing is not recommended when you use the driver 126*4882a593Smuzhiyunas a module. (though it usually works at boot time, at least) 127*4882a593Smuzhiyun 128*4882a593SmuzhiyunPolled mode is *really* slow sometimes, but this seems to depend on 129*4882a593Smuzhiyunthe configuration of the network. 130*4882a593Smuzhiyun 131*4882a593SmuzhiyunIt may theoretically be possible to use two LTPC cards in the same 132*4882a593Smuzhiyunmachine, but this is unsupported, so if you really want to do this, 133*4882a593Smuzhiyunyou'll probably have to hack the initialization code a bit. 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun 136*4882a593SmuzhiyunThanks 137*4882a593Smuzhiyun====== 138*4882a593Smuzhiyun 139*4882a593SmuzhiyunThanks to Alan Cox for helpful discussions early on in this 140*4882a593Smuzhiyunwork, and to Denis Hainsworth for doing the bleeding-edge testing. 141*4882a593Smuzhiyun 142*4882a593SmuzhiyunBradford Johnson <bradford@math.umn.edu> 143*4882a593Smuzhiyun 144*4882a593SmuzhiyunUpdated 11/09/1998 by David Huggins-Daines <dhd@debian.org> 145