Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: convert PLIP.txt to ReST

- add SPDX header;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mauro Carvalho Chehab and committed by
David S. Miller
32c01266 c1e4535f

+27 -19
+25 -18
Documentation/networking/PLIP.txt Documentation/networking/plip.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ================================================ 1 4 PLIP: The Parallel Line Internet Protocol Device 5 + ================================================ 2 6 3 7 Donald Becker (becker@super.org) 4 8 I.D.A. Supercomputing Research Center, Bowie MD 20715 ··· 87 83 data transfer (the maximal time the PLIP driver would allow the other side 88 84 before announcing a timeout, when trying to handshake a transfer of some 89 85 data) is, by default, 500usec. As IRQ delivery is more or less immediate, 90 - this timeout is quite sufficient. 86 + this timeout is quite sufficient. 91 87 92 88 When in IRQ-less mode, the PLIP driver polls the parallel port HZ times 93 89 per second (where HZ is typically 100 on most platforms, and 1024 on an ··· 119 115 data bit outputs connected to status bit inputs. 120 116 121 117 The second data transfer method relies on both machines having 122 - bi-directional parallel ports, rather than output-only ``printer'' 118 + bi-directional parallel ports, rather than output-only ``printer`` 123 119 ports. This allows byte-wide transfers and avoids reconstructing 124 120 nibbles into bytes, leading to much faster transfers. 125 121 ··· 136 132 137 133 A cable that implements this protocol is available commercially as a 138 134 "Null Printer" or "Turbo Laplink" cable. It can be constructed with 139 - two DB-25 male connectors symmetrically connected as follows: 135 + two DB-25 male connectors symmetrically connected as follows:: 140 136 141 137 STROBE output 1* 142 138 D0->ERROR 2 - 15 15 - 2 ··· 150 146 SLCTIN 17 - 17 151 147 extra grounds are 18*,19*,20*,21*,22*,23*,24* 152 148 GROUND 25 - 25 153 - * Do not connect these pins on either end 149 + 150 + * Do not connect these pins on either end 154 151 155 152 If the cable you are using has a metallic shield it should be 156 153 connected to the metallic DB-25 shell at one end only. ··· 160 155 ======================== 161 156 162 157 The second data transfer method relies on both machines having 163 - bi-directional parallel ports, rather than output-only ``printer'' 158 + bi-directional parallel ports, rather than output-only ``printer`` 164 159 ports. This allows byte-wide transfers, and avoids reconstructing 165 160 nibbles into bytes. This cable should not be used on unidirectional 166 - ``printer'' (as opposed to ``parallel'') ports or when the machine 161 + ``printer`` (as opposed to ``parallel``) ports or when the machine 167 162 isn't configured for PLIP, as it will result in output driver 168 163 conflicts and the (unlikely) possibility of damage. 169 164 170 - The cable for this transfer mode should be constructed as follows: 165 + The cable for this transfer mode should be constructed as follows:: 171 166 172 167 STROBE->BUSY 1 - 11 173 168 D0->D0 2 - 2 ··· 184 179 GND->ERROR 18 - 15 185 180 extra grounds are 19*,20*,21*,22*,23*,24* 186 181 GROUND 25 - 25 187 - * Do not connect these pins on either end 182 + 183 + * Do not connect these pins on either end 188 184 189 185 Once again, if the cable you are using has a metallic shield it should 190 186 be connected to the metallic DB-25 shell at one end only. ··· 194 188 ============================= 195 189 196 190 The PLIP driver is compatible with the "Crynwr" parallel port transfer 197 - standard in Mode 0. That standard specifies the following protocol: 191 + standard in Mode 0. That standard specifies the following protocol:: 198 192 199 193 send header nibble '0x8' 200 194 count-low octet ··· 202 196 ... data octets 203 197 checksum octet 204 198 205 - Each octet is sent as 199 + Each octet is sent as:: 200 + 206 201 <wait for rx. '0x1?'> <send 0x10+(octet&0x0F)> 207 202 <wait for rx. '0x0?'> <send 0x00+((octet>>4)&0x0F)> 208 203 209 204 To start a transfer the transmitting machine outputs a nibble 0x08. 210 205 That raises the ACK line, triggering an interrupt in the receiving 211 206 machine. The receiving machine disables interrupts and raises its own ACK 212 - line. 207 + line. 213 208 214 - Restated: 209 + Restated:: 215 210 216 - (OUT is bit 0-4, OUT.j is bit j from OUT. IN likewise) 217 - Send_Byte: 218 - OUT := low nibble, OUT.4 := 1 219 - WAIT FOR IN.4 = 1 220 - OUT := high nibble, OUT.4 := 0 221 - WAIT FOR IN.4 = 0 211 + (OUT is bit 0-4, OUT.j is bit j from OUT. IN likewise) 212 + Send_Byte: 213 + OUT := low nibble, OUT.4 := 1 214 + WAIT FOR IN.4 = 1 215 + OUT := high nibble, OUT.4 := 0 216 + WAIT FOR IN.4 = 0
+1
Documentation/networking/index.rst
··· 92 92 packet_mmap 93 93 phonet 94 94 pktgen 95 + plip 95 96 96 97 .. only:: subproject and html 97 98
+1 -1
drivers/net/plip/Kconfig
··· 21 21 bits at a time (mode 0) or with special PLIP cables, to be used on 22 22 bidirectional parallel ports only, which can transmit 8 bits at a 23 23 time (mode 1); you can find the wiring of these cables in 24 - <file:Documentation/networking/PLIP.txt>. The cables can be up to 24 + <file:Documentation/networking/plip.rst>. The cables can be up to 25 25 15m long. Mode 0 works also if one of the machines runs DOS/Windows 26 26 and has some PLIP software installed, e.g. the Crynwr PLIP packet 27 27 driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)