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