18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci===========
48c2ecf20Sopenharmony_ciLTPC Driver
58c2ecf20Sopenharmony_ci===========
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThis is the ALPHA version of the ltpc driver.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciIn order to use it, you will need at least version 1.3.3 of the
108c2ecf20Sopenharmony_cinetatalk package, and the Apple or Farallon LocalTalk PC card.
118c2ecf20Sopenharmony_ciThere are a number of different LocalTalk cards for the PC; this
128c2ecf20Sopenharmony_cidriver applies only to the one with the 65c02 processor chip on it.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciTo include it in the kernel, select the CONFIG_LTPC switch in the
158c2ecf20Sopenharmony_ciconfiguration dialog.  You can also compile it as a module.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciWhile the driver will attempt to autoprobe the I/O port address, IRQ
188c2ecf20Sopenharmony_ciline, and DMA channel of the card, this does not always work.  For
198c2ecf20Sopenharmony_cithis reason, you should be prepared to supply these parameters
208c2ecf20Sopenharmony_ciyourself.  (see "Card Configuration" below for how to determine or
218c2ecf20Sopenharmony_cichange the settings on your card)
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciWhen the driver is compiled into the kernel, you can add a line such
248c2ecf20Sopenharmony_cias the following to your /etc/lilo.conf::
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci append="ltpc=0x240,9,1"
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciwhere the parameters (in order) are the port address, IRQ, and DMA
298c2ecf20Sopenharmony_cichannel.  The second and third values can be omitted, in which case
308c2ecf20Sopenharmony_cithe driver will try to determine them itself.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciIf you load the driver as a module, you can pass the parameters "io=",
338c2ecf20Sopenharmony_ci"irq=", and "dma=" on the command line with insmod or modprobe, or add
348c2ecf20Sopenharmony_cithem as options in a configuration file in /etc/modprobe.d/ directory::
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci alias lt0 ltpc # autoload the module when the interface is configured
378c2ecf20Sopenharmony_ci options ltpc io=0x240 irq=9 dma=1
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciBefore starting up the netatalk demons (perhaps in rc.local), you
408c2ecf20Sopenharmony_cineed to add a line such as::
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci /sbin/ifconfig lt0 127.0.0.42
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciThe address is unimportant - however, the card needs to be configured
458c2ecf20Sopenharmony_ciwith ifconfig so that Netatalk can find it.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciThe appropriate netatalk configuration depends on whether you are
488c2ecf20Sopenharmony_ciattached to a network that includes AppleTalk routers or not.  If,
498c2ecf20Sopenharmony_cilike me, you are simply connecting to your home Macintoshes and
508c2ecf20Sopenharmony_ciprinters, you need to set up netatalk to "seed".  The way I do this
518c2ecf20Sopenharmony_ciis to have the lines::
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033"
548c2ecf20Sopenharmony_ci lt0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033"
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciin my atalkd.conf.  What is going on here is that I need to fool
578c2ecf20Sopenharmony_cinetatalk into thinking that there are two AppleTalk interfaces
588c2ecf20Sopenharmony_cipresent; otherwise, it refuses to seed.  This is a hack, and a more
598c2ecf20Sopenharmony_cipermanent solution would be to alter the netatalk code.  Also, make
608c2ecf20Sopenharmony_cisure you have the correct name for the dummy interface - If it's
618c2ecf20Sopenharmony_cicompiled as a module, you will need to refer to it as "dummy0" or some
628c2ecf20Sopenharmony_cisuch.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciIf you are attached to an extended AppleTalk network, with routers on
658c2ecf20Sopenharmony_ciit, then you don't need to fool around with this -- the appropriate
668c2ecf20Sopenharmony_ciline in atalkd.conf is::
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci lt0 -phase 1
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciCard Configuration
728c2ecf20Sopenharmony_ci==================
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciThe interrupts and so forth are configured via the dipswitch on the
758c2ecf20Sopenharmony_ciboard.  Set the switches so as not to conflict with other hardware.
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci       Interrupts -- set at most one.  If none are set, the driver uses
788c2ecf20Sopenharmony_ci       polled mode.  Because the card was developed in the XT era, the
798c2ecf20Sopenharmony_ci       original documentation refers to IRQ2.  Since you'll be running
808c2ecf20Sopenharmony_ci       this on an AT (or later) class machine, that really means IRQ9.
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci       ===     ===========================================================
838c2ecf20Sopenharmony_ci       SW1     IRQ 4
848c2ecf20Sopenharmony_ci       SW2     IRQ 3
858c2ecf20Sopenharmony_ci       SW3     IRQ 9 (2 in original card documentation only applies to XT)
868c2ecf20Sopenharmony_ci       ===     ===========================================================
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci       DMA -- choose DMA 1 or 3, and set both corresponding switches.
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci       ===     =====
928c2ecf20Sopenharmony_ci       SW4     DMA 3
938c2ecf20Sopenharmony_ci       SW5     DMA 1
948c2ecf20Sopenharmony_ci       SW6     DMA 3
958c2ecf20Sopenharmony_ci       SW7     DMA 1
968c2ecf20Sopenharmony_ci       ===     =====
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci       I/O address -- choose one.
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci       ===     =========
1028c2ecf20Sopenharmony_ci       SW8     220 / 240
1038c2ecf20Sopenharmony_ci       ===     =========
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ciIP
1078c2ecf20Sopenharmony_ci==
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ciYes, it is possible to do IP over LocalTalk.  However, you can't just
1108c2ecf20Sopenharmony_citreat the LocalTalk device like an ordinary Ethernet device, even if
1118c2ecf20Sopenharmony_cithat's what it looks like to Netatalk.
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciInstead, you follow the same procedure as for doing IP in EtherTalk.
1148c2ecf20Sopenharmony_ciSee Documentation/networking/ipddp.rst for more information about the
1158c2ecf20Sopenharmony_cikernel driver and userspace tools needed.
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ciBugs
1198c2ecf20Sopenharmony_ci====
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ciIRQ autoprobing often doesn't work on a cold boot.  To get around
1228c2ecf20Sopenharmony_cithis, either compile the driver as a module, or pass the parameters
1238c2ecf20Sopenharmony_cifor the card to the kernel as described above.
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ciAlso, as usual, autoprobing is not recommended when you use the driver
1268c2ecf20Sopenharmony_cias a module. (though it usually works at boot time, at least)
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ciPolled mode is *really* slow sometimes, but this seems to depend on
1298c2ecf20Sopenharmony_cithe configuration of the network.
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ciIt may theoretically be possible to use two LTPC cards in the same
1328c2ecf20Sopenharmony_cimachine, but this is unsupported, so if you really want to do this,
1338c2ecf20Sopenharmony_ciyou'll probably have to hack the initialization code a bit.
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ciThanks
1378c2ecf20Sopenharmony_ci======
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ciThanks to Alan Cox for helpful discussions early on in this
1408c2ecf20Sopenharmony_ciwork, and to Denis Hainsworth for doing the bleeding-edge testing.
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ciBradford Johnson <bradford@math.umn.edu>
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_ciUpdated 11/09/1998 by David Huggins-Daines <dhd@debian.org>
145