aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books/handbook/hw/chapter.sgml
blob: b2f9347a91897b2dac7a09d3178e4190d3e2f097 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
<!--
     The FreeBSD Documentation Project

     $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/hw/chapter.sgml,v 1.31 2000/04/02 19:38:11 chris Exp $
-->

<appendix id="hw">
  <title>PC Hardware compatibility</title>
  
  <para>Issues of hardware compatibility are among the most troublesome in the
    computer industry today and FreeBSD is by no means immune to trouble.  In
    this respect, FreeBSD's advantage of being able to run on inexpensive
    commodity PC hardware is also its liability when it comes to support for
    the amazing variety of components on the market.  While it would be
    impossible to provide a exhaustive listing of hardware that FreeBSD
    supports, this section serves as a catalog of the device drivers included
    with FreeBSD and the hardware each drivers supports. Where possible and
    appropriate, notes about specific products are included.  You may also
    want to refer to <link linkend="kernelconfig-config">the kernel
      configuration file</link> section in this handbook for a list of
    supported devices.</para>
      
  <para>As FreeBSD is a volunteer project without a funded testing department,
    we depend on you, the user, for much of the information contained in this
    catalog.  If you have direct experience of hardware that does or does not
    work with FreeBSD, please let us know by sending e-mail to the &a.doc;.
    Questions about supported hardware should be directed to the &a.questions;
    (see <link linkend="eresources-mail">Mailing Lists</link> for more
    information).  When submitting information or asking a question, please
    remember to specify exactly what version of FreeBSD you are using and
    include as many details of your hardware as possible.</para>
      
  <sect1>
    <title>Resources on the Internet</title>
    
    <para>The following links have proven useful in selecting hardware. Though
      some of what you see won't necessarily be specific (or even applicable)
      to FreeBSD, most of the hardware information out there is OS
      independent.  Please check with the FreeBSD hardware guide to make sure
      that your chosen configuration is supported before making any
      purchases.</para>

    <itemizedlist>
      <listitem>
	<para><ulink url="http://www.tomshardware.com/">The Pentium Systems
	    Hardware Performance Guide</ulink></para>
      </listitem>
    </itemizedlist>
  </sect1>
      
  <sect1 id="hw-configs">
    <title>Sample Configurations</title>
    
    <para>The following list of sample hardware configurations by no means
      constitutes an endorsement of a given hardware vendor or product by
      <emphasis>The FreeBSD Project</emphasis>.  This information is provided
      only as a public service and merely catalogs some of the experiences
      that various individuals have had with different hardware combinations.
      Your mileage may vary.  Slippery when wet. Beware of dog.</para>
    
    <sect2 id="hw-jordans-picks">
      <title>Jordan's Picks</title>
      
      <para>I have had fairly good luck building workstation and server
	configurations with the following components.  I can't guarantee that
	you will too, nor that any of the companies here will remain
	<quote>best buys</quote> forever.  I will try, when I can, to keep this
	list up-to-date but cannot obviously guarantee that it will be at any
	given time.</para>
	  
      <sect3 id="hw-mb">
	<title>Motherboards</title>

	<para>For Pentium Pro (P6) systems, I'm quite fond of the <ulink
	    url="http://www.tyan.com/html/products.html">Tyan</ulink> S1668
	  dual-processor motherboard as well as the Intel PR440FX motherboard
	  with on-board SCSI WIDE and 100/10MB Intel Etherexpress NIC.  You
	  can build a dandy little single or dual processor system (which is
	  supported in FreeBSD 3.0) for very little cost now that the Pentium
	  Pro 180/256K chips have fallen so greatly in price, but no telling
	  how much longer this will last.</para>
	    
	<para>For the Pentium II, I'm rather partial to the <ulink
	    url="http://www.asus.com.tw/">ASUS</ulink> <ulink
	    url="http://www.asus.com.tw/Products/Motherboard/Pentiumpro/P2l97-s/index.html">P2l97-S</ulink>
	  motherboard with the on-board Adaptec SCSI WIDE controller.</para>
	    
	<para>For Pentium machines, the ASUS <ulink
	    url="http://www.asus.com.tw/Products/Motherboard/Pentium/P55tp4/index.html">P55T2P4</ulink>
	  motherboard appears to be a good choice for mid-to-high range
	  Pentium server and workstation systems.</para>

	<para>Those wishing to build more fault-tolerant systems should also
	  be sure to use Parity memory or, for truly 24/7 applications, ECC
	  memory.</para>

	<note>
	  <para>ECC memory does involve a slight performance trade-off (which
	    may or may not be noticeable depending on your application) but
	    buys you significantly increased fault-tolerance to memory
	    errors.</para>
	</note>
      </sect3>
      
      <sect3>
	<title>Disk Controllers</title>
	    
	<para>This one is a bit trickier, and while I used to recommend the
	  <ulink url="http://www.buslogic.com/">Buslogic</ulink> controllers
	  unilaterally for everything from ISA to PCI, now I tend to lean
	  towards the <ulink url="http://www.adaptec.com/">Adaptec</ulink>
	  1542CF for ISA, Buslogic Bt747c for EISA and Adaptec 2940UW for
	  PCI.</para>
	    
	<para>The NCR/Symbios cards for PCI have also worked well for me,
	  though you need to make sure that your motherboard supports the
	  BIOS-less model if you're using one of those (if your card has
	  nothing which looks even vaguely like a ROM chip on it, you've
	  probably got one which expects its BIOS to be on your
	  motherboard).</para>
	    
	<para>If you should find that you need more than one SCSI controller
	  in a PCI machine, you may wish to consider conserving your scarce
	  PCI bus resources by buying the Adaptec 3940 card, which puts two
	  SCSI controllers (and internal busses) in a single slot.</para>

	<note>
	  <para>There are two types of 3940 on the market&mdash;the older
	    model with AIC 7880 chips on it, and the newer one with AIC 7895
	    chips.  The newer model requires <ulink
	      url="http://www.FreeBSD.org/pub/FreeBSD/development/cam/">CAM</ulink>
	    support which is not yet part of FreeBSD&mdash;you have to add it,
	    or install from one of the CAM binary snapshot release.</para>
	</note>
      </sect3>
      
      <sect3 id="hw-disks">
	<title>Disk drives</title>

	<para>In this particular game of Russian roulette, I'll make few
	  specific recommendations except to say <quote>SCSI over IDE whenever
	  you can afford it.</quote> Even in small desktop configurations, SCSI
	  often makes more sense since it allows you to easily migrate drives
	  from server to desktop as falling drive prices make it economical to
	  do so.  If you have more than one machine to administer then think
	  of it not simply as storage, think of it as a food chain! For a
	  serious server configuration, there's not even any
	  argument&mdash;use SCSI equipment and good cables.</para>
      </sect3>
      
      <sect3 id="hw-jordans-picks-cdrom">
	<title>CDROM drives</title>

	<para>My SCSI preferences extend to SCSI CDROM drives as well, and
	  while the <ulink url="http://www.toshiba.com/">Toshiba</ulink> drives
	  have always been favourites of mine (in whatever speed is hot that
	  week), I'm still fond of my good old <ulink
 	    url="http://www.plextor.com/">Plextor</ulink> PX-12CS drive.  It's
	  only a 12 speed, but it's offered excellent performance and
	  reliability.</para>
	    
	<para>Generally speaking, most SCSI CDROM drives I've seen have been
	  of pretty solid construction and you probably won't go wrong with an
	  HP or NEC SCSI CDROM drive either.  SCSI CDROM prices also appear to
	  have dropped considerably in the last few months and are now quite
	  competitive with IDE CDROMs while remaining a technically superior
	  solution.  I now see no reason whatsoever to settle for an IDE CDROM
	  drive if given a choice between the two.</para>
      </sect3>
      
      <sect3 id="hw-worm">
	<title>CD Recordable (WORM) drives</title>

	<para>At the time of this writing, FreeBSD supports 3 types of CDR
	  drives (though I believe they all ultimately come from Phillips
	  anyway): The Phillips CDD 522 (Acts like a Plasmon), the PLASMON
	  RF4100 and the HP 6020i.  I myself use the HP 6020i for burning
	  CDROMs (in 2.2 and alter releases&mdash;it does not work with
	  earlier releases of the SCSI code) and it works very well.  See
	  <ulink
	    url="file:/usr/share/examples/worm">/usr/share/examples/worm</ulink>
	  on your 2.2 system for example scripts used to created ISO9660
	  filesystem images (with RockRidge extensions) and burn them onto an
	  HP6020i CDR.</para>
      </sect3>
	  
      <sect3 id="hw-tape">
	<title>Tape drives</title>

	<para>I've had pretty good luck with both <ulink
	    url="http://www.Exabyte.COM:80/Products/8mm/8505XL/Rfeatures.html">8mm
	    drives</ulink> from <ulink
	    url="http://www.exabyte.com/">Exabyte</ulink> and  <ulink
	    url="http://www-dmo.external.hp.com:80/tape/_cpb0001.htm">4mm
	    (DAT)</ulink> drives from <ulink
	    url="http://www.hp.com/">HP</ulink>.</para>

	<para>For backup purposes, I'd have to give the higher recommendation
	  to the Exabyte due to the more robust nature (and higher storage
	  capacity) of 8mm tape.</para>
      </sect3>
      
      <sect3 id="hw-video">
	<title>Video Cards</title>

	<para>If you can also afford to buy a commercial X server for
	  US&#36;99 from <ulink url="http://www.xig.com/">Xi Graphics, Inc.
	    (formerly X Inside, Inc)</ulink> then I can heartily recommend the
	  <ulink url="http://www.matrox.com/">Matrox</ulink> <ulink
	    url="http://www.matrox.com/mgaweb/brochure.htm">Millenium
	    II</ulink> card.  Note that support for this card is also
	  excellent with the <ulink
	    url="http://www.xfree86.org/">XFree86</ulink> server, which is now
	  at version 3.3.2.</para>

	<para>You also certainly can't go wrong with one of <ulink
	    url="http://www.nine.com/">Number 9's</ulink> cards &mdash; their
	  S3 Vision 868 and 968 based cards (the 9FX series) also being quite
	  fast and very well supported by XFree86's S3 server.  You can also
	  pick up their Revolution 3D cards very cheaply these days,
	  especially if you require a lot of video memory.</para>
      </sect3>
      
      <sect3 id="hw-monitors">
	<title>Monitors</title>

	<para>I have had very good luck with the <ulink
	    url="http://cons3.sel.sony.com/SEL/ccpg/display/ms17se2.html">Sony
	    Multiscan 17seII monitors</ulink>, as have I with the Viewsonic
	  offering in the same (Trinitron) tube.  For larger than 17", all I
	  can recommend at the time of this writing is to not spend any less
	  than U.S.  &#36;2,000 for a 21" monitor or &#36;1,700 for a 20"
	  monitor if that's what you really need.  There are good monitors
	  available in the &gt;=20" range and there are also cheap monitors in
	  the &gt;=20" range.  Unfortunately, very few are both cheap and
	  good!</para>
      </sect3>
	  
      <sect3 id="hw-networking">
	<title>Networking</title>

	<para>I can recommend the Intel EtherExpress Pro/100B card first and
	  foremost, followed by the <ulink
	    url="http://www.smc.com/">SMC</ulink> Ultra 16 controller for any
	  ISA application and the SMC EtherPower or Compex ENET32 cards for
	  slightly cheaper PCI based networking.  In general, any PCI NIC
	  based around DEC's DC21041 Ethernet controller chip, such as the
	  Znyx ZX342 or DEC DE435/450, will generally work quite well and can
	  frequently be found in 2-port and 4-port version (useful for
	  firewalls and routers), though the Pro/100MB card has the edge when
	  it comes to providing the best performance with lower
	  overhead.</para>
	    
	<para>If what you're looking for is the cheapest possible solution
	  then almost any NE2000 clone will do a fine job for very little
	  cost.</para>
      </sect3>
      
      <sect3 id="hw-serial">
	<title>Serial</title>

	<para>If you're looking for high-speed serial networking solutions,
	  then <ulink url="http://www.dgii.com/">Digi International</ulink>
	  makes the <ulink
	    url="http://www.dgii.com/prodprofiles/profiles-prices/digiprofiles/digispecs/sync570.html">SYNC/570</ulink>
	  series, with drivers now in FreeBSD-current.  <ulink
	    url="http://www.etinc.com/">Emerging Technologies</ulink> also
	  manufactures a board with T1/E1 capabilities, using software they
	  provide.  I have no direct experience using either product,
	  however.</para>
	    
	<para>Multiport card options are somewhat more numerous, though it has
	  to be said that FreeBSD's support for <ulink
	    url="http://www.cyclades.com/">Cyclades</ulink>'s products is
	  probably the tightest, primarily as a result of that company's
	  commitment to making sure that we are adequately supplied with
	  evaluation boards and technical specs.  I've heard that the
	  Cyclom-16Ye offers the best price/performance, though I've not
	  checked the prices lately.  Other multiport cards I've heard good
	  things about are the BOCA and AST cards, and <ulink
	    url="http://www.stallion.com/">Stallion Technologies</ulink>
	  apparently offers an unofficial driver for their  cards at <ulink
	    url="ftp://ftp.stallion.com/drivers/unsupported/freebsd/stalbsd-0.0.4.tar.gz">this</ulink>
	  location.</para>
      </sect3>
      
      <sect3 id="hw-audio">
	<title>Audio</title>

	<para>I currently use a <ulink url="http://www.creaf.com/">Creative
	    Labs</ulink> AWE32 though just about anything from Creative Labs
	  will generally work these days.  This is not to say that other types
	  of sound cards don't also work, simply that I have little experience
	  with them (I was a former GUS fan, but Gravis's soundcard situation
	  has been dire for some time).</para>
      </sect3>
      
      <sect3 id="hw-vgrabbers">
	<title>Video</title>

	<para>For video capture, there are two good choices &mdash; any card
	  based on the Brooktree BT848 chip, such as the Hauppage or WinTV
	  boards, will work very nicely with FreeBSD.  Another board which
	  works for me is the <ulink
	    url="http://www.matrox.com/">Matrox</ulink> <ulink
	    url="http://www.matrox.com/imgweb/meteor.htm">Meteor</ulink> card.
	  FreeBSD also supports the older video spigot card from Creative
	  Labs, but those are getting somewhat difficult to find. Note that
	  the Meteor frame grabber card <emphasis>will not work</emphasis>
	  with motherboards based on the 440FX chipset! See the <link
	    linkend="hw-mb">motherboard reference</link> section for details.
	  In such cases, it's better to go with a BT848 based board.</para>
      </sect3>
    </sect2>
  </sect1>
  
  <sect1 id="hw-core">
    <title>Core/Processing</title>
    
    <sect2>
      <title>Motherboards, busses, and chipsets</title>
	  
      <sect3>
	<title>* ISA</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>* EISA</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>* VLB</title>

	<para></para>
      </sect3>
      
      <sect3 id="hw-mb-pci">
	<title>PCI</title>

	<para><emphasis>Contributed by &a.obrien; from postings by
	    &a.rgrimes;.  25 April 1995.</emphasis></para>

	<para><emphasis>Continuing updates by &a.jkh;.</emphasis>  Last 
          update on <emphasis>26 August 1996.</emphasis></para>

	<para>Of the Intel PCI chip sets, the following list describes various
	  types of known-brokenness and the degree of breakage, listed from
	  worst to best.</para>
	    
	<variablelist>
	  <varlistentry>
	    <term>Mercury:</term>

	    <listitem>
	      <para>Cache coherency problems, especially if there are ISA bus
		masters behind the ISA to PCI bridge chip. Hardware flaw, only
		known work around is to turn the cache off.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Saturn-I <emphasis>(ie, 82424ZX at rev 0, 1 or
		2)</emphasis>:</term>
		  
	    <listitem>
	      <para>Write back cache coherency problems.  Hardware flaw, only
		known work around is to set the external cache to
		write-through mode.  Upgrade to Saturn-II.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Saturn-II <emphasis>(ie, 82424ZX at rev 3 or
		4)</emphasis>:</term>
		  
	    <listitem>
	      <para>Works fine, but many MB manufactures leave out the
		external dirty bit SRAM needed for write back operation. Work
		arounds are either run it in write through mode, or get the
		dirty bit SRAM installed.  (I have these for the ASUS
		PCI/I-486SP3G rev 1.6 and later boards).</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Neptune:</term>
	    
	    <listitem>
	      <para>Can not run more than 2 bus master devices. Admitted Intel
		design flaw.  Workarounds include do not run more than 2 bus
		masters, special hardware design to replace the PCI bus
		arbiter (appears on Intel Altair board and several other Intel
		server group MB's).  And of course Intel's official answer,
		move to the Triton chip set, we <quote>fixed it
		there</quote>.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Triton <emphasis>(ie, 430FX)</emphasis>:</term>
		  
	    <listitem>
	      <para>No known cache coherency or bus master problems, chip set
		does not implement parity checking.  Workaround for parity
		issue.  Use Triton-II based motherboards if you have the
		choice.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Triton-II <emphasis>(ie, 430HX)</emphasis>:</term>
	    
	    <listitem>
	      <para>All reports on motherboards using this chipset have been
		favorable so far.  No known problems.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Orion:</term>
	    
	    <listitem>
	      <para>Early versions of this chipset suffered from a PCI
		write-posting bug which can cause noticeable performance
		degradation in applications where large amounts of PCI bus
		traffic is involved.  B0 stepping or later revisions of the
		chipset fixed this problem.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term><ulink
		url="http://developer.intel.com/design/pcisets/desktop.htm#440FX">440FX</ulink>:</term>
		  
	    <listitem>
	      <para>This <ulink
		  url="http://www.intel.com/procs/ppro/index.htm">Pentium
		  Pro</ulink> support chipset seems to work well, and does not
		suffer from any of the early Orion chipset problems.  It also
		supports a wider variety of memory, including ECC and parity.
		The only known problem with it is that the Matrox Meteor frame
		grabber card doesn't like it.</para>
	    </listitem>
	  </varlistentry>
	</variablelist>
      </sect3>
    </sect2>
    
    <sect2>
      <title>CPUs/FPUs</title>
      
      <para><emphasis>Contributed by &a.asami;.  26 December
	  1997.</emphasis></para>
	  
      <sect3>
	<title>P6 class (Pentium Pro/Pentium II)</title>

	<para>Both the Pentium Pro and Pentium II work fine with FreeBSD. In
	  fact, our main ftp site <ulink
	    url="ftp://ftp.FreeBSD.org/">ftp.FreeBSD.org</ulink> (also known
	  as "<filename>ftp.cdrom.com</filename>", world's largest ftp site)
	  runs FreeBSD on a Pentium Pro.  <ulink
	    url="ftp://ftp.cdrom.com/archive-info/wcarchive.txt">Configurations
	    details</ulink> are available for interested parties.</para>
      </sect3>
      
      <sect3>
	<title>Pentium class</title>

	<para>The Intel Pentium (P54C), Pentium MMX (P55C), AMD K6 and
	  Cyrix/IBM 6x86MX processors are all reported to work with FreeBSD.
	  I will not go into details of which processor is faster than what,
	  there are zillions of web sites on the Internet that tells you one
	  way or another.  <!-- smiley --><emphasis>:)</emphasis></para>

	<note>
	  <para>Various CPUs have different voltage/cooling requirements. Make
	    sure your motherboard can supply the exact voltage needed by the
	    CPU.  For instance, many recent MMX chips require split voltage
	    (e.g., 2.9V core, 3.3V I/O).  Also, some AMD and Cyrix/IBM chips
	    run hotter than Intel chips.  In that case, make sure you have
	    good heatsink/fans (you can get the list of certified parts from
	    their web pages).</para>
	</note>

	<sect4>
	  <title>Clock speeds</title>
	  
	  <para><emphasis>Contributed by &a.rgrimes;.  1 October
	      1996.</emphasis></para>
	      
	  <para><emphasis>Updated by &a.asami;.  27 December
	      1997.</emphasis></para>
	  
	  <para>Pentium class machines use different clock speeds for the
	    various parts of the system.  These being the speed of the CPU,
	    external memory bus, and the PCI bus.  It is not always true that
	    a <quote>faster</quote> processor will make a system faster than a
	    <quote>slower</quote> one, due to the various clock speeds used.
	    Below is a table showing the differences:</para>

	  <informaltable frame="none">
	    <tgroup cols="4">
	      <thead>
		<row>
		  <entry>Rated CPU MHz</entry>
		  <entry>External Clock and Memory Bus MHz</entry>
		  <entry>External to Internal Clock Multiplier</entry>
		  <entry>PCI Bus Clock MHz</entry>
		</row>
	      </thead>

	      <tbody>
		<row>
		  <entry>60</entry>
		  <entry>60</entry>
		  <entry>1.0</entry>
		  <entry>30</entry>
		</row>
		
		<row>
		  <entry>66</entry>
		  <entry>66</entry>
		  <entry>1.0</entry>
		  <entry>33</entry>
		</row>
		
		<row>
		  <entry>75</entry>
		  <entry>50</entry>
		  <entry>1.5</entry>
		  <entry>25</entry>
		</row>
		
		<row>
		  <entry>90</entry>
		  <entry>60</entry>
		  <entry>1.5</entry>
		  <entry>30</entry>
		</row>
		
		<row>
		  <entry>100</entry>
		  <entry>50</entry>
		  <entry>2</entry>
		  <entry>25</entry>
		</row>
		
		<row>
		  <entry>100</entry>
		  <entry>66</entry>
		  <entry>1.5</entry>
		  <entry>33</entry>
		</row>
		
		<row>
		  <entry>120</entry>
		  <entry>60</entry>
		  <entry>2</entry>
		  <entry>30</entry>
		</row>
		
		<row>
		  <entry>133</entry>
		  <entry>66</entry>
		  <entry>2</entry>
		  <entry>33</entry>
		</row>
		
		<row>
		  <entry>150</entry>
		  <entry>60</entry>
		  <entry>2.5</entry>
		  <entry>30 (Intel, AMD)</entry>
		</row>
		
		<row>
		  <entry>150</entry>
		  <entry>75</entry>
		  <entry>2</entry>
		  <entry>37.5 (Cyrix/IBM 6x86MX)</entry>
		</row>
		
		<row>
		  <entry>166</entry>
		  <entry>66</entry>
		  <entry>2.5</entry>
		  <entry>33</entry>
		</row>
		
		<row>
		  <entry>180</entry>
		  <entry>60</entry>
		  <entry>3</entry>
		  <entry>30</entry>
		</row>
		
		<row>
		  <entry>200</entry>
		  <entry>66</entry>
		  <entry>3</entry>
		  <entry>33</entry>
		</row>
		
		<row>
		  <entry>233</entry>
		  <entry>66</entry>
		  <entry>3.5</entry>
		  <entry>33</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </informaltable>
	  
	  <note>
	    <para>66MHz may actually be 66.667MHz, but don't assume so.</para>
	    
	    <para>The Pentium 100 can be run at either 50MHz external clock
	      with a multiplier of 2 or at 66MHz and a multiplier of
	      1.5.</para>
	  </note>
	  
	  <para>As can be seen the best parts to be using are the 100, 133,
	    166, 200 and 233, with the exception that at a multiplier of 3 or
	    more the CPU starves for memory.</para>
	</sect4>

	<sect4>
	  <title>The AMD K6 Bug</title>
	  
	  <para>In 1997, there have been reports of the AMD K6 seg faulting
	    during heavy compilation.  That problem has been fixed in 3Q '97.
	    According to reports, K6 chips with date mark <quote>9733</quote>
	    or larger (i.e., manufactured in the 33rd week of '97 or later) do
	    not have this bug.</para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>* 486 class</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>* 386 class</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>286 class</title>
	    
	<para>Sorry, FreeBSD does not run on 80286 machines.  It is nearly
	  impossible to run today's large full-featured UNIXes on such
	  hardware.</para>
      </sect3>
    </sect2>
    
    <sect2>
      <title>* Memory</title>
      
      <para>The minimum amount of memory you must have to install FreeBSD is 5
	MB.  Once your system is up and running you can <link
	  linkend="kernelconfig-building">build a custom kernel</link> that
	will use less memory.  If you use the <filename>boot4.flp</filename>
	you can get away with having only 4 MB.</para>
    </sect2>
    
    <sect2>
      <title>* BIOS</title>
      
      <para></para>
    </sect2>
  </sect1>
  
  <sect1 id="hw-io">
    <title>Input/Output Devices</title>
    
    <sect2>
      <title>* Video cards</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>* Sound cards</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>Serial ports and multiport cards</title>
      
      <sect3 id="uart">
	<title>The UART: What it is and how it works</title>

	<para><emphasis>Copyright &copy; 1996 &a.uhclem;, All Rights
	    Reserved.  13 January 1996.</emphasis></para>

	<para>The Universal Asynchronous Receiver/Transmitter (UART)
	  controller is the key component of the serial communications
	  subsystem of a computer.  The UART takes bytes of data and transmits
	  the individual bits in a sequential fashion.  At the destination, a
	  second UART re-assembles the bits into complete bytes.</para>
	    
	<para>Serial transmission is commonly used with modems and for
	  non-networked communication between computers, terminals and other
	  devices.</para>
	    
	<para>There are two primary forms of serial transmission: Synchronous
	  and Asynchronous.  Depending on the modes that are supported by the
	  hardware, the name of the communication sub-system will usually
	  include a <literal>A</literal> if it supports Asynchronous
	  communications, and a <literal>S</literal> if it supports
	  Synchronous communications.  Both forms are described below.</para>
	    
	<para>Some common acronyms are:
	  
	  <blockquote>
	    <para>UART	Universal Asynchronous
	      Receiver/Transmitter</para>
	  </blockquote>
	  
	  <blockquote>
	    <para>USART	Universal Synchronous-Asynchronous
	      Receiver/Transmitter</para>
	  </blockquote></para>

	<sect4>
	  <title>Synchronous Serial Transmission</title>
	  
	  <para>Synchronous serial transmission requires that the sender and
	    receiver share a clock with one another, or that the sender
	    provide a strobe or other timing signal so that the receiver knows
	    when to <quote>read</quote> the next bit of the data.  In most
	    forms of serial Synchronous communication, if there is no data
	    available at a given instant to transmit, a fill character must be
	    sent instead so that data is always being transmitted.
	    Synchronous communication is usually more efficient because only
	    data bits are transmitted between sender and receiver, and
	    synchronous communication can be more more costly if extra wiring
	    and circuits are required to share a clock signal between the
	    sender and receiver.</para>
	      
	  <para>A form of Synchronous transmission is used with printers and
	    fixed disk devices in that the data is sent on one set of wires
	    while a clock or strobe is sent on a different wire. Printers and
	    fixed disk devices are not normally serial devices because most
	    fixed disk interface standards send an entire word of data for
	    each clock or strobe signal by using a separate wire for each bit
	    of the word.  In the PC industry, these are known as Parallel
	    devices.</para>
	      
	  <para>The standard serial communications hardware in the PC does not
	    support Synchronous operations.  This mode is described here for
	    comparison purposes only.</para>
	</sect4>

	<sect4>
	  <title>Asynchronous Serial Transmission</title>
	  
	  <para>Asynchronous transmission allows data to be transmitted
	    without the sender having to send a clock signal to the receiver.
	    Instead, the sender and receiver must agree on timing parameters
	    in advance and special bits are added to each word which are used
	    to synchronize the sending and receiving units.</para>
	      
	  <para>When a word is given to the UART for Asynchronous
	    transmissions, a bit called the "Start Bit" is added to the
	    beginning of each word  that is to be transmitted.  The Start Bit
	    is used to alert the receiver that a word of data is about to be
	    sent, and to force the clock in the receiver into synchronization
	    with the clock in the transmitter.  These two clocks must be
	    accurate enough to not  have the frequency drift by more than 10%
	    during the transmission of the remaining bits in the word.  (This
	    requirement was set in the days of mechanical teleprinters and is
	    easily met by modern electronic equipment.)</para>
	      
	  <para>After the Start Bit, the individual bits of the word of data
	    are sent, with the Least Significant Bit (LSB) being sent first.
	    Each  bit in the transmission is transmitted for exactly the same
	    amount of time as all of the other bits, and the receiver
	    <quote>looks</quote> at the wire at approximately halfway through
	    the period assigned to each bit to determine if the bit is a
	    <literal>1</literal> or a <literal>0</literal>.  For example, if
	    it takes two seconds to send each bit, the receiver will examine
	    the signal to determine if it is a <literal>1</literal> or a
	    <literal>0</literal> after one second has passed, then it will
	    wait two seconds and then examine the value of the next bit, and
	    so on.</para>
	      
	  <para>The sender does not know when the receiver has
	    <quote>looked</quote> at the value of the bit.  The sender only
	    knows when the clock says to begin transmitting the next bit of
	    the word.</para>
	      
	  <para>When the entire data word has been sent, the transmitter may
	    add a Parity Bit that the transmitter generates.  The Parity Bit
	    may be used by the receiver to perform simple error checking.
	    Then at least one Stop Bit is sent by the transmitter.</para>
	      
	  <para>When the receiver has received all of the bits in the data
	    word, it may check for the Parity Bits (both sender and receiver
	    must agree on whether a Parity Bit is to be used), and then the
	    receiver looks for a Stop Bit.  If the Stop Bit does not appear
	    when it is supposed to, the UART considers the entire word to be
	    garbled and will report a Framing Error to the host processor when
	    the data word is read.  The usual cause of a Framing Error is that
	    the sender and receiver clocks were not running at the same speed,
	    or that the signal was interrupted.</para>
	      
	  <para>Regardless of whether the data was received correctly or not,
	    the UART automatically discards the Start, Parity and Stop bits.
	    If the sender and receiver are configured identically, these bits
	    are not passed to the host.</para>
	      
	  <para>If another word is ready for transmission, the Start Bit for
	    the new word can be sent as soon as the Stop Bit for the previous
	    word has been sent.</para>
	      
	  <para>Because asynchronous data is <quote>self synchronizing</quote>,
	    if there is no data to transmit, the transmission line can be
	    idle.</para>
	</sect4>

	<sect4>
	  <title>Other UART Functions</title>
	  
	  <para>In addition to the basic job of converting data from parallel
	    to serial for transmission and from serial to parallel on
	    reception, a UART will usually provide additional circuits for
	    signals that can be used to indicate the state of the transmission
	    media, and to regulate the flow of data in the event that the
	    remote device is not prepared to accept more data.  For example,
	    when the  device connected to the UART is a modem, the modem may
	    report the presence of a carrier on the phone line while the
	    computer may be able to instruct the modem to reset itself or to
	    not take calls by asserting or deasserting one more more of these
	    extra signals. The function of each of these additional signals is
	    defined in the EIA RS232-C standard.</para>
	</sect4>

	<sect4>
	  <title>The RS232-C and V.24 Standards</title>
	  
	  <para>In most computer systems, the UART is connected to circuitry
	    that generates signals that comply with the EIA RS232-C
	    specification.  There is also a CCITT standard named V.24 that
	    mirrors the specifications included in RS232-C.</para>
	      
	  <sect5>
	    <title>RS232-C Bit Assignments (Marks and Spaces)</title>
	    
	    <para>In RS232-C, a value of <literal>1</literal> is called a
	      <literal>Mark</literal> and a value of <literal>0</literal> is
	      called a <literal>Space</literal>.  When a communication line is
	      idle, the line is said to be <quote>Marking</quote>, or
	      transmitting continuous <literal>1</literal> values.</para>
		
	    <para>The Start bit always has a value of <literal>0</literal> (a
	      Space).  The Stop Bit always has a value of <literal>1</literal>
	      (a Mark).  This means that there will always be a Mark (1) to
	      Space (0) transition on the line at the start of every word,
	      even when multiple word are transmitted back to back.  This
	      guarantees that sender and receiver can resynchronize their
	      clocks regardless of the content of the data bits that are being
	      transmitted.</para>
		
	    <para>The idle time between Stop and Start bits does not have to
	      be an exact multiple (including zero) of the bit rate of the
	      communication link, but most UARTs are designed this way for
	      simplicity.</para>
		
	    <para>In RS232-C, the "Marking" signal (a <literal>1</literal>) is
	      represented by a voltage between -2 VDC and -12 VDC, and a
	      "Spacing" signal (a <literal>0</literal>) is represented by a
	      voltage between 0 and +12 VDC.  The transmitter is supposed to
	      send +12 VDC or -12 VDC, and the receiver is supposed to allow
	      for some voltage loss in long cables.  Some transmitters in low
	      power devices (like portable computers) sometimes use only +5
	      VDC and -5 VDC, but these values are still acceptable to a
	      RS232-C receiver, provided that the cable lengths are
	      short.</para>
	  </sect5>
	      
	  <sect5>
	    <title>RS232-C Break Signal</title>
	    
	    <para>RS232-C also specifies a signal called a
	      <literal>Break</literal>, which is caused by sending continuous
	      Spacing values (no Start or Stop bits).  When there is no
	      electricity present on the data circuit, the line is considered
	      to be sending <literal>Break</literal>.</para>
		
	    <para>The <literal>Break</literal> signal must be of a duration
	      longer than the time it takes to send a complete byte plus
	      Start, Stop and Parity bits.  Most UARTs can distinguish between
	      a Framing Error and a Break, but if the UART cannot do this, the
	      Framing Error detection can be used to identify Breaks.</para>
		
	    <para>In the days of teleprinters, when numerous printers around
	      the country were wired in series (such as news services), any
	      unit could cause a <literal>Break</literal> by temporarily
	      opening the entire circuit so that no current flowed.  This was
	      used to allow a location with urgent news to interrupt some
	      other location that was currently sending information.</para>
		
	    <para>In modern systems there are two types of Break signals. If
	      the Break is longer than 1.6 seconds, it is considered a "Modem
	      Break", and some modems can be programmed to terminate the
	      conversation and go on-hook or enter the modems' command mode
	      when the modem detects this signal.  If the Break is smaller
	      than 1.6 seconds, it signifies a Data Break and it is up to the
	      remote computer to respond to this signal.  Sometimes this form
	      of Break is used as an Attention or Interrupt signal and
	      sometimes is accepted as a substitute for the ASCII CONTROL-C
	      character.</para>
		
	    <para>Marks and Spaces are also equivalent to <quote>Holes</quote>
	      and <quote>No Holes</quote> in paper tape systems.</para>

	    <note>
	      <para>Breaks cannot be generated from paper tape or from any
		other byte value, since bytes are always sent with Start and
		Stop bit.  The UART is usually capable of generating the
		continuous Spacing signal in response to a special command
		from the host processor.</para>
	    </note>
	  </sect5>
	  
	  <sect5>
	    <title>RS232-C DTE and DCE Devices</title>
	    
	    <para>The RS232-C specification defines two types of equipment:
	      the Data Terminal Equipment (DTE) and the Data Carrier Equipment
	      (DCE).  Usually, the DTE device is the terminal (or computer),
	      and the DCE is a modem.  Across the phone line at the other end
	      of a conversation, the receiving modem is also a DCE device and
	      the computer that is connected to that modem is a DTE device.
	      The DCE device receives signals on the pins that the DTE device
	      transmits on, and vice versa.</para>
		
	    <para>When two devices that are both DTE or both DCE must be
	      connected together without a modem or a similar media translater
	      between them, a NULL modem must be used.  The NULL modem
	      electrically re-arranges the cabling so that the transmitter
	      output is connected to the receiver input on the other device,
	      and vice versa.  Similar translations are performed on all of
	      the control signals so that each device will see what it thinks
	      are DCE (or DTE) signals from the other device.</para>
		
	    <para>The number of signals generated by the DTE and DCE devices
	      are not symmetrical.  The DTE device generates fewer signals for
	      the DCE device than the DTE device receives from the DCE.</para>
	  </sect5>
	  
	  <sect5>
	    <title>RS232-C Pin Assignments</title>
	    
	    <para>The EIA RS232-C specification (and the ITU equivalent, V.24)
	      calls for a twenty-five pin connector (usually a DB25) and
	      defines the purpose of most of the pins in that
	      connector.</para>
		
	    <para>In the IBM Personal Computer and similar systems, a subset
	      of RS232-C signals are provided via nine pin connectors (DB9).
	      The signals that are not included on the PC connector deal
	      mainly with synchronous operation, and this transmission mode is
	      not supported by the UART that IBM selected for use in the IBM
	      PC.</para>
		
	    <para>Depending on the computer manufacturer, a DB25, a DB9, or
	      both types of connector may be used for RS232-C communications.
	      (The IBM PC also uses a DB25 connector for the parallel printer
	      interface which causes some confusion.)</para>
		
	    <para>Below is a table of the RS232-C signal assignments in the
	      DB25 and DB9 connectors.</para>

	    <informaltable frame="none">
	      <tgroup cols="7">
		<thead>
		  <row>
		    <entry>DB25 RS232-C Pin</entry>
		    <entry>DB9 IBM PC Pin</entry>
		    <entry>EIA Circuit Symbol</entry>
		    <entry>CCITT Circuit Symbol</entry>
		    <entry>Common Name</entry>
		    <entry>Signal Source</entry>
		    <entry>Description</entry>
		  </row>
		</thead>
		
		<tbody>
		  <row>
		    <entry>1</entry>
		    <entry>-</entry>
		    <entry>AA</entry>
		    <entry>101</entry>
		    <entry>PG/FG</entry>
		    <entry>-</entry>
		    <entry>Frame/Protective Ground</entry>
		  </row>
		  
		  <row>
		    <entry>2</entry>
		    <entry>3</entry>
		    <entry>BA</entry>
		    <entry>103</entry>
		    <entry>TD</entry>
		    <entry>DTE</entry>
		    <entry>Transmit Data</entry>
		  </row>
		  
		  <row>
		    <entry>3</entry>
		    <entry>2</entry>
		    <entry>BB</entry>
		    <entry>104</entry>
		    <entry>RD</entry>
		    <entry>DCE</entry>
		    <entry>Receive Data</entry>
		  </row>
		  
		  <row>
		    <entry>4</entry>
		    <entry>7</entry>
		    <entry>CA</entry>
		    <entry>105</entry>
		    <entry>RTS</entry>
		    <entry>DTE</entry>
		    <entry>Request to Send</entry>
		  </row>
		  
		  <row>
		    <entry>5</entry>
		    <entry>8</entry>
		    <entry>CB</entry>
		    <entry>106</entry>
		    <entry>CTS</entry>
		    <entry>DCE</entry>
		    <entry>Clear to Send</entry>
		  </row>
		  
		  <row>
		    <entry>6</entry>
		    <entry>6</entry>
		    <entry>CC</entry>
		    <entry>107</entry>
		    <entry>DSR</entry>
		    <entry>DCE</entry>
		    <entry>Data Set Ready</entry>
		  </row>
		  
		  <row>
		    <entry>7</entry>
		    <entry>5</entry>
		    <entry>AV</entry>
		    <entry>102</entry>
		    <entry>SG/GND</entry>
		    <entry>-</entry>
		    <entry>Signal Ground</entry>
		  </row>
		  
		  <row>
		    <entry>8</entry>
		    <entry>1</entry>
		    <entry>CF</entry>
		    <entry>109</entry>
		    <entry>DCD/CD</entry>
		    <entry>DCE</entry>
		    <entry>Data Carrier Detect</entry>
		  </row>
		  
		  <row>
		    <entry>9</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>Reserved for Test</entry>
		  </row>
		  
		  <row>
		    <entry>10</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>Reserved for Test</entry>
		  </row>
		  
		  <row>
		    <entry>11</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>Reserved for Test</entry>
		  </row>
		  
		  <row>
		    <entry>12</entry>
		    <entry>-</entry>
		    <entry>CI</entry>
		    <entry>122</entry>
		    <entry>SRLSD</entry>
		    <entry>DCE</entry>
		    <entry>Sec. Recv. Line Signal Detector</entry>
		  </row>
		  
		  <row>
		    <entry>13</entry>
		    <entry>-</entry>
		    <entry>SCB</entry>
		    <entry>121</entry>
		    <entry>SCTS</entry>
		    <entry>DCE</entry>
		    <entry>Secondary Clear to Send</entry>
		  </row>
		  
		  <row>
		    <entry>14</entry>
		    <entry>-</entry>
		    <entry>SBA</entry>
		    <entry>118</entry>
		    <entry>STD</entry>
		    <entry>DTE</entry>
		    <entry>Secondary Transmit Data</entry>
		  </row>
		  
		  <row>
		    <entry>15</entry>
		    <entry>-</entry>
		    <entry>DB</entry>
		    <entry>114</entry>
		    <entry>TSET</entry>
		    <entry>DCE</entry>
		    <entry>Trans. Sig. Element Timing</entry>
		  </row>
		  
		  <row>
		    <entry>16</entry>
		    <entry>-</entry>
		    <entry>SBB</entry>
		    <entry>119</entry>
		    <entry>SRD</entry>
		    <entry>DCE</entry>
		    <entry>Secondary Received Data</entry>
		  </row>
		  
		  <row>
		    <entry>17</entry>
		    <entry>-</entry>
		    <entry>DD</entry>
		    <entry>115</entry>
		    <entry>RSET</entry>
		    <entry>DCE</entry>
		    <entry>Receiver Signal Element Timing</entry>
		  </row>
		  
		  <row>
		    <entry>18</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>141</entry>
		    <entry>LOOP</entry>
		    <entry>DTE</entry>
		    <entry>Local Loopback</entry>
		  </row>
		  
		  <row>
		    <entry>19</entry>
		    <entry>-</entry>
		    <entry>SCA</entry>
		    <entry>120</entry>
		    <entry>SRS</entry>
		    <entry>DTE</entry>
		    <entry>Secondary Request to Send</entry>
		  </row>
		  
		  <row>
		    <entry>20</entry>
		    <entry>4</entry>
		    <entry>CD</entry>
		    <entry>108.2</entry>
		    <entry>DTR</entry>
		    <entry>DTE</entry>
		    <entry>Data Terminal Ready</entry>
		  </row>
		  
		  <row>
		    <entry>21</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>RDL</entry>
		    <entry>DTE</entry>
		    <entry>Remote Digital Loopback</entry>
		  </row>
		  
		  <row>
		    <entry>22</entry>
		    <entry>9</entry>
		    <entry>CE</entry>
		    <entry>125</entry>
		    <entry>RI</entry>
		    <entry>DCE</entry>
		    <entry>Ring Indicator</entry>
		  </row>
		  
		  <row>
		    <entry>23</entry>
		    <entry>-</entry>
		    <entry>CH</entry>
		    <entry>111</entry>
		    <entry>DSRS</entry>
		    <entry>DTE</entry>
		    <entry>Data Signal Rate Selector</entry>
		  </row>
		  
		  <row>
		    <entry>24</entry>
		    <entry>-</entry>
		    <entry>DA</entry>
		    <entry>113</entry>
		    <entry>TSET</entry>
		    <entry>DTE</entry>
		    <entry>Trans. Sig. Element Timing</entry>
		  </row>
		  
		  <row>
		    <entry>25</entry>
		    <entry>-</entry>
		    <entry>-</entry>
		    <entry>142</entry>
		    <entry>-</entry>
		    <entry>DCE</entry>
		    <entry>Test Mode</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </informaltable>
	  </sect5>
	</sect4>

	<sect4>
	  <title>Bits, Baud and Symbols</title>
	  
	  <para>Baud is a measurement of transmission speed in asynchronous
	    communication.  Because of advances in modem communication
	    technology, this term is frequently misused when describing the
	    data rates in newer devices.</para>
	      
	  <para>Traditionally, a Baud Rate represents the number of bits that
	    are actually being sent over the media, not the amount of data
	    that is actually moved from one DTE device to the other. The Baud
	    count includes the overhead bits Start, Stop and Parity that are
	    generated by the sending UART and removed by the receiving UART.
	    This means that seven-bit words of data actually take 10 bits to
	    be completely transmitted.  Therefore, a modem capable of moving
	    300 bits per second from one place to another can normally only
	    move 30 7-bit words if Parity is used and one Start and Stop bit
	    are present.</para>
	      
	  <para>If 8-bit data words are used and Parity bits are also used,
	    the data rate falls to 27.27 words per second, because it now
	    takes 11 bits to send the eight-bit words, and the modem still
	    only sends 300 bits per second.</para>
	      
	  <para>The formula for converting bytes per second into a baud rate
	    and vice versa was simple until error-correcting modems came
	    along.  These modems receive the serial stream of bits from the
	    UART in the host computer (even when internal modems are used the
	    data is still frequently serialized) and converts the bits back
	    into bytes.  These bytes are then combined into packets and sent
	    over the phone line using a Synchronous transmission method.  This
	    means that the Stop, Start, and Parity bits added by the UART in
	    the DTE (the computer) were removed by the modem before
	    transmission by the sending modem. When these bytes are received
	    by the remote modem, the remote modem adds Start, Stop and Parity
	    bits to the words, converts them to a serial format and then sends
	    them to the receiving UART in the remote computer, who then strips
	    the Start, Stop and Parity bits.</para>
	      
	  <para>The reason all these extra conversions are done is so that the
	    two modems can perform error correction, which means that the
	    receiving modem is able to ask the sending modem to resend a block
	    of data that was not received with the correct checksum.  This
	    checking is handled by the modems, and the DTE devices are usually
	    unaware that the process is occurring.</para>
	      
	  <para>By striping the Start, Stop and Parity bits, the additional
	    bits of data that the two modems must share between themselves to
	    perform error-correction are mostly concealed from the effective
	    transmission rate seen by the sending and receiving DTE equipment.
	    For example, if a modem sends ten 7-bit words to another modem
	    without including the Start, Stop and Parity bits, the sending
	    modem will be able to add 30 bits of its own information that the
	    receiving modem can use to do error-correction without impacting
	    the transmission speed of the real data.</para>
	      
	  <para>The use of the term Baud is further confused by modems that
	    perform compression.  A single 8-bit word passed over the
	    telephone line might represent a dozen words that were transmitted
	    to the sending modem.  The receiving modem will expand the data
	    back to its original content and pass that data to the receiving
	    DTE.</para>
	      
	  <para>Modern modems also include buffers that allow the rate that
	    bits move across the phone line (DCE to DCE) to be a different
	    speed than the speed that the bits move between the DTE and DCE on
	    both ends of the conversation.  Normally the speed between the DTE
	    and DCE is higher than the DCE to DCE speed because of the use of
	    compression by the modems.</para>
	      
	  <para>Because the number of bits needed to describe a byte varied
	    during the trip between the two machines plus the differing
	    bits-per-seconds speeds that are used present on the DTE-DCE and
	    DCE-DCE links, the usage of the term Baud to describe the overall
	    communication speed causes problems and can misrepresent the true
	    transmission speed.  So Bits Per Second (bps) is the correct term
	    to use to describe the transmission rate seen at the DCE to DCE
	    interface and Baud or Bits Per Second are acceptable terms to use
	    when a connection is made between two systems with a wired
	    connection, or if a modem is in use that is not performing
	    error-correction or compression.</para>
	      
	  <para>Modern high speed modems (2400, 9600, 14,400, and 19,200bps)
	    in reality still operate at or below 2400 baud, or more
	    accurately, 2400 Symbols per second.  High speed modem are able to
	    encode more bits of data into each Symbol using a technique called
	    Constellation Stuffing, which is why the effective bits per second
	    rate of the modem is higher, but the modem continues to operate
	    within the limited audio bandwidth that the telephone system
	    provides.  Modems operating at 28,800 and higher speeds have
	    variable Symbol rates, but the technique is the same.</para>
	</sect4>

	<sect4>
	  <title>The IBM Personal Computer UART</title>
	  
	  <para>Starting with the original IBM Personal Computer, IBM selected
	    the National Semiconductor INS8250 UART for use in the IBM PC
	    Parallel/Serial Adapter.  Subsequent generations of compatible
	    computers from IBM and other vendors continued to use the INS8250
	    or improved versions of the National Semiconductor UART
	    family.</para>
	      
	  <sect5>
	    <title>National Semiconductor UART Family Tree</title>
	    
	    <para>There have been several versions and subsequent generations
	      of the INS8250 UART.  Each major version is described
	      below.</para>

	    <!-- This should really be a graphic -->
	    <programlisting>
INS8250  -&gt; INS8250B
  \
   \
    \-&gt; INS8250A -&gt; INS82C50A
             \
              \
               \-&gt; NS16450 -&gt; NS16C450
                        \
                         \
                          \-&gt; NS16550 -&gt; NS16550A -&gt; PC16550D</programlisting>
		
	    <variablelist>
	      <varlistentry>
		<term>INS8250</term>

		<listitem>
		  <para>This part was used in the original IBM PC and IBM
		    PC/XT.  The original name for this part was the INS8250
		    ACE (Asynchronous Communications Element) and it is made
		    from NMOS technology.</para>
			
		  <para>The 8250 uses eight I/O ports and has a one-byte send
		    and a one-byte receive buffer.  This original UART has
		    several race conditions and other flaws. The original IBM
		    BIOS includes code to work around these flaws, but this
		    made the BIOS dependent on the flaws being present, so
		    subsequent parts like the 8250A, 16450  or 16550 could not
		    be used in the original IBM PC or IBM PC/XT.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>INS8250-B</term>
		
		<listitem>
		  <para>This is the slower speed of the INS8250 made from NMOS
		    technology.  It contains the same problems as the original
		    INS8250.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>INS8250A</term>
		
		<listitem>
		  <para>An improved version of the INS8250 using XMOS
		    technology with various functional flaws corrected. The
		    INS8250A was used initially in PC clone computers by
		    vendors who used <quote>clean</quote> BIOS designs. Because
		    of the corrections in the chip, this part could not be
		    used with a BIOS compatible with the INS8250 or
		    INS8250B.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>INS82C50A</term>
		
		<listitem>
		  <para>This is a CMOS version (low power consumption) of the
		    INS8250A and has similar functional
		    characteristics.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>NS16450</term>
		
		<listitem>
		  <para>Same as NS8250A with improvements so it can be used
		    with faster CPU bus designs.  IBM used this part in the
		    IBM AT and updated the IBM BIOS to no longer rely on the
		    bugs in the INS8250.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>NS16C450</term>
		
		<listitem>
		  <para>This is a CMOS version (low power consumption) of the
		    NS16450.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>NS16550</term>
		
		<listitem>
		  <para>Same as NS16450 with a 16-byte send and receive buffer
		    but the buffer design was flawed and could not be reliably
		    be used.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>NS16550A</term>
		
		<listitem>
		  <para>Same as NS16550 with the buffer flaws corrected. The
		    16550A and its successors have become the most popular
		    UART design in the PC industry, mainly due it its ability
		    to reliably handle higher data rates on operating systems
		    with sluggish interrupt response times.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>NS16C552</term>
		
		<listitem>
		  <para>This component consists of two NS16C550A CMOS UARTs in
		    a single package.</para>
		</listitem>
	      </varlistentry>
	      
	      <varlistentry>
		<term>PC16550D</term>
		
		<listitem>
		  <para>Same as NS16550A with subtle flaws corrected. This is
		    revision D of the 16550 family and is the latest design
		    available from National Semiconductor.</para>
		</listitem>
	      </varlistentry>
	    </variablelist>
	  </sect5>
	  
	  <sect5>
	    <title>The NS16550AF and the PC16550D are the same thing</title>
		
	    <para>National reorganized their part numbering system a few years
	      ago, and the NS16550AFN no longer exists by that name. (If you
	      have a NS16550AFN, look at the date code on the part, which is a
	      four digit number that usually starts with a nine.  The first
	      two digits of the number are the year, and the last two digits
	      are the week in that year when the part was packaged.  If you
	      have a NS16550AFN, it is probably a few years old.)</para>
		
	    <para>The new numbers are like PC16550DV, with minor differences
	      in the suffix letters depending on the package material and its
	      shape.  (A description of the numbering system can be found
	      below.)</para>
		
	    <para>It is important to understand that in some stores, you may
	      pay &#36;15(US) for a NS16550AFN made in 1990 and in the next
	      bin are the new PC16550DN parts with minor fixes that National
	      has made since the AFN part was in production, the PC16550DN was
	      probably made in the past six months and it costs half (as low
	      as &#36;5(US) in volume) as much as the NS16550AFN because they
	      are readily available.</para>
		
	    <para>As the supply of NS16550AFN chips continues to shrink, the
	      price will probably continue to increase until more people
	      discover and accept that the PC16550DN really has the same
	      function as the old part number.</para>
	  </sect5>
	  
	  <sect5>
	    <title>National Semiconductor Part Numbering System</title>
	    
	    <para>The older  NS<replaceable>nnnnnrqp</replaceable>  part
	      numbers are now of the format
	      PC<replaceable>nnnnnrgp</replaceable>.</para>
		
	    <para>The <replaceable>r</replaceable> is the revision field.  The
	      current revision of the 16550 from National Semiconductor is
	      <literal>D</literal>.</para>
		
	    <para>The <replaceable>p</replaceable> is the package-type field.
	      The types are:</para>
	    
	    <informaltable frame="none">
	      <tgroup cols="3">
		<tbody>
		  <row>
		    <entry>"F"</entry>
		    <entry>QFP</entry>
		    <entry>(quad flat pack) L lead type</entry>
		  </row>
		  
		  <row>
		    <entry>"N"</entry>
		    <entry>DIP</entry>
		    <entry>(dual inline package) through hole straight lead
		      type</entry>
		  </row>

		  <row>
		    <entry>"V"</entry>
		    <entry>LPCC</entry>
		    <entry>(lead plastic chip carrier) J lead type</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </informaltable>
	    
	    <para>The <replaceable>g</replaceable> is the product grade field.
	      If an <literal>I</literal> precedes the package-type letter, it
	      indicates an <quote>industrial</quote> grade part, which has
	      higher specs than a standard part but not as high as Military
	      Specification (Milspec) component.  This is an optional
	      field.</para>
		
	    <para>So what we used to call a NS16550AFN (DIP Package) is now
	      called a PC16550DN or PC16550DIN.</para>
	  </sect5>
	</sect4>

	<sect4>
	  <title>Other Vendors and Similar UARTs</title>
	  
	  <para>Over the years, the 8250, 8250A, 16450 and 16550 have been
	    licensed or copied by other chip vendors.  In the case of the
	    8250, 8250A and 16450, the exact circuit (the
	    <quote>megacell</quote>) was licensed to many vendors, including
	    Western Digital and Intel. Other vendors reverse-engineered the
	    part or produced emulations that had similar behavior.</para>
	      
	  <para>In internal modems, the modem designer will frequently emulate
	    the 8250A/16450 with the modem microprocessor, and the emulated
	    UART will frequently have a hidden buffer consisting of several
	    hundred bytes.  Because of the size of the buffer, these
	    emulations can be as reliable as a 16550A in their ability to
	    handle high speed data.  However, most operating systems will
	    still report that the UART is only a 8250A or 16450, and may not
	    make effective use of the extra buffering present in the emulated
	    UART unless special drivers are used.</para>
	      
	  <para>Some modem makers are driven by market forces to abandon a
	    design that has hundreds of bytes of buffer and instead use a
	    16550A UART so that the product will compare favorably in market
	    comparisons even though the effective performance may be lowered
	    by this action.</para>
	      
	  <para>A common misconception is that all parts with
	    <quote>16550A</quote> written on them are identical in performance.
	    There are differences, and in some cases, outright flaws in most
	    of these 16550A clones.</para>
	      
	  <para>When the NS16550 was developed, the National Semiconductor
	    obtained several patents on the design and they also limited
	    licensing, making it harder for other vendors to provide a chip
	    with similar features.  Because of the patents, reverse-engineered
	    designs and emulations had to avoid infringing the claims covered
	    by the patents.  Subsequently, these copies almost never perform
	    exactly the same as the NS16550A or PC16550D, which are the parts
	    most computer and modem makers want to buy but are sometimes
	    unwilling to pay the price required to get the genuine
	    part.</para>
	      
	  <para>Some of the differences in the clone 16550A parts are
	    unimportant, while others can prevent the device from being used
	    at all with a given operating system or driver.  These differences
	    may show up when using other drivers, or when particular
	    combinations of events occur that were not well tested or
	    considered in the Windows driver.  This is because most modem
	    vendors and 16550-clone makers use the Microsoft drivers from
	    Windows for Workgroups 3.11 and the Microsoft MSD utility as the
	    primary tests for compatibility with the NS16550A.  This
	    over-simplistic criteria means that if a different operating
	    system is used, problems could appear due to subtle differences
	    between the clones and genuine components.</para>
	      
	  <para>National Semiconductor has made available a program named
	    <application>COMTEST</application> that performs compatibility
	    tests independent of any OS drivers.  It should be remembered that
	    the purpose of this type of program is to demonstrate the flaws in
	    the products of the competition, so the program will report major
	    as well as extremely subtle differences in behavior in the part
	    being tested.</para>
	      
	  <para>In a series of tests performed by the author of this document
	    in 1994, components made by National Semiconductor, TI, StarTech,
	    and CMD as well as megacells and emulations embedded in internal
	    modems were tested with COMTEST.  A difference count for some of
	    these components is listed below. Because these tests were
	    performed in 1994, they may not reflect the current performance of
	    the given product from a vendor.</para>
	      
	  <para>It should be noted that COMTEST normally aborts when an
	    excessive number or certain types of problems have been detected.
	    As part of this testing, COMTEST was modified so that it would not
	    abort no matter how many differences were encountered.</para>

	  <informaltable frame="none">
	    <tgroup cols="3">
	      <thead>
		<row>
		  <entry>Vendor</entry>
		  <entry>Part Number</entry>
		  <entry>Errors (aka "differences" reported)</entry>
		</row>
	      </thead>
	      
	      <tbody>
		<row>
		  <entry>National</entry>
		  <entry>(PC16550DV)</entry>
		  <entry>0</entry>
		</row>
		
		<row>
		  <entry>National</entry>
		  <entry>(NS16550AFN)</entry>
		  <entry>0</entry>
		</row>
		
		<row>
		  <entry>National</entry>
		  <entry>(NS16C552V)</entry>
		  <entry>0</entry>
		</row>
		
		<row>
		  <entry>TI</entry>
		  <entry>(TL16550AFN)</entry>
		  <entry>3</entry>
		</row>
		
		<row>
		  <entry>CMD</entry>
		  <entry>(16C550PE)</entry>
		  <entry>19</entry>
		</row>
		
		<row>
		  <entry>StarTech</entry>
		  <entry>(ST16C550J)</entry>
		  <entry>23</entry>
		</row>
		
		<row>
		  <entry>Rockwell</entry>
		  <entry>Reference modem with internal 16550 or an
		    emulation (RC144DPi/C3000-25)</entry>
		  <entry>117</entry>
		</row>
		
		<row>
		  <entry>Sierra</entry>
		  <entry>Modem with an internal 16550
		    (SC11951/SC11351)</entry>
		  <entry>91</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </informaltable>
	  
	  <note>
	    <para>To date, the author of this document has not found any
	      non-National parts that report zero differences using the
	      COMTEST program.  It should also be noted that National has had
	      five versions of the 16550 over the years and the newest parts
	      behave a bit differently than the classic NS16550AFN that is
	      considered the benchmark for functionality.  COMTEST appears to
	      turn a blind eye to the differences within the National product
	      line and reports no errors on the National parts (except for the
	      original 16550) even when there are official erratas that
	      describe bugs in the A, B and C revisions of the parts, so this
	      bias in COMTEST must be taken into account.</para>
	  </note>
	  
	  <para>It is important to understand that a simple count of
	    differences from COMTEST does not reveal a lot about what
	    differences are important and which are not.  For example, about
	    half of the differences reported in the two modems listed above
	    that have internal UARTs were caused by the clone UARTs not
	    supporting five- and six-bit character modes.  The real 16550,
	    16450, and 8250 UARTs all support these modes and COMTEST checks
	    the functionality of these modes so over fifty differences are
	    reported.  However, almost no modern modem supports five- or
	    six-bit characters, particularly those with error-correction and
	    compression capabilities.  This means that the differences related
	    to five- and six-bit character modes can be discounted.</para>
	      
	  <para>Many of the differences COMTEST reports have to do with
	    timing.  In many of the clone designs, when the host reads from
	    one port, the status bits in some other port may not update in the
	    same amount of time (some faster, some slower) as a
	    <emphasis>real</emphasis> NS16550AFN and COMTEST looks for these
	    differences.  This means that the number of differences can be
	    misleading in that one device may only have one or two differences
	    but they are extremely serious, and some other device that updates
	    the status registers faster or slower than the reference part
	    (that would probably never affect the operation of a properly
	    written driver) could have dozens of differences reported.</para>
	      
	  <para>COMTEST can be used as a screening tool to alert the
	    administrator to the presence of potentially incompatible
	    components that might cause problems or have to be handled as a
	    special case.</para>
	      
	  <para>If you run COMTEST on a 16550 that is in a modem or a modem is
	    attached to the serial port, you need to first issue a ATE0&amp;W
	    command to the modem so that the modem will not echo any of the
	    test characters.  If you forget to do this, COMTEST will report at
	    least this one difference:</para>

	  <screen>Error (6)...Timeout interrupt failed: IIR = c1  LSR = 61</screen>
	</sect4>

	<sect4>
	  <title>8250/16450/16550 Registers</title>
	  
	  <para>The 8250/16450/16550 UART occupies eight contiguous I/O port
	    addresses.  In the IBM PC, there are two defined locations for
	    these eight ports and they are known collectively as COM1 and
	    COM2.  The makers of PC-clones and add-on cards have created two
	    additional areas known as COM3 and COM4, but these extra COM ports
	    conflict with other hardware on some systems.  The most common
	    conflict is with video adapters that provide IBM 8514
	    emulation.</para>
	      
	  <para>COM1 is located from 0x3f8 to 0x3ff and normally uses IRQ 4
	    COM2 is located from 0x2f8 to 0x2ff and normally uses IRQ 3 COM3
	    is located from 0x3e8 to 0x3ef and has no standardized IRQ COM4 is
	    located from 0x2e8 to 0x2ef and has no standardized IRQ.</para>
	      
	  <para>A description of the I/O ports of the 8250/16450/16550 UART is
	    provided below.</para>

	  <informaltable frame="none">
	    <tgroup cols="3">
	      <thead>
		<row>
		  <entry>I/O Port</entry>
		  <entry>Access Allowed</entry>
		  <entry>Description</entry>
		</row>
	      </thead>
	      
	      <tbody>
		<row>
		  <entry>+0x00</entry>
		  <entry>write (DLAB==0)</entry>
		  <entry><para>Transmit Holding Register
		      (THR).</para><para>Information written to this port are
		      treated as data words and will be transmitted by the
		      UART.</para></entry>
		</row>
		
		<row>
		  <entry>+0x00</entry>
		  <entry>read (DLAB==0)</entry>
		  <entry><para>Receive Buffer Register (RBR).</para><para>Any
		      data words received by the UART form the serial link are
		      accessed by the host by reading this
		      port.</para></entry>
		</row>
		
		<row>
		  <entry>+0x00</entry>
		  <entry>write/read (DLAB==1)</entry>
		  <entry><para>Divisor Latch LSB (DLL)</para><para>This value
		      will be divided from the master input clock (in the IBM
		      PC, the master clock is 1.8432MHz) and the resulting
		      clock will determine the baud rate of the UART.  This
		      register holds bits 0 thru 7 of the
		      divisor.</para></entry>
		</row>
		
		<row>
		  <entry>+0x01</entry>
		  <entry>write/read (DLAB==1)</entry>
		  <entry><para>Divisor Latch MSB (DLH)</para><para>This value
		      will be divided from the master input clock (in the IBM
		      PC, the master clock is 1.8432MHz) and the resulting
		      clock will determine the baud rate of the UART.  This
		      register holds bits 8 thru 15 of the
		      divisor.</para></entry>
		</row>
		
		<row>
		  <entry>+0x01</entry>
		  <entry>write/read (DLAB==0)</entry>
		  <entrytbl cols="2">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <spanspec namest="col1" nameend="col2" spanname="1to2">

		    <tbody>
		      <row>
			<entry spanname="1to2"><para>Interrupt Enable Register
			    (IER)</para><para>The 8250/16450/16550 UART
			    classifies events into one of four categories.
			    Each category can be configured to generate an
			    interrupt when any of the events occurs.  The
			    8250/16450/16550 UART generates a single external
			    interrupt signal regardless of how many events in
			    the enabled categories have occurred.  It is up to
			    the host processor to respond to the interrupt and
			    then poll the enabled interrupt categories
			    (usually all categories have interrupts enabled)
			    to determine the true cause(s) of the
			    interrupt.</para></entry>
		      </row>
		      
		      <row>
			<entry>Bit 7</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry>Enable Modem Status Interrupt (EDSSI). Setting
			  this bit to "1" allows the UART to generate an
			  interrupt when a change occurs on one or more of the
			  status lines.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry>Enable Receiver Line Status Interrupt (ELSI)
			  Setting this bit to "1" causes the UART to generate
			  an interrupt when the an error (or a BREAK signal)
			  has been detected in the incoming data.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry>Enable Transmitter Holding Register Empty
			  Interrupt (ETBEI) Setting this bit to "1" causes the
			  UART to generate an interrupt when the UART has room
			  for one or more additional characters that are to be
			  transmitted.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry>Enable Received Data Available Interrupt
			  (ERBFI) Setting this bit to "1" causes the UART to
			  generate an interrupt when the UART has received
			  enough characters to exceed the trigger level of the
			  FIFO, or the FIFO timer has expired (stale data), or
			  a single character has been received when the FIFO
			  is disabled.</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x02</entry>
		  <entry>write</entry>
		  <entrytbl cols="4">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <colspec colnum="3" colname="col3">
		    <colspec colnum="4" colname="col4">
		    <spanspec namest="col1" nameend="col4" spanname="1to4">
		    <spanspec namest="col2" nameend="col4" spanname="2to4">
		    
		    <tbody>
		      <row>
			<entry spanname="1to4">FIFO Control Register (FCR)
			  (This port does not exist on the 8250 and 16450
			  UART.)</entry>
		      </row>

		      <row>
			<entry>Bit 7</entry>
			<entry spanname="2to4">Receiver Trigger Bit #1</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry spanname="2to4"><para>Receiver Trigger Bit
			    #0</para><para>These two bits control at what
			    point the receiver is to generate an interrupt
			    when the FIFO is active.</para></entry>
		      </row>
		      
		      <row>
			<entry colname="col2">7</entry>
			<entry colname="col3">6</entry>
			<entry colname="col4">How many words are received
			  before an interrupt is generated</entry>
		      </row>
			  
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4">1</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">4</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4">8</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">14</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry spanname="2to4">Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry spanname="2to4">Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry spanname="2to4">DMA Mode Select.  If Bit 0 is
			  set to "1" (FIFOs enabled), setting this bit changes
			  the operation of the -RXRDY and -TXRDY signals from
			  Mode 0 to Mode 1.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry spanname="2to4">Transmit FIFO Reset.  When a
			  "1" is written to this bit, the contents of the FIFO
			  are discarded.  Any word currently being transmitted
			  will be sent intact.  This function is useful in
			  aborting transfers.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry spanname="2to4">Receiver FIFO Reset.  When a
			  "1" is written to this bit, the contents of the FIFO
			  are discarded.  Any word currently being assembled
			  in the shift register will be received
			  intact.</entry>
		      </row>

		      <row>
			<entry>Bit 0</entry>
			<entry spanname="2to4">16550 FIFO Enable.  When set,
			  both the transmit and receive FIFOs are enabled.
			  Any contents in the holding register, shift
			  registers or FIFOs are lost when FIFOs are enabled
			  or disabled.</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x02</entry>
		  <entry>read</entry>
		  <entrytbl cols="6">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <colspec colnum="3" colname="col3">
		    <colspec colnum="4" colname="col4">
		    <colspec colnum="5" colname="col5">
		    <colspec colnum="6" colname="col6">
		    <spanspec namest="col1" nameend="col6" spanname="1to6">
		    <spanspec namest="col2" nameend="col6" spanname="2to6">

		    <tbody>
		      <row>
			<entry spanname="1to6">Interrupt Identification
			  Register</entry>
		      </row>

		      <row>
			<entry>Bit 7</entry>
			<entry spanname="2to6">FIFOs enabled.  On the
			  8250/16450 UART, this bit is zero.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry spanname="2to6">FIFOs enabled.  On the
			  8250/16450 UART, this bit is zero.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry spanname="2to6">Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry spanname="2to6">Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry spanname="2to6">Interrupt ID Bit #2.  On the
			  8250/16450 UART, this bit is zero.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry spanname="2to6">Interrupt ID Bit #1</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry spanname="2to6">Interrupt ID Bit #0.These three
			  bits combine to report the category of event that
			  caused the interrupt that is in progress.  These
			  categories have priorities, so if  multiple
			  categories of events occur at the same time, the
			  UART will report the more important events first and
			  the host must resolve the events in the order they
			  are reported.  All events that caused the current
			  interrupt must be resolved before any new interrupts
			  will be generated.  (This is a limitation of the PC
			  architecture.)</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">2</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">0</entry>
			<entry colname="col5">Priority</entry>
			<entry colname="col6">Description</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">1</entry>
			<entry colname="col5">First</entry>
			<entry colname="col6">Received Error (OE, PE, BI, or
			  FE)</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">0</entry>
			<entry colname="col5">Second</entry>
			<entry colname="col6">Received Data Available</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4">0</entry>
			<entry colname="col5">Second</entry>
			<entry colname="col6">Trigger level identification
			  (Stale data in receive buffer)</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4">1</entry>
			<entry colname="col5">Third</entry>
			<entry colname="col6">Transmitter has room for more
			  words (THRE)</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4">0</entry>
			<entry colname="col5">Fourth</entry>
			<entry colname="col6">Modem Status Change (-CTS, -DSR,
			  -RI, or -DCD)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry spanname="2to6">Interrupt Pending Bit.  If this
			  bit is set to "0", then at least one interrupt is
			  pending.</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x03</entry>
		  <entry>write/read</entry>
		  <entrytbl cols="5">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <colspec colnum="3" colname="col3">
		    <colspec colnum="4" colname="col4">
		    <colspec colnum="5" colname="col5">
		    <spanspec namest="col1" nameend="col5" spanname="1to5">
		    <spanspec namest="col2" nameend="col5" spanname="2to5">
		    <spanspec namest="col4" nameend="col5" spanname="4to5">

		    <tbody>
		      <row>
			<entry spanname="1to5">Line Control Register
			  (LCR)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 7</entry>
			<entry spanname="2to5">Divisor Latch Access Bit
			  (DLAB).  When set, access to the data
			  transmit/receive register (THR/RBR) and the
			  Interrupt Enable Register (IER) is disabled.  Any
			  access to these ports is now redirected to the
			  Divisor Latch Registers.  Setting this bit, loading
			  the Divisor Registers, and clearing DLAB should be
			  done with interrupts disabled.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry spanname="2to5">Set Break.  When set to "1",
			  the transmitter begins to transmit continuous
			  Spacing until this bit is set to "0".  This
			  overrides any bits of characters that are being
			  transmitted.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry spanname="2to5">Stick Parity.  When parity is
			  enabled, setting this bit causes parity to always be
			  "1" or "0", based on the value of Bit 4.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry spanname="2to5">Even Parity Select (EPS). When
			  parity is enabled and Bit 5 is "0", setting this bit
			  causes even parity to be transmitted and expected.
			  Otherwise, odd parity is used.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry spanname="2to5">Parity Enable (PEN).  When set
			  to "1", a parity bit is inserted between the last
			  bit of the data and the Stop Bit.  The UART will
			  also expect parity to be present in the received
			  data.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry spanname="2to5">Number of Stop Bits (STB). If
			  set to "1" and using 5-bit data words, 1.5 Stop Bits
			  are transmitted and expected in each data word.  For
			  6, 7 and 8-bit data words, 2 Stop Bits are
			  transmitted and expected.  When this bit is set to
			  "0", one Stop Bit is used on each data word.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry spanname="2to5">Word Length Select Bit #1
			  (WLSB1)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry spanname="2to5">Word Length Select Bit #0
			  (WLSB0)</entry>
		      </row>
		      
		      <row>
			<entry colname="col2" spanname="2to5">Together these
			  bits specify the number of bits in each data
			  word.</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4" spanname="4to5">Word
			  Length</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4" spanname="4to5">5 Data
			  Bits</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">0</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4" spanname="4to5">6 Data
			  Bits</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">0</entry>
			<entry colname="col4" spanname="4to5">7 Data
			  Bits</entry>
		      </row>
		      
		      <row>
			<entry colname="col2">1</entry>
			<entry colname="col3">1</entry>
			<entry colname="col4" spanname="4to5">8 Data
			  Bits</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x04</entry>
		  <entry>write/read</entry>
		  <entrytbl cols="2">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <spanspec namest="col1" nameend="col2" spanname="1to2">

		    <tbody>
		      <row>
			<entry spanname="1to2">Modem Control Register
			  (MCR)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 7</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry>Reserved, always 0.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry>Reserved, always 0.</entry>
			  </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry>Loop-Back Enable.  When set to "1", the UART
			  transmitter and receiver are internally connected
			  together to allow diagnostic operations.  In
			  addition, the UART modem control outputs are
			  connected to the UART modem  control inputs.  CTS is
			  connected to RTS, DTR is connected to DSR, OUT1 is
			  connected to RI, and OUT 2 is connected to
			  DCD.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry>OUT 2.  An auxiliary output that the host
			  processor may set high or low.  In the IBM PC serial
			  adapter (and most clones), OUT 2 is used to
			  tri-state (disable) the interrupt signal from the
			  8250/16450/16550 UART.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry>OUT 1.  An auxiliary output that the host
			  processor may set high or low.  This output is not
			  used on the IBM PC serial adapter.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry>Request to Send (RTS).  When set to "1", the
			  output of the UART -RTS line is Low
			  (Active).</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry>Data Terminal Ready (DTR).  When set to "1",
			  the output of the UART -DTR line is Low
			  (Active).</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x05</entry>
		  <entry>write/read</entry>
		  <entrytbl cols="2">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <spanspec namest="col1" nameend="col2" spanname="1to2">

		    <tbody>
		      <row>
			<entry spanname="1to2">Line Status Register
			  (LSR)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 7</entry>
			<entry>Error in Receiver FIFO.  On the 8250/16450
			  UART, this bit is zero.  This bit is set to "1" when
			  any of the bytes in the FIFO have one or more of the
			  following error conditions: PE, FE, or BI.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry>Transmitter Empty (TEMT).  When set to "1",
			  there are no words  remaining in the transmit FIFO
			  or the transmit shift register.  The transmitter is
			  completely idle.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry>Transmitter Holding Register Empty (THRE).
			  When set to "1", the FIFO (or holding register) now
			  has room for at least one additional word to
			  transmit.  The transmitter may still be transmitting
			  when this bit is set to "1".</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry>Break Interrupt (BI).  The receiver has
			  detected a Break signal.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry>Framing Error (FE).  A Start Bit was detected
			  but the Stop Bit did not appear at the expected
			  time.  The received word is probably
			  garbled.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry>Parity Error (PE).  The parity bit was
			  incorrect for the word received.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry>Overrun Error (OE).  A new word was received
			  and there was no room in the receive buffer.  The
			  newly-arrived word in the shift register is
			  discarded.  On 8250/16450 UARTs, the word in the
			  holding register is discarded and the newly- arrived
			  word is put in the holding register.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry>Data Ready (DR) One or more words are in the
			  receive FIFO that the host may read.  A word must be
			  completely received and moved from the shift
			  register into the FIFO (or holding register for
			  8250/16450 designs) before this bit is set.</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x06</entry>
		  <entry>write/read</entry>
		  <entrytbl cols="2">
		    <colspec colnum="1" colname="col1">
		    <colspec colnum="2" colname="col2">
		    <spanspec namest="col1" nameend="col2" spanname="1to2">

		    <tbody>
		      <row>
			<entry spanname="1to2">Modem Status Register
			  (MSR)</entry>
		      </row>
		      
		      <row>
			<entry>Bit 7</entry>
			<entry>Data Carrier Detect (DCD).  Reflects the state
			  of the DCD line on the UART.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 6</entry>
			<entry>Ring Indicator (RI).  Reflects the state of the
			  RI line on the UART.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 5</entry>
			<entry>Data Set Ready (DSR).  Reflects the state of
			  the DSR line on the UART.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 4</entry>
			<entry>Clear To Send (CTS).  Reflects the state of the
			  CTS line on the UART.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 3</entry>
			<entry>Delta Data Carrier Detect (DDCD).  Set to "1"
			  if the -DCD line has changed state one more more
			  times since the last time the MSR was read by the
			  host.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 2</entry>
			<entry>Trailing Edge Ring Indicator (TERI).  Set to
			  "1" if the -RI line has had a low to high transition
			  since the last time the MSR was read by the
			  host.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 1</entry>
			<entry>Delta Data Set Ready (DDSR).  Set to "1" if the
			  -DSR line has changed state one more more times
			  since the last time the MSR was read by the
			  host.</entry>
		      </row>
		      
		      <row>
			<entry>Bit 0</entry>
			<entry>Delta Clear To Send (DCTS).  Set to "1" if the
			  -CTS line has changed state one more more times
			  since the last time the MSR was read by the
			  host.</entry>
		      </row>
		    </tbody>
		  </entrytbl>
		</row>
		
		<row>
		  <entry>+0x07</entry>
		  <entry>write/read</entry>
		  <entry>Scratch Register (SCR).  This register performs no
		    function in the UART.  Any value can be written by the
		    host to this location and read by the host later
		    on.</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </informaltable>
	</sect4>

	<sect4>
	  <title>Beyond the 16550A UART</title>
	  
	  <para>Although National Semiconductor has not offered any components
	    compatible with the 16550 that provide additional features,
	    various other vendors have.  Some of these components are
	    described below.  It should be understood that to effectively
	    utilize these improvements, drivers may have to be provided by the
	    chip vendor since most of the popular operating systems do not
	    support features beyond those provided by the 16550.</para>
	      
	  <variablelist>
	    <varlistentry>
	      <term>ST16650</term>

	      <listitem>
		<para>By default this part is similar to the NS16550A, but an
		  extended 32-byte send and receive buffer can be optionally
		  enabled.  Made by Startech.</para>
	      </listitem>
	    </varlistentry>
	    
	    <varlistentry>
	      <term>TIL16660</term>
	      
	      <listitem>
		<para>By default this part behaves similar to the NS16550A,
		  but an extended 64-byte send and receive buffer can be
		  optionally enabled.  Made by Texas Instruments.</para>
	      </listitem>
	    </varlistentry>
	    
	    <varlistentry>
	      <term>Hayes ESP</term>
	      
	      <listitem>
		<para>This proprietary plug-in card contains a 2048-byte send
		  and receive buffer, and supports data rates to
		  230.4Kbit/sec.  Made by Hayes.</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	  
	  <para>In addition to these <quote>dumb</quote> UARTs, many vendors
	    produce intelligent serial communication boards.  This type of
	    design usually provides a microprocessor that interfaces with
	    several UARTs, processes and buffers the data, and then alerts the
	    main PC processor when necessary.  Because the UARTs are not
	    directly accessed by the PC processor in this type of
	    communication system, it is not necessary for the vendor to use
	    UARTs that are compatible with the 8250, 16450, or the 16550 UART.
	    This leaves the designer free to components that may have better
	    performance characteristics.</para>
	</sect4>
      </sect3>
      
      <sect3 id="sio">
	<title>Configuring the <devicename>sio</devicename> driver</title>
	    
	<para>The <devicename>sio</devicename> driver provides support for
	  NS8250-, NS16450-, NS16550 and NS16550A-based EIA RS-232C (CCITT
	  V.24) communications interfaces.  Several multiport cards are
	  supported as well.  See the &man.sio.4;
	  manual page for detailed technical documentation.</para>
	    
	<sect4>
	  <title>Digi International (DigiBoard) PC/8</title>
	  
	  <para><emphasis>Contributed by &a.awebster;.  26 August
	      1995.</emphasis></para>
	      
	  <para>Here is a config snippet from a machine with a Digi
	    International PC/8 with 16550.  It has 8 modems connected to these
	    8 lines, and they work just great.  Do not forget to add
	    <literal>options COM_MULTIPORT</literal> or it will not work very
	    well!</para>
	      
	  <programlisting>
device          sio4    at isa? port 0x100 tty flags 0xb05
device          sio5    at isa? port 0x108 tty flags 0xb05
device          sio6    at isa? port 0x110 tty flags 0xb05
device          sio7    at isa? port 0x118 tty flags 0xb05
device          sio8    at isa? port 0x120 tty flags 0xb05
device          sio9    at isa? port 0x128 tty flags 0xb05
device          sio10   at isa? port 0x130 tty flags 0xb05
device          sio11   at isa? port 0x138 tty flags 0xb05 irq 9 vector siointr</programlisting>
	      
	  <para>The trick in setting this up is that the MSB of the flags
	    represent the last SIO port, in this case 11 so flags are
	    0xb05.</para>
	</sect4>

	<sect4>
	  <title>Boca 16</title>
	  
	  <para><emphasis>Contributed by &a.whiteside;.  26 August
	      1995.</emphasis></para>
	  
	  <para>The procedures to make a Boca 16 port board with FreeBSD are
	    pretty straightforward, but you will need a couple things to make
	    it work:</para>
	  
	  <orderedlist>
	    <listitem>
	      <para>You either need the kernel sources installed so you can
		recompile the necessary options or you will need someone else
		to compile it for you.  The 2.0.5 default kernel does
		<emphasis>not</emphasis> come with multiport support enabled
		and you will need to add a device entry for each port
		anyways.</para>
	    </listitem>
	    
	    <listitem>
	      <para>Two, you will need to know the interrupt and IO setting
		for your Boca Board so you can set these options properly in
		the kernel.</para>
	    </listitem>
	  </orderedlist>
	  
	  <para>One important note &mdash; the actual UART chips for the Boca
	    16 are in the connector box, not on the internal board itself.  So
	    if you have it unplugged, probes of those ports will fail.  I have
	    never tested booting with the box unplugged and plugging it back
	    in, and I suggest you do not either.</para>
	      
	  <para>If you do not already have a custom kernel configuration file
	    set up, refer to <link linkend="kernelconfig">Kernel
	      Configuration</link> for general procedures.  The following are
	    the specifics for the Boca 16 board and assume you are using the
	    kernel name MYKERNEL and editing with vi.</para>
	      
	  <procedure>
	    <step>
	      <para>Add the line 
		
		<programlisting>
options COM_MULTIPORT</programlisting>

		to the config file.</para>
	    </step>
	    
	    <step>
	      <para>Where the current <literal>device
		  sio<replaceable>n</replaceable></literal> lines are, you
		will need to add 16 more devices.  Only the last device
		includes the interrupt vector for the board.  (See the
		  &man.sio.4; manual page for detail as
		to why.)  The following example is for a Boca Board with an
		interrupt of 3, and a base IO address 100h.  The IO address
		for Each port is +8 hexadecimal from the previous port, thus
		the 100h, 108h, 110h...  addresses.</para>

	      <programlisting>
device sio1 at isa? port 0x100 tty flags 0x1005
device sio2 at isa? port 0x108 tty flags 0x1005
device sio3 at isa? port 0x110 tty flags 0x1005
device sio4 at isa? port 0x118 tty flags 0x1005
&hellip;
device sio15 at isa? port 0x170 tty flags 0x1005
device sio16 at isa? port 0x178 tty flags 0x1005 irq 3 vector siointr</programlisting>

	      <para>The flags entry <emphasis>must</emphasis> be changed from
		this example unless you are using the exact same sio
		assignments. Flags are set according to
		0x<replaceable>M</replaceable><replaceable>YY</replaceable>
		where <replaceable>M</replaceable> indicates the minor number
		of the master port (the last port on a Boca 16) and
		<replaceable>YY</replaceable> indicates if FIFO is enabled or
		disabled(enabled), IRQ sharing is used(yes) and if there is an
		AST/4 compatible IRQ control register(no).  In this example,
		<programlisting> flags 0x1005</programlisting> indicates that
		the master port is sio16.  If I added another board and
		assigned sio17 through sio28, the flags for all 16 ports on
		<emphasis>that</emphasis> board would be 0x1C05, where 1C
		indicates the minor number of the master port.  Do not change
		the 05 setting.</para>
		</step>
		  
	    <step>
	      <para>Save and complete the kernel configuration, recompile,
		install and reboot.  Presuming you have successfully installed
		the recompiled kernel and have it set to the correct address
		and IRQ, your boot message should indicate the successful
		probe of the Boca ports as follows: (obviously the sio
		numbers, IO and IRQ could be different)</para>
		    		    
	      <screen>sio1 at 0x100-0x107 flags 0x1005 on isa
sio1: type 16550A (multiport)
sio2 at 0x108-0x10f flags 0x1005 on isa
sio2: type 16550A (multiport)
sio3 at 0x110-0x117 flags 0x1005 on isa
sio3: type 16550A (multiport)
sio4 at 0x118-0x11f flags 0x1005 on isa
sio4: type 16550A (multiport)
sio5 at 0x120-0x127 flags 0x1005 on isa
sio5: type 16550A (multiport)
sio6 at 0x128-0x12f flags 0x1005 on isa
sio6: type 16550A (multiport)
sio7 at 0x130-0x137 flags 0x1005 on isa
sio7: type 16550A (multiport)
sio8 at 0x138-0x13f flags 0x1005 on isa
sio8: type 16550A (multiport)
sio9 at 0x140-0x147 flags 0x1005 on isa
sio9: type 16550A (multiport)
sio10 at 0x148-0x14f flags 0x1005 on isa
sio10: type 16550A (multiport)
sio11 at 0x150-0x157 flags 0x1005 on isa
sio11: type 16550A (multiport)
sio12 at 0x158-0x15f flags 0x1005 on isa
sio12: type 16550A (multiport)
sio13 at 0x160-0x167 flags 0x1005 on isa
sio13: type 16550A (multiport)
sio14 at 0x168-0x16f flags 0x1005 on isa
sio14: type 16550A (multiport)
sio15 at 0x170-0x177 flags 0x1005 on isa
sio15: type 16550A (multiport)
sio16 at 0x178-0x17f irq 3 flags 0x1005 on isa
sio16: type 16550A (multiport master)</screen>

	      <para>If the messages go by too fast to see,

		<screen>&prompt.root; <userinput>dmesg | more</userinput></screen>
		will show you the boot messages.</para>
	    </step>
	    
	    <step>
	      <para>Next, appropriate entries in <filename>/dev</filename> for
		the devices must be made using the
		<filename>/dev/MAKEDEV</filename> script. After becoming
		root:</para>
	      
	      <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>./MAKEDEV tty1</userinput>
&prompt.root; <userinput>./MAKEDEV cua1</userinput>
<emphasis>(everything in between)</emphasis>
&prompt.root; <userinput>./MAKEDEV ttyg</userinput>
&prompt.root; <userinput>./MAKEDEV cuag</userinput></screen>
		      
	      <para>If you do not want or need callout devices for some
		reason, you can dispense with making the
		<filename>cua*</filename> devices.</para>
	    </step>
	    
	    <step>
	      <para>If you want a quick and sloppy way to make sure the
		devices are working, you can simply plug a modem into each
		port and (as root)
		    
		<screen>&prompt.root; <userinput>echo at &gt; ttyd*</userinput></screen>
		for each device you have made.  You
		<emphasis>should</emphasis> see the RX lights flash for each
		working port.</para>
	    </step>
	  </procedure>
	</sect4>

	<sect4>
	  <title>Support for Cheap Multi-UART Cards</title>

	  <para><emphasis>Contributed by Helge Oldach
	    <email>hmo@sep.hamburg.com</email>, September
	      1999</emphasis></para>
	  
	  <para>Ever wondered about FreeBSD support for your 20$ multi-I/O
	    card with two (or more) COM ports, sharing IRQs? Here's
	    how:</para>
	  
	  <para>Usually the only option to support these kind of boards is to
	    use a distinct IRQ for each port.  For example, if your CPU board
	    has an on-board <devicename>COM1</devicename> port (aka
	    <devicename>sio0</devicename>&ndash;I/O address 0x3F8 and IRQ 4)
	    and you have an extension board with two UARTs, you will commonly
	    need to configure them as <devicename>COM2</devicename> (aka
	    <devicename>sio1</devicename>&ndash;I/O address 0x2F8 and IRQ 3),
	    and the third port (aka <devicename>sio2</devicename>) as I/O
	    0x3E8 and IRQ 5.  Obviously this is a waste of IRQ ressources, as
	    it should be basically possible to run both extension board ports
	    using a single IRQ with the <literal>COM_MULTIPORT</literal>
	    configuration described in the previous sections.</para>
	  
	  <para>Such cheap I/O boards commonly have a 4 by 3 jumper matrix for
	    the COM ports, similar to the following:</para>

<programlisting>            o  o  o  *
Port A               |
            o  *  o  *
Port B         |
            o  *  o  o
IRQ         2  3  4  5</programlisting>

	  <para>Shown here is port A wired for IRQ 5 and port B wired for IRQ
	    3.  The IRQ columns on your specific board may vary&mdash;other
	    boards may supply jumpers for IRQs 3, 4, 5, and 7 instead.</para>

	  <para>One could conclude that wiring both ports for IRQ 3 using a
	    handcrafted wire-made jumper covering all three connection points
	    in the IRQ 3 column would solve the issue, but no.  You cannot
	    duplicate IRQ 3 because the output drivers of each UART are wired
	    in a <quote>totem pole</quote> fashion, so if one of the UARTs
	    drives IRQ 3, the output signal will not be what you would expect.
	    Depending on the implementation of the extension board or your
	    motherboard, the IRQ 3 line will continuously stay up, or always
	    stay low.</para>

	  <para>You need to decouple the IRQ drivers for the two UARTs, so
	    that the IRQ line of the board only goes up if (and only if) one
	    of the UARTs asserts a IRQ, and stays low otherwise.  The solution
	    was proposed by Jrg Wunsch
	    <email>j@ida.interface-business.de</email>: To solder up a
	    wired-or consisting of two diodes (Germanium or Schottky-types
	    strongly preferred) and a 1 kOhm resistor.  Here is the schematic,
	    starting from the 4 by 3 jumper field above:</para>

<programlisting>                          Diode
                +---------->|-------+
               /                    |
            o  *  o  o              |     1 kOhm
Port A                              +----|######|-------+
            o  *  o  o              |                   |
Port B          `-------------------+                 ==+==
            o  *  o  o              |                 Ground
                \                   |
                 +--------->|-------+
IRQ         2  3  4  5    Diode</programlisting>

	  <para>The cathodes of the diodes are connected to a common point,
	    together with a 1 kOhm pull-down resistor.  It is essential to
	    connect the resistor to ground to avoid floating of the IRQ line
	    on the bus.</para>

	  <para>Now we are ready to configure a kernel.  Staying with this
	    example, we would configure:</para>

	  <programlisting># standard on-board COM1 port
device          sio0    at isa? port "IO_COM1" tty flags 0x10
# patched-up multi-I/O extension board
options         COM_MULTIPORT
device          sio1    at isa? port "IO_COM2" tty flags 0x205
device          sio2    at isa? port "IO_COM3" tty flags 0x205 irq 3</programlisting>

	  <para>Note that the <literal>flags</literal> setting for
	    <devicename>sio1</devicename> and <devicename>sio2</devicename> is
	    truely essential; refer to
	      &man.sio.4; for details. (Generally, the <literal>2</literal> in
	    the "flags" attribute refers to <devicename>sio</devicename>2
	    which holds the IRQ, and you surely want a <literal>5</literal>
	    low nibble.)  With kernel verbose mode turned on this should yield
	    something similar to this:</para>

	  <screen>sio0: irq maps: 0x1 0x11 0x1 0x1
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1: irq maps: 0x1 0x9 0x1 0x1
sio1 at 0x2f8-0x2ff flags 0x205 on isa
sio1: type 16550A (multiport)
sio2: irq maps: 0x1 0x9 0x1 0x1
sio2 at 0x3e8-0x3ef irq 3 flags 0x205 on isa
sio2: type 16550A (multiport master)</screen>

	  <para>Though <filename>/sys/i386/isa/sio.c</filename> is somewhat
	    cryptic with its use of the <quote>irq maps</quote> array above,
	    the basic idea is that you observe <literal>0x1</literal> in the
	    first, third, and fourth place.  This means that the corresponding
	    IRQ was set upon output and cleared after, which is just what we
	    would expect. If your kernel does not display this behaviour, most
	    likely there is something wrong with your wiring.</para>
	</sect4>
      </sect3>
      
      <sect3 id="cy">
	<title>Configuring the <devicename>cy</devicename> driver</title>
	    
	<para><emphasis>Contributed by &a.alex;.  6 June
	    1996.</emphasis></para>
	    
	<para>The Cyclades multiport cards are based on the
	  <devicename>cy</devicename> driver instead of the usual
	  <devicename>sio</devicename> driver used by other multiport cards.
	  Configuration is a simple matter of:</para>

	<procedure>
	  <step>
	    <para>Add the <devicename>cy</devicename> device to your <link
		linkend="kernelconfig-config">kernel configuration</link>
	      (note that your irq and iomem settings may differ).</para>
		    
	    <programlisting>
device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr</programlisting>
	  </step>
		
	  <step>
	    <para><link linkend="kernelconfig-building">Rebuild and
		install</link>  the new kernel.</para>
	  </step>
	  
	  <step>
	    <para>Make the <link linkend="kernelconfig-nodes">device
		nodes</link> by typing (the following example assumes an
	      8-port board):</para>
		  
	    <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>for i in 0 1 2 3 4 5 6 7;do ./MAKEDEV cuac$i ttyc$i;done</userinput></screen>
	  </step>
	  
	  <step>
	    <para>If appropriate, add <link linkend="dialup">dialup</link>
	      entries to <link linkend="dialup-ttys">/etc/ttys</link> by
	      duplicating serial device (<literal>ttyd</literal>) entries and
	      using <literal>ttyc</literal> in place of
	      <literal>ttyd</literal>.  For example:</para>
	    
	    <programlisting>
ttyc0   "/usr/libexec/getty std.38400"  unknown on insecure
ttyc1   "/usr/libexec/getty std.38400"  unknown on insecure
ttyc2   "/usr/libexec/getty std.38400"  unknown on insecure
&hellip;
ttyc7   "/usr/libexec/getty std.38400"  unknown on insecure</programlisting>
	  </step>
		
	  <step>
	    <para>Reboot with the new kernel.</para>
	  </step>
	</procedure>
      </sect3>

      <sect3>
	<title>Configuring the <devicename>si</devicename> driver</title>

	<para><emphasis>Contributed by &a.nsayer;. 25 March
	    1998.</emphasis></para>
     
	<para>The Specialix SI/XIO and SX multiport cards use the
	  <devicename>si</devicename> driver. A single machine can
	  have up to 4 host cards. The following host cards
	  are supported:</para>

	<itemizedlist>
	  <listitem><para>ISA SI/XIO host card (2 versions)</para></listitem>
	  <listitem><para>EISA SI/XIO host card</para></listitem>
	  <listitem><para>PCI SI/XIO host card</para></listitem>
	  <listitem><para>ISA SX host card</para></listitem>
	  <listitem><para>PCI SX host card</para></listitem>
	</itemizedlist>

	<para>Although the SX and SI/XIO host cards look markedly different,
	  their functionality are basically the same. The host cards do not
	  use I/O locations, but instead require a 32K chunk of memory. The
	  factory configuration for ISA cards places this at
	  <literal>0xd0000-0xd7fff</literal>.
	  They also require an IRQ. PCI cards will, of course, autoconfigure
	  themselves.</para>

	<para>You can attach up to 4 external modules to each host card. The
	  external modules contain either 4 or 8 serial ports. They come in
	  the following varieties:</para>

	<itemizedlist>
	  <listitem><para>SI 4 or 8 port modules. Up to 57600 bps on each port
	      supported.</para></listitem>
	  
	  <listitem><para>XIO 8 port modules. Up to 115200 bps on each port
	      supported. One type of XIO module has 7 serial and 1 parallel
	      port.</para></listitem>
	  
	  <listitem><para>SXDC 8 port modules. Up to 921600 bps on each port
	      supported. Like XIO, a module is available with one parallel
	      port as well.</para></listitem>
	</itemizedlist>

	<para>To configure an ISA host card, add the following line to your
	  <link linkend="kernelconfig-config">kernel configuration
	    file</link>, changing the numbers as appropriate:</para>
     
	<programlisting>
device si0 at isa? tty iomem 0xd0000 irq 11</programlisting>

	<para>Valid IRQ numbers are 9, 10, 11, 12 and 15 for SX ISA host cards
	  and 11, 12 and 15 for SI/XIO ISA host cards.</para>
     
	<para>To configure an EISA or PCI host card, use this line:</para>
     
	<programlisting>
device si0</programlisting>

	<para>After adding the configuration entry, <link
	    linkend="kernelconfig-building"> rebuild and install</link>  your
	  new kernel.</para>
     
	<para>After rebooting with the new kernel, you need to make the <link
	    linkend="kernelconfig-nodes"> device nodes</link> in /dev. The
	  <filename>MAKEDEV</filename> script will take care of this for you.
	  Count how many total ports you have and type:</para>
     
	<screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>./MAKEDEV ttyA<replaceable>nn</replaceable> cuaA<replaceable>nn</replaceable></userinput></screen>
     
	<para>(where <replaceable>nn</replaceable> is the number of
	  ports)</para>
     
	<para>If you want login prompts to appear on these ports, you will
	  need to add lines like this to <link
	    linkend="dialup"><filename>/etc/ttys</filename></link>:</para>

	<programlisting>
ttyA01  "/usr/libexec/getty std.9600"   vt100   on insecure
	</programlisting>
     
	<para>Change the terminal type as appropriate. For modems,
	  <userinput>dialup</userinput> or <userinput>unknown</userinput> is
	  fine.</para>
      </sect3>
    </sect2>
    
    <sect2>
      <title>* Parallel ports</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>* Modems</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>* Network cards</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>* Keyboards</title>
      
      <para></para>
    </sect2>
    
    <sect2>
      <title>Mice</title>
	
      <para><emphasis>Contributed by Joel Sutton
  	  <email>jsutton@bbcon.com.au</email> January 2000</emphasis></para>

      <para>FreeBSD supports a variety of different mice via the PS/2, serial
	and USB ports.  Most users choose to use the mouse daemon to handle
	their mouse because it allows interaction in both X and on the system
	console.  For more information on the mouse daemon refer to
	  &man.moused.8;.  The examples throughout this section assume that
	the mouse daemon is being used.</para>
      
      <note>
        <para>This section contains the names of specific products that the
	  author has confirmed will work with FreeBSD. Other similar devices
	  not listed may also be supported.</para>
      </note>

      <sect3>
        <title>PS/2</title>
	
        <sect4>
          <title>System Configuration</title>

	  <para>To ensure that your PS/2 mouse functions correctly with the
	    mouse daemon you will need to include the following text in
	    <filename>/etc/rc.conf</filename></para>

          <programlisting>moused_enable="YES"
moused_type="ps/2"
moused_port="/dev/psm0"</programlisting>
        </sect4>

        <sect4>
          <title>Known Compatible Devices</title>
	  
          <itemizedlist>
            <listitem>
              <para>Logitech First Mouse - Three Button</para>
            </listitem>
	    
            <listitem>
              <para>Microsoft Serial - PS/2 Compatible Mouse</para>
            </listitem>
          </itemizedlist>
        </sect4>
      </sect3>

      <sect3>
        <title>Serial</title>

        <sect4>
          <title>System Configuration</title>

	  <para>To ensure that your serial mouse functions correctly with the
	    mouse daemon you will need to include the following text in
	    <filename>/etc/rc.conf</filename>.  This example assumes that the
	    mouse is connected to <devicename>COM1:</devicename> and can be
	    automatically recognised by the mouse daemon.</para>

          <programlisting>moused_enable="YES"
moused_type="auto"
moused_port="/dev/cuaa0"</programlisting>

          <para>See the &man.moused.8; manual page for a detailed description
	    of how to configure the mouse daemon to work with specific types
	    of serial mice.</para>
        </sect4>

        <sect4>
          <title>Known Compatible Devices</title>
	  
          <itemizedlist>
            <listitem>
              <para>Generic Microsoft Compatible Mice</para>
            </listitem>

            <listitem>
              <para>Logitech First Mouse - Three Button</para>
            </listitem>

            <listitem>
              <para>Microsoft Serial - PS/2 Compatible Mouse</para>
            </listitem>
          </itemizedlist>
        </sect4>
      </sect3>

      <sect3>
        <title>USB</title>
	
        <sect4>
          <title>System Configuration</title>
	  
          <para>The USB device drivers are a relatively new addition to
	    FreeBSD and have not yet been included in the GENERIC kernel.  The
	    following prodecure is an example of how to setup the relevant
	    drivers on a typical system.</para>

          <procedure>
            <step>
       	      <para>Add the <devicename>ums</devicename> device to the usb
		section of your <link linkend="kernelconfig-config">kernel
		  configuration</link>.  For example:
       	      </para>
       		
	      <programlisting>controller usb0 controller uhci0 device ums0</programlisting>
	    </step>
       		
	    <step>
	      <para><link linkend="kernelconfig-building">Rebuild and
		  install</link> the new kernel.</para>
	    </step>
	    
       	    <step>
       	      <para>Make the <link linkend="kernelconfig-nodes">device
		  node</link> by typing:</para>

	      <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV ums0</userinput></screen>
	    </step>

	    <step>
	      <para>Include the following text in
		<filename>/etc/rc.conf</filename> to ensure correct operation
		of the mouse daemon:</para>
	      
	      <programlisting>moused_enable="YES"
moused_type="auto"
moused_port="/dev/ums0"</programlisting>
            </step>
	    
            <step>
              <para>Reboot the system.</para>
	      <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
            </step>
          </procedure>
        </sect4>

        <sect4>
          <title>Known Compatible Devices</title>

          <itemizedlist>
            <listitem>
              <para>Logitech TrackMan - Marble Wheel</para>
            </listitem>
          </itemizedlist>
        </sect4>
      </sect3>
    </sect2>

<![ %not.published; [

    <sect2>
      <title>* Other</title>
      
      <para></para>
    </sect2>
  </sect1>

]]>
  
  <sect1 id="hw-storage">
    <title>Storage Devices</title>
        
    <sect2 id="esdi">
      <title>Using ESDI hard disks</title>
      
      <para><emphasis>Copyright &copy; 1995, &a.wilko;.  24
	  September 1995.</emphasis></para>
	  
      <para>ESDI is an acronym that means Enhanced Small Device Interface. It
	is loosely based on the good old ST506/412 interface originally
	devised by Seagate Technology, the makers of the first affordable
	5.25" winchester disk.</para>
	  
      <para>The acronym says Enhanced, and rightly so.  In the first place the
	speed of the interface is higher, 10 or 15 Mbits/second instead of the
	5 Mbits/second of ST412 interfaced drives.  Secondly some higher level
	commands are added, making the ESDI interface somewhat 'smarter' to
	the operating system driver writers.  It is by no means as smart as
	SCSI by the way.  ESDI is standardized by ANSI.</para>
	  
      <para>Capacities of the drives are boosted by putting more sectors on
	each track.  Typical is 35 sectors per track, high capacity drives I
	have seen were up to 54 sectors/track.</para>
      
      <para>Although ESDI has been largely obsoleted by IDE and SCSI
	interfaces, the availability of free or cheap surplus drives makes
	them  ideal for low (or now) budget systems.</para>
      
      <sect3>
	<title>Concepts of ESDI</title>

	<sect4>
	  <title>Physical connections</title>
	  
	  <para>The ESDI interface uses two cables connected to each drive.
	    One cable is a 34 pin flat cable edge connector that carries the
	    command and status signals from the controller to the drive and
	    vice-versa.  The command cable is daisy chained between all the
	    drives.  So, it forms a bus onto which all drives are
	    connected.</para>
	      
	  <para>The second cable is a 20 pin flat cable edge connector that
	    carries the data to and from the drive.  This cable is radially
	    connected, so each drive has its own direct connection to the
	    controller.</para>
	      
	  <para>To the best of my knowledge PC ESDI controllers are limited to
	    using a maximum of 2 drives per controller.  This is compatibility
	    feature(?) left over from the WD1003 standard that reserves only a
	    single bit for device addressing.</para>
	</sect4>

	<sect4>
	  <title>Device addressing</title>
	  
	  <para>On each command cable a maximum of 7 devices and 1 controller
	    can be present.  To enable the controller to uniquely  identify
	    which drive it addresses, each ESDI device is equipped with
	    jumpers or switches to select the devices address.</para>
	      
	  <para>On PC type controllers the first drive is set to address 0,
	    the second disk to address 1.  <emphasis>Always make
	      sure</emphasis> you set each disk to an unique address! So, on a
	    PC with its two drives/controller maximum the first drive is drive
	    0, the second is drive 1.</para>
	</sect4>

	<sect4>
	  <title>Termination</title>
	  
	  <para>The daisy chained command cable (the 34 pin cable remember?)
	    needs to be terminated at the last drive on the chain.  For this
	    purpose ESDI drives come with a termination resistor network that
	    can be removed or disabled by a jumper when it is not used.</para>
	  
	  <para>So, one and <emphasis>only</emphasis> one drive, the one at
	    the farthest end of the command cable has its terminator
	    installed/enabled.  The controller automatically terminates the
	    other end of the cable.  Please note that this implies that the
	    controller must be  at one end of the cable and
	    <emphasis>not</emphasis> in the middle.</para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>Using ESDI disks with FreeBSD</title>

	<para>Why is ESDI such a pain to get working in the first
	  place?</para>

	<para>People who tried ESDI disks with FreeBSD are known to have
	  developed a profound sense of frustration.  A combination of factors
	  works against you to produce effects that are hard to understand
	  when you have never seen them before.</para>
	    
	<para>This has also led to the popular legend ESDI and FreeBSD is a
	  plain NO-GO.  The following sections try to list all the pitfalls
	  and  solutions.</para>
	    
	<sect4>
	  <title>ESDI speed variants</title>
	  
	  <para>As briefly mentioned before, ESDI comes in two speed flavors.
	    The older drives and controllers use a 10 Mbits/second data
	    transfer rate.  Newer stuff uses 15 Mbits/second.</para>
	      
	  <para>It is not hard to imagine that 15 Mbits/second drive cause
	    problems on controllers laid out for 10 Mbits/second.  As always,
	    consult your controller <emphasis>and</emphasis> drive
	    documentation to see if things match.</para>
	</sect4>

	<sect4>
	  <title>Stay on track</title>
	  
	  <para>Mainstream ESDI drives use 34 to 36 sectors per track. Most
	    (older) controllers cannot handle more than this  number of
	    sectors.  Newer, higher capacity, drives use higher numbers of
	    sectors per track.  For instance, I own a 670 Mb drive that has 54
	    sectors per track.</para>
	      
	  <para>In my case, the controller could not handle this number of
	    sectors.  It proved to work well except that it only used 35
	    sectors on each track.  This meant losing a lot of disk
	    space.</para>
	      
	  <para>Once again, check the documentation of your hardware for more
	    info.  Going out-of-spec like in the example might or might not
	    work.  Give it a try or get another more capable
	    controller.</para>
	</sect4>

	<sect4>
	  <title>Hard or soft sectoring</title>
	  
	  <para>Most ESDI drives allow hard or soft sectoring to be selected
	    using a jumper.  Hard sectoring means that the drive will produce
	    a sector pulse on the start of each new sector. The controller
	    uses this pulse to tell when it should start to write or
	    read.</para>
	  
	  <para>Hard sectoring allows a selection of sector size (normally
	    256, 512 or 1024 bytes per formatted sector).  FreeBSD uses 512
	    byte sectors.  The number of sectors per track also varies while
	    still using the same number of bytes per formatted sector.  The
	    number of <emphasis>unformatted</emphasis> bytes per sector
	    varies, dependent on your controller it needs more or less
	    overhead  bytes to work correctly.  Pushing more sectors on a
	    track  of course gives you more usable space, but might give
	    problems if your controller needs more bytes than the  drive
	    offers.</para>
	      
	  <para>In case of soft sectoring, the controller itself determines
	    where to start/stop reading or writing.  For ESDI hard sectoring
	    is the default (at least on everything I came across).  I never
	    felt the urge to try soft sectoring.</para>
	      
	  <para>In general, experiment with sector settings before you install
	    FreeBSD because you need to re-run the low-level format after each
	    change.</para>
	</sect4>

	<sect4>
	  <title>Low level formatting</title>
	  
	  <para>ESDI drives need to be low level formatted before they are
	    usable.  A reformat is needed whenever you figgle with the number
	    of sectors/track jumpers or the physical orientation of the drive
	    (horizontal, vertical).  So, first think, then format.  The format
	    time must not be underestimated, for big disks it can take
	    hours.</para>
	      
	  <para>After a low level format, a surface scan is done to find and
	    flag bad sectors.  Most disks have a manufacturer bad block list
	    listed on a piece of paper or adhesive sticker.  In addition, on
	    most disks the list is also written onto the disk.  Please use the
	    manufacturer's list.  It is much easier to remap a defect now than
	    after FreeBSD is installed.</para>
	      
	  <para>Stay away from low-level formatters that mark all sectors of a
	    track as bad as soon as they find one bad sector.  Not only does
	    this waste space, it also and more importantly causes you grief
	    with bad144 (see the section on bad144).</para>
	</sect4>

	<sect4>
	  <title>Translations</title>
	  
	  <para>Translations, although not exclusively a ESDI-only problem,
	    might give you real trouble.  Translations come in multiple
	    flavors.  Most of them  have in common that they attempt to work
	    around the limitations posed upon disk geometries by the original
	    IBM PC/AT design (thanks IBM!).</para>
	      
	  <para>First of all there is the (in)famous 1024 cylinder limit. For
	    a system to be able to boot, the stuff (whatever operating system)
	    must be in the first 1024 cylinders of a disk.  Only 10 bits are
	    available to encode the cylinder number.  For the number of
	    sectors the limit is 64 (0-63).  When you combine the 1024
	    cylinder limit with the 16 head limit (also a design feature) you
	    max out at fairly limited  disk sizes.</para>
	      
	  <para>To work around this problem, the manufacturers of ESDI PC
	    controllers added a BIOS prom extension on their boards.  This
	    BIOS extension handles disk I/O for booting (and for some
	    operating systems <emphasis>all</emphasis> disk I/O) by using
	    translation.  For instance, a big drive might be presented to the
	    system as having 32 heads and 64 sectors/track.  The result is
	    that the number of cylinders is reduced to something below 1024
	    and is therefore usable by the system without problems.  It is
	    noteworthy to know that FreeBSD does not use the BIOS after its
	    kernel has started.  More on this later.</para>
	      
	  <para>A second reason for translations is the fact that most older
	    system BIOSes could only handle drives with 17 sectors per track
	    (the old ST412 standard).  Newer system BIOSes usually have a
	    user-defined drive type (in most cases this is drive type
	    47).</para>

	  <warning>
	    <para>Whatever you do to translations after reading this document,
	      keep in mind that if you have multiple operating systems on the
	      same disk, all must use the same translation</para>
	  </warning>
	  
	  <para>While on the subject of translations, I have seen one
	    controller type (but there are probably more like this) offer the
	    option to logically split a drive in multiple partitions as a BIOS
	    option.  I had select 1 drive == 1 partition because this
	    controller wrote this info onto the disk.  On power-up it read the
	    info and presented itself to the system based on the info from the
	    disk.</para>
	</sect4>
	    
	<sect4>
	  <title>Spare sectoring</title>
	  
	  <para>Most ESDI controllers offer the possibility to remap bad
	    sectors.  During/after the low-level format of the disk bad
	    sectors are marked as such, and a replacement sector is put in
	    place (logically of course) of the bad one.</para>
	      
	  <para>In most cases the remapping is done by using N-1 sectors on
	    each track for actual data storage, and sector N itself is the
	    spare sector.  N is the total number of sectors physically
	    available on the track.  The idea behind this is that the
	    operating system sees a 'perfect' disk without bad sectors.  In
	    the case of FreeBSD this concept is not usable.</para>
	      
	  <para>The problem is that the translation from
	    <emphasis>bad</emphasis> to <emphasis>good</emphasis> is performed
	    by the BIOS of the ESDI controller.  FreeBSD, being a true 32 bit
	    operating system, does not use the BIOS after it has been booted.
	    Instead, it has device drivers that talk directly to the
	    hardware.</para>
	      
	  <para><emphasis>So: don't use spare sectoring, bad block remapping
	      or whatever it may be called by the controller manufacturer when
	      you want to use the disk for FreeBSD.</emphasis></para>
	</sect4>

	<sect4>
	  <title>Bad block handling</title>
	  
	  <para>The preceding section leaves us with a problem.  The
	    controller's bad block handling is not usable and still FreeBSD's
	    filesystems assume perfect media without any flaws. To solve this
	    problem, FreeBSD use the <command>bad144</command> tool.  Bad144
	    (named after a Digital Equipment standard for bad block handling)
	    scans a FreeBSD slice for bad blocks.  Having found these bad
	    blocks, it writes a table with the offending block numbers to the
	    end of the FreeBSD slice.</para>
	      
	  <para>When the disk is in operation, the disk accesses are checked
	    against the table read from the disk.  Whenever a block number is
	    requested that is in the <command>bad144</command> list, a
	    replacement block (also from the end of the FreeBSD slice) is
	    used.  In this way, the <command>bad144</command> replacement
	    scheme presents 'perfect' media to the FreeBSD filesystems.</para>
	      
	  <para>There are a number of potential pitfalls associated with the
	    use of <command>bad144</command>.  First of all, the slice cannot
	    have more than 126 bad sectors.  If your drive has a high number
	    of bad sectors, you might need to divide it into multiple FreeBSD
	    slices each containing less than 126 bad sectors.  Stay away from
	    low-level format programs that mark <emphasis>every</emphasis>
	    sector of a track as bad when  they find a flaw on the track.  As
	    you can imagine, the  126 limit is quickly reached when the
	    low-level format is done this way.</para>
	      
	  <para>Second, if the slice contains the root filesystem, the slice
	    should be within the 1024 cylinder BIOS limit.  During the boot
	    process the bad144 list is read using the BIOS and this only
	    succeeds when the list is within the 1024 cylinder limit.</para>

	  <note>
	    <para>The restriction is not that only the root
	      <emphasis>filesystem</emphasis> must be within the 1024 cylinder
	      limit, but rather the entire <emphasis>slice</emphasis> that
	      contains the root filesystem.</para>
	  </note>
	</sect4>

	<sect4>
	  <title>Kernel configuration</title>
	  
	  <para>ESDI disks are handled by the same <literal>wd</literal>driver
	    as IDE and ST412 MFM disks.  The <literal>wd</literal> driver
	    should work for all WD1003 compatible interfaces.</para>
	      
	  <para>Most hardware is jumperable for one of two different I/O
	    address ranges and IRQ lines.  This allows you to have  two wd
	    type controllers in one system.</para>
	  
	  <para>When your hardware allows non-standard strappings, you can use
	    these with FreeBSD as long as you enter the  correct info into the
	    kernel config file.  An example from the kernel config file (they
	    live in <filename>/sys/i386/conf</filename> BTW).</para>
	      
	  <programlisting>
# First WD compatible controller
controller      wdc0    at isa? port "IO_WD1" bio irq 14 vector wdintr
disk            wd0     at wdc0 drive 0
disk            wd1     at wdc0 drive 1
# Second WD compatible controller
controller      wdc1    at isa? port "IO_WD2" bio irq 15 vector wdintr
disk            wd2     at wdc1 drive 0
disk            wd3     at wdc1 drive 1</programlisting>
	</sect4>
      </sect3>
      
      <sect3>
	<title>Particulars on ESDI hardware</title>

	<sect4>
	  <title>Adaptec 2320 controllers</title>
	  
	  <para>I successfully installed FreeBSD onto a ESDI disk controlled
	    by a ACB-2320.  No other operating system was present on the
	    disk.</para>
	      
	  <para>To do so I low level formatted the disk using
	    <command>NEFMT.EXE</command> (<command>ftp</command>able from
	    <hostid role="fqdn">www.adaptec.com</hostid>) and answered NO to
	    the question whether the disk should be formatted with a spare
	    sector on each track.  The BIOS on the ACD-2320 was disabled.  I
	    used the <literal>free configurable</literal> option in the system
	    BIOS to allow the BIOS to boot it.</para>
	      
	  <para>Before using <command>NEFMT.EXE</command> I tried to format
	    the disk using the ACB-2320 BIOS builtin formatter.  This proved
	    to be a show stopper, because it did not give me an option to
	    disable spare sectoring.  With spare sectoring enabled the FreeBSD
	    installation process broke down on the <command>bad144</command>
	    run.</para>
	      
	  <para>Please check carefully which
	    ACB-232<replaceable>xy</replaceable> variant you have. The
	    <replaceable>x</replaceable> is either <literal>0</literal> or
	    <literal>2</literal>, indicating a controller without or with a
	    floppy controller on board.</para>
	      
	  <para>The <literal>y</literal> is more interesting.  It can either
	    be a blank, a <literal>A-8</literal> or a <literal>D</literal>.  A
	    blank indicates a plain 10 Mbits/second controller.  An
	    <literal>A-8</literal> indicates a 15 Mbits/second controller
	    capable of handling 52 sectors/track.  A <literal>D</literal>
	    means a 15 Mbits/second controller that can also handle drives
	    with &gt; 36 sectors/track (also 52 ?).</para>
	      
	  <para>All variations should be capable of using 1:1 interleaving.
	    Use 1:1, FreeBSD is fast enough to handle it.</para>
	</sect4>

	<sect4>
	  <title>Western Digital WD1007 controllers</title>
	  
	  <para>I successfully installed FreeBSD onto a ESDI disk controlled
	    by a WD1007 controller.  To be precise, it was a WD1007-WA2.
	    Other variations of the WD1007 do exist.</para>
	      
	  <para>To get it to work, I had to disable the sector translation and
	    the WD1007's onboard BIOS.  This implied I could not use the
	    low-level formatter built into this BIOS.  Instead, I grabbed
	    <command>WDFMT.EXE</command> from <hostid
	      role="fqdn">www.wdc.com</hostid> Running this formatted my drive
	    just fine.</para>
	</sect4>

	<sect4>
	  <title>Ultrastor U14F controllers</title>
	  
	  <para>According to multiple reports from the net, Ultrastor ESDI
	    boards work OK with FreeBSD.  I lack any further info on
	    particular settings.</para>
	</sect4>
      </sect3>
      
      <sect3 id="esdi-further-reading">
	<title>Further reading</title>
	    
	<para>If you intend to do some serious ESDI hacking, you might want to
	  have the official standard at hand:</para>
	    
	<para>The latest ANSI X3T10 committee document is: Enhanced Small
	  Device Interface (ESDI) [X3.170-1990/X3.170a-1991]    [X3T10/792D
	  Rev 11]</para>
		
	<para>On Usenet the newsgroup <ulink
	    url="news:comp.periphs">comp.periphs</ulink> is a noteworthy place
	  to look  for more info.</para>
	    
	<para>The World Wide Web (WWW) also proves to be a very handy info
	  source: For info on Adaptec ESDI controllers see <ulink
	    url="http://www.adaptec.com/">http://www.adaptec.com/</ulink>. For
	  info on Western Digital controllers see <ulink
	    url="http://www.wdc.com/">http://www.wdc.com/</ulink>.</para>
      </sect3>
      
      <sect3>
	<title>Thanks to...</title>

	<para>Andrew Gordon for sending me an Adaptec 2320 controller and ESDI
	  disk for testing.</para>
      </sect3>
    </sect2>
    
    <sect2 id="scsi">
      <title>What is SCSI?</title>
      
      <para><emphasis>Copyright &copy; 1995, &a.wilko;.  July 6,
	  1996.</emphasis></para>
	  
      <para>SCSI is an acronym for Small Computer Systems Interface.  It is an
	ANSI standard that has become one of the leading I/O buses in the
	computer industry.  The foundation of the SCSI standard was laid by
	Shugart Associates (the same guys that gave the world the first mini
	floppy disks) when they introduced the SASI bus (Shugart Associates
	Standard Interface).</para>
	  
      <para>After some time an industry effort was started to come to a more
	strict standard allowing devices from different vendors to work
	together.  This effort was recognized in the ANSI SCSI-1 standard.
	The SCSI-1 standard (approx 1985) is rapidly becoming obsolete.  The
	current standard is SCSI-2 (see <link
	  linkend="scsi-further-reading">Further reading</link>), with SCSI-3
	on the drawing boards.</para>
	  
      <para>In addition to a physical interconnection standard, SCSI defines a
	logical (command set) standard to which disk devices must adhere.
	This standard is called the Common Command Set (CCS) and was developed
	more or less in parallel with ANSI SCSI-1. SCSI-2 includes the
	(revised) CCS as part of the standard itself. The commands are
	dependent on the type of device at hand.  It does not make much sense
	of course to define a Write command for a scanner.</para>
	  
      <para>The SCSI bus is a parallel bus, which comes in a number of
	variants.  The oldest and most used is an 8 bit wide bus, with
	single-ended signals, carried on 50 wires.  (If you do not know what
	single-ended means, do not worry, that is what this document is all
	about.)  Modern designs also use 16 bit wide buses, with differential
	signals.  This allows transfer speeds of 20Mbytes/second, on cables
	lengths of up to 25 meters.  SCSI-2 allows a maximum bus width of 32
	bits, using an additional cable. Quickly emerging are Ultra SCSI (also
	called Fast-20) and Ultra2 (also called Fast-40).  Fast-20 is 20
	million transfers per second (20 Mbytes/sec on a 8 bit bus), Fast-40
	is 40 million transfers per second (40 Mbytes/sec on a 8 bit bus).
	Most hard drives sold today are single-ended Ultra SCSI (8 or 16
	bits).</para>
	  
      <para>Of course the SCSI bus not only has data lines, but also a number
	of control signals.  A very elaborate protocol is part of the standard
	to allow multiple devices to share the bus in an efficient manner.  In
	SCSI-2, the data is always checked using a separate parity line.  In
	pre-SCSI-2 designs parity was optional.</para>
	  
      <para>In SCSI-3 even faster bus types are introduced, along with a
	serial SCSI busses that reduces the cabling overhead and allows a
	higher maximum bus length.  You might see names like SSA and
	Fiberchannel in this context.  None of the serial buses are currently
	in widespread use (especially not in the typical FreeBSD environment).
	For this reason the serial bus types are not discussed any
	further.</para>
	  
      <para>As you could have guessed from the description above, SCSI devices
	are intelligent.  They have to be to adhere to the SCSI standard
	(which is over 2 inches thick BTW).  So, for a hard disk drive for
	instance you do not specify a head/cylinder/sector to address a
	particular block, but simply the number of the block you want.
	Elaborate caching schemes, automatic bad block replacement etc are all
	made possible by this 'intelligent device' approach.</para>
	  
      <para>On a SCSI bus, each possible pair of devices can communicate.
	Whether their function allows this is another matter, but the standard
	does not restrict it.  To avoid signal contention, the 2 devices have
	to arbitrate for the bus before using it.</para>
	  
      <para>The philosophy of SCSI is to have a standard that allows
	older-standard devices to work with newer-standard ones.  So, an old
	SCSI-1 device should normally work on a SCSI-2 bus.  I say Normally,
	because it is not absolutely sure that the implementation of an old
	device follows the (old) standard closely enough to be acceptable on a
	new bus.  Modern devices are usually more well-behaved, because the
	standardization has become more strict and is better adhered to by the
	device manufacturers.</para>
	  
      <para>Generally speaking, the chances of getting a working set of
	devices on a single bus is better when all the devices are SCSI-2 or
	newer.  This implies that you do not have to dump all your old stuff
	when you get that shiny 2GB disk: I own a system on which a pre-SCSI-1
	disk, a SCSI-2 QIC tape unit, a SCSI-1 helical scan tape unit and 2
	SCSI-1 disks work together quite happily.  From a performance
	standpoint you might want to separate your older and newer (=faster)
	devices however.</para>
      
      <sect3>
	<title>Components of SCSI</title>

	<para>As said before, SCSI devices are smart.  The idea is to put the
	  knowledge about intimate hardware details onto the SCSI device
	  itself.  In this way, the host system does not have to worry about
	  things like how many heads are hard disks has, or how many tracks
	  there are on a specific tape device.  If you are curious, the
	  standard specifies commands with which you can query your devices on
	  their hardware particulars.  FreeBSD uses this capability during
	  boot to check out what devices are connected and whether they need
	  any special treatment.</para>
	    
	<para>The advantage of intelligent devices is obvious: the device
	  drivers on the host can be made in a much more generic fashion,
	  there is no longer a need to change (and qualify!) drivers for every
	  odd new device that is introduced.</para>
	    
	<para>For cabling and connectors there is a golden rule: get good
	  stuff.  With bus speeds going up all the time you will save yourself
	  a lot of grief by using good material.</para>
	    
	<para>So, gold plated connectors, shielded cabling, sturdy connector
	  hoods with strain reliefs etc are the way to go. Second golden rule:
	  do no use cables longer than necessary.  I once spent 3 days hunting
	  down a problem with a flaky machine only to discover that shortening
	  the SCSI bus by 1 meter solved the problem.  And the original bus
	  length was well within the SCSI specification.</para>
      </sect3>
	  
      <sect3>
	<title>SCSI bus types</title>

	<para>From an electrical point of view, there are two incompatible bus
	  types: single-ended and differential.  This means that there are two
	  different main groups of SCSI devices and controllers, which cannot
	  be mixed on the same bus.  It is possible however to use special
	  converter hardware to transform a single-ended bus into a
	  differential one (and vice versa).  The differences between the bus
	  types are explained in the next sections.</para>
	    
	<para>In lots of SCSI related documentation there is a sort of jargon
	  in use to abbreviate the different bus types.  A small list:</para>
	    
	<itemizedlist>
	  <listitem>
	    <para>FWD:	Fast Wide Differential</para>
	  </listitem>
	  
	  <listitem>
	    <para>FND:	Fast Narrow Differential</para>
	  </listitem>
	  
	  <listitem>
	    <para>SE:	Single Ended</para>
	  </listitem>
	  
	  <listitem>
	    <para>FN:	Fast Narrow</para>
	  </listitem>
	  
	  <listitem>
	    <para>etc.</para>
	  </listitem>
	</itemizedlist>


	<para>With a minor amount of imagination one can usually imagine what
	  is meant.</para>
	    
	<para>Wide is a bit ambiguous, it can indicate 16 or 32 bit buses. As
	  far as I know, the 32 bit variant is not (yet) in use, so wide
	  normally means 16 bit.</para>
	    
	<para>Fast means that the timing on the bus is somewhat different, so
	  that on a narrow (8 bit) bus 10 Mbytes/sec are possible instead of 5
	  Mbytes/sec for 'slow' SCSI.  As discussed before, bus speeds of 20
	  and 40 million transfers/second are also emerging  (Fast-20 == Ultra
	  SCSI and Fast-40 == Ultra2 SCSI).</para>

	<note>
	  <para>The data lines &gt; 8 are only used for data transfers and
	    device addressing.  The transfers of commands and status messages
	    etc are only performed on the lowest 8 data lines. The standard
	    allows narrow devices to operate on a wide bus. The usable bus
	    width is negotiated between the devices.  You have to watch your
	    device addressing closely when mixing wide and narrow.</para>
	</note>

	<sect4>
	  <title>Single ended buses</title>
	  
	  <para>A single-ended SCSI bus uses signals that are either 5 Volts
	    or 0 Volts (indeed, TTL levels) and are relative to a COMMON
	    ground reference.  A singled ended 8 bit SCSI bus has
	    approximately 25 ground lines, who are all tied to a single `rail'
	    on all devices.  A standard single ended bus has a maximum length
	    of 6 meters.  If the same bus is used with fast-SCSI devices, the
	    maximum length allowed drops to 3 meters.  Fast-SCSI means that
	    instead of 5Mbytes/sec the bus allows 10Mbytes/sec
	    transfers.</para>
	      
	  <para>Fast-20 (Ultra SCSI) and Fast-40 allow for 20 and 40 million
	    transfers/second respectively.  So, F20 is 20 Mbytes/second on a 8
	    bit bus, 40 Mbytes/second on a 16 bit bus etc.  For F20 the max
	    bus length is 1.5 meters, for F40 it becomes 0.75 meters.  Be
	    aware that F20 is pushing  the limits quite a bit, so you will
	    quickly find out if your SCSI bus is electrically sound.</para>

	  <note>
	    <para>If some devices on your bus use 'fast' to communicate your
	      bus must adhere to the length restrictions for fast
	      buses!</para>
	  </note>
	  
	  <para>It is obvious that with the newer fast-SCSI devices the bus
	    length can become a real bottleneck.  This is why the differential
	    SCSI bus was introduced in the SCSI-2 standard.</para>
	      
	  <para>For connector pinning and connector types please refer to the
	    SCSI-2 standard (see <link linkend="scsi-further-reading">Further
	      reading</link>) itself, connectors etc are listed there in
	    painstaking detail.</para>
	  
	  <para>Beware of devices using non-standard cabling.  For instance
	    Apple uses a 25pin D-type connecter (like the one on serial ports
	    and parallel printers).  Considering that the official SCSI bus
	    needs 50 pins you can imagine the use of this connector needs some
	    'creative cabling'.  The reduction of the number of ground wires
	    they used is a bad idea, you better stick to 50 pins cabling  in
	    accordance with the SCSI standard.  For Fast-20 and 40 do not even
	    think about buses like this.</para>
	</sect4>

	<sect4>
	  <title>Differential buses</title>
	  
	  <para>A differential SCSI bus has a maximum length of 25 meters.
	    Quite a difference from the 3 meters for a single-ended fast-SCSI
	    bus.  The idea behind differential signals is that each bus signal
	    has its own return wire.  So, each signal is carried on a
	    (preferably twisted) pair of wires.  The voltage difference
	    between these two wires determines whether the signal is asserted
	    or de-asserted.  To a certain extent the voltage difference
	    between ground and the signal wire pair is not relevant (do not
	    try 10 kVolts though).</para>
	      
	  <para>It is beyond the scope of this document to explain why this
	    differential idea is so much better.  Just accept that
	    electrically seen the use of differential signals gives a much
	    better noise margin.  You will normally find differential buses in
	    use for inter-cabinet connections.  Because of the lower cost
	    single ended is mostly used for shorter buses like inside
	    cabinets.</para>
	      
	  <para>There is nothing that stops you from using differential stuff
	    with FreeBSD, as long as you use a controller that has device
	    driver support in FreeBSD.  As an example, Adaptec marketed the
	    AHA1740 as a single ended board, whereas the AHA1744 was
	    differential.  The software interface to the host is identical for
	    both.</para>
	</sect4>

	<sect4>
	  <title>Terminators</title>
	  
	  <para>Terminators in SCSI terminology are resistor networks that are
	    used to get a correct impedance matching.  Impedance matching is
	    important to get clean signals on the bus, without reflections or
	    ringing.  If you once made a long distance telephone call on a bad
	    line you probably know what reflections are.  With 20Mbytes/sec
	    traveling over your SCSI bus, you do not want signals echoing
	    back.</para>
	      
	  <para>Terminators come in various incarnations, with more or less
	    sophisticated designs.  Of course, there are internal and external
	    variants.  Many SCSI devices come with a number of sockets in
	    which a number of resistor networks can (must be!) installed.  If
	    you remove terminators from a device, carefully store them.  You
	    will need them when you ever decide to reconfigure your SCSI bus.
	    There is enough variation in even these simple tiny things to make
	    finding the exact replacement a frustrating business.  There are
	    also SCSI devices that have a single jumper to enable or disable a
	    built-in terminator. There are special terminators you can stick
	    onto a flat cable bus.  Others look like external connectors, or a
	    connector hood without a cable.  So, lots of choice as you can
	    see.</para>
	      
	  <para>There is much debate going on if and when you should switch
	    from simple resistor (passive) terminators to active terminators.
	    Active terminators contain slightly more elaborate circuit to give
	    cleaner bus signals.  The general consensus seems to be that the
	    usefulness of active termination increases when you have long
	    buses and/or fast devices.  If you ever have problems with your
	    SCSI buses you might consider trying an active terminator.  Try to
	    borrow one first, they reputedly are quite expensive.</para>
	      
	  <para>Please keep in mind that terminators for differential and
	    single-ended buses are not identical.  You should <emphasis>not
	      mix</emphasis> the two variants.</para>
	      
	  <para>OK, and now where should you install your terminators? This is
	    by far the most misunderstood part of SCSI.  And it is by far the
	    simplest.  The rule is: <emphasis>every single line on the SCSI
	      bus has 2 (two) terminators, one at each end of the
	      bus.</emphasis> So, two and not one or three or whatever.  Do
	    yourself a favor and stick to this rule.  It will save you endless
	    grief, because wrong termination has the potential to introduce
	    highly mysterious bugs.  (Note the <quote>potential</quote> here;
	    the nastiest part is that it may or may not work.)</para>
	      
	  <para>A common pitfall is to have an internal (flat) cable in a
	    machine and also an external cable attached to the controller. It
	    seems almost everybody forgets to remove the terminators from the
	    controller.  The terminator must now be on the last external
	    device, and not on the controller! In general, every
	    reconfiguration of a SCSI bus must pay attention to this.</para>

	  <note>
	    <para>Termination is to be done on a per-line basis.  This means
	      if you have both narrow and wide buses connected to the same
	      host adapter, you need to enable termination on the higher 8
	      bits of the bus on the adapter (as well as the last devices on
	      each bus, of course).</para>
	      </note>
	      
	  <para>What I did myself is remove all terminators from my SCSI
	    devices and controllers.  I own a couple of external terminators,
	    for both the Centronics-type external cabling and for the internal
	    flat cable connectors.  This makes reconfiguration much
	    easier.</para>
	      
	  <para>On modern devices, sometimes integrated terminators are used.
	    These things are special purpose integrated circuits that can be
	    dis/en-abled with a control pin.  It is not necessary to
	    physically remove them from a device.  You may find them on newer
	    host adapters, sometimes they are software configurable, using
	    some sort of setup tool.  Some will even auto-detect the cables
	    attached to the connectors and automatically set up the
	    termination as necessary.  At any rate, consult your
	    documentation!</para>
	</sect4>

	<sect4>
	  <title>Terminator power</title>
	  
	  <para>The terminators discussed in the previous chapter need power
	    to operate properly.  On the SCSI bus, a line is dedicated to this
	    purpose.  So, simple huh?</para>
	      
	  <para>Not so.  Each device can provide its own terminator power to
	    the terminator sockets it has on-device.  But if you have external
	    terminators, or when the device supplying the terminator power to
	    the SCSI bus line is switched off you are in trouble.</para>
	      
	  <para>The idea is that initiators (these are devices that initiate
	    actions on the bus, a discussion follows) must supply terminator
	    power.  All SCSI devices are allowed (but not required) to supply
	    terminator power.</para>
	      
	  <para>To allow for un-powered devices on a bus, the terminator power
	    must be supplied to the bus via a diode.  This prevents the
	    backflow of current to un-powered devices.</para>
	      
	  <para>To prevent all kinds of nastiness, the terminator power is
	    usually fused.  As you can imagine, fuses might blow.  This can,
	    but does not have to, lead to a non functional bus.  If multiple
	    devices supply terminator power, a single blown fuse will not put
	    you out of business.  A single supplier with a blown fuse
	    certainly will.  Clever external terminators sometimes have a  LED
	    indication that shows whether terminator power is present.</para>
	      
	  <para>In newer designs auto-restoring fuses that 'reset' themselves
	    after some time are sometimes used.</para>
	</sect4>

	<sect4>
	  <title>Device addressing</title>
	  
	  <para>Because the SCSI bus is, ehh, a bus there must be a way to
	    distinguish or address the different devices connected to
	    it.</para>
	      
	  <para>This is done by means of the SCSI or target ID.  Each device
	    has a unique target ID.  You can select the ID to which a device
	    must respond using a set of jumpers, or a dip switch, or something
	    similar.  Some SCSI host adapters let you change the target ID
	    from the boot menu.  (Yet some others will not let you change the
	    ID from 7.)  Consult the documentation of your device for more
	    information.</para>
	  
	  <para>Beware of multiple devices configured to use the same ID.
	    Chaos normally reigns in this case.  A pitfall is that one of the
	    devices sharing the same ID sometimes even manages to answer to
	    I/O requests!</para>
	      
	  <para>For an 8 bit bus, a maximum of 8 targets is possible.  The
	    maximum is 8 because the selection is done bitwise using the 8
	    data lines on the bus.  For wide buses this increases to the
	    number of data lines (usually 16).</para>

	  <note>
	    <para>A narrow SCSI device can not communicate with a SCSI device
	      with a target ID larger than 7.  This means it is generally not
	      a good idea to move your SCSI host adapter's target ID to
	      something higher than 7 (or your CD-ROM will stop
	      working).</para>
	  </note>
	  
	  <para>The higher the SCSI target ID, the higher the priority the
	    devices has.  When it comes to arbitration between devices that
	    want to use the bus at the same time, the device that has the
	    highest SCSI ID will win.  This also means that the SCSI host
	    adapter usually uses target ID 7.  Note however that the lower 8
	    IDs have higher priorities than the higher 8 IDs on a wide-SCSI
	    bus.  Thus, the order of target IDs is: [7 6 .. 1 0 15 14 .. 9 8]
	    on a wide-SCSI system.  (If you you are wondering why the lower 8
	    have higher priority, read the previous paragraph for a
	    hint.)</para>
	      
	  <para>For a further subdivision, the standard allows for Logical
	    Units or LUNs for short.  A single target ID may have multiple
	    LUNs.  For example, a tape device including a tape changer may
	    have LUN 0 for the tape device itself, and LUN 1 for the tape
	    changer.  In this way, the host system can address each of the
	    functional units of the tape changer as desired.</para>
	</sect4>
	    
	<sect4>
	  <title>Bus layout</title>
	  
	  <para>SCSI buses are linear.  So, not shaped like Y-junctions, star
	    topologies, rings, cobwebs or whatever else people might want to
	    invent.  One of the most common mistakes is for people with
	    wide-SCSI host adapters to connect devices on all three connecters
	    (external connector, internal wide connector, internal narrow
	    connector).  Don't do that.  It may appear to work if you are
	    really lucky, but I can almost guarantee that your system will
	    stop functioning at the most unfortunate moment (this is also
	    known as <quote>Murphy's law</quote>).</para>
	      
	  <para>You might notice that the terminator issue discussed earlier
	    becomes rather hairy if your bus is not linear.  Also, if you have
	    more connectors than devices on your internal SCSI cable, make
	    sure you attach devices on connectors on both ends instead of
	    using the connectors in the middle and let one or both ends
	    dangle.  This will screw up the termination of the bus.</para>
	      
	  <para>The electrical characteristics, its noise margins and
	    ultimately the reliability of it all are tightly related to linear
	    bus rule.</para>
	  
	  <para><emphasis>Stick to the linear bus rule!</emphasis></para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>Using SCSI with FreeBSD</title>

	<sect4>
	  <title>About translations, BIOSes and magic...</title>
	  
	  <para>As stated before, you should first make sure that you have a
	    electrically sound bus.</para>
	      
	  <para>When you want to use a SCSI disk on your PC as boot disk, you
	    must aware of some quirks related to PC BIOSes.  The PC BIOS in
	    its first incarnation used a low level physical interface to the
	    hard disk.  So, you had to tell the BIOS (using a setup tool or a
	    BIOS built-in setup) how your disk physically looked like.  This
	    involved stating number of heads, number of cylinders, number of
	    sectors per track, obscure things like precompensation and reduced
	    write current cylinder etc.</para>
	      
	  <para>One might be inclined to think that since SCSI disks are smart
	    you can forget about this.  Alas, the arcane setup issue is still
	    present today.  The system BIOS needs to know how to access your
	    SCSI disk with the head/cyl/sector method in order to load the
	    FreeBSD kernel during boot.</para>
	      
	  <para>The SCSI host adapter or SCSI controller you have put in your
	    AT/EISA/PCI/whatever bus to connect your disk therefore has its
	    own on-board BIOS.  During system startup, the SCSI BIOS takes
	    over the hard disk interface routines from the system BIOS.  To
	    fool the system BIOS, the system setup is normally set to No hard
	    disk present.  Obvious, isn't it?</para>
	      
	  <para>The SCSI BIOS itself presents to the system a so called
	    <emphasis>translated</emphasis> drive.  This means that a fake
	    drive table is constructed that allows the PC to boot the drive.
	    This translation is often (but not always) done using a pseudo
	    drive with 64 heads and 32 sectors per track.  By varying the
	    number of cylinders, the SCSI BIOS adapts to the actual drive
	    size.  It is useful to note that 32 * 64 / 2 = the size of your
	    drive in megabytes.  The division by 2 is to get from disk blocks
	    that are normally 512 bytes in size to Kbytes.</para>
	      
	  <para>Right.  All is well now?! No, it is not.  The system BIOS has
	    another quirk you might run into.  The number of cylinders of a
	    bootable hard disk cannot be greater than 1024.  Using the
	    translation above, this is a show-stopper for disks greater than 1
	    GB.  With disk capacities going up all the time this is causing
	    problems.</para>
	      
	  <para>Fortunately, the solution is simple: just use another
	    translation, e.g. with 128 heads instead of 32.  In most cases new
	    SCSI BIOS versions are available to upgrade older SCSI host
	    adapters.  Some newer adapters have an option, in the form of a
	    jumper or software setup selection, to switch the translation the
	    SCSI BIOS uses.</para>
	      
	  <para>It is very important that <emphasis>all</emphasis> operating
	    systems on the disk use the <emphasis>same translation</emphasis>
	    to get the right idea about where to find the relevant partitions.
	    So, when installing FreeBSD you must answer any questions about
	    heads/cylinders etc using the translated values your host adapter
	    uses.</para>
	      
	  <para>Failing to observe the translation issue might lead to
	    un-bootable systems or operating systems overwriting each others
	    partitions.  Using fdisk you should be able to see all
	    partitions.</para>
	      
	  <para>You might have heard some talk of <quote>lying</quote> devices?
	    Older FreeBSD kernels used to report the geometry of SCSI disks
	    when booting.  An example from one of my systems:</para>
	      
	  <screen>aha0 targ 0 lun 0: &lt;MICROP 1588-15MB1057404HSP4&gt;
sd0: 636MB (1303250 total sec), 1632 cyl, 15 head, 53 sec, bytes/sec 512</screen>

	  <para>Newer kernels usually do not report this information.
	    e.g.</para>

	  <screen>(bt0:0:0): "SEAGATE ST41651 7574" type 0 fixed SCSI 2
sd0(bt0:0:0): Direct-Access 1350MB (2766300 512 byte sectors)</screen>
		
	  <para>Why has this changed?</para>
	      
	  <para>This info is retrieved from the SCSI disk itself.  Newer disks
	    often use a technique called zone bit recording.  The idea is that
	    on the outer cylinders of the drive there is more space so more
	    sectors per track can be put on them.  This results in disks that
	    have more tracks on outer cylinders than on the inner cylinders
	    and, last but not least, have more capacity.  You can imagine that
	    the value reported by the drive when inquiring about the geometry
	    now becomes suspect at best, and nearly always misleading.  When
	    asked for a geometry , it is nearly always better to supply the
	    geometry used by the BIOS, or <emphasis>if the BIOS is never going
	      to know about this disk</emphasis>, (e.g. it is not a booting
	    disk) to supply a fictitious geometry that is convenient.</para>
	</sect4>

	<sect4>
	  <title>SCSI subsystem design</title>
	  
	  <para>FreeBSD uses a layered SCSI subsystem.  For each different
	    controller card a device driver is written.  This driver knows all
	    the intimate details about the hardware it controls.  The driver
	    has a interface to the upper layers of the SCSI subsystem through
	    which it receives its commands and reports back any status.</para>
	      
	  <para>On top of the card drivers there are a number of more generic
	    drivers for a class of devices.  More specific: a driver for tape
	    devices (abbreviation: st), magnetic disks (sd), CD-ROMs (cd) etc.
	    In case you are wondering where you can find this stuff, it all
	    lives in <filename>/sys/scsi</filename>.  See the man pages in
	    section 4 for more details.</para>
	      
	  <para>The multi level design allows a decoupling of low-level bit
	    banging and more high level stuff.  Adding support for another
	    piece of hardware is a much more manageable problem.</para>
	</sect4>

	<sect4>
	  <title>Kernel configuration</title>
	  
	  <para>Dependent on your hardware, the kernel configuration file must
	    contain one or more lines describing your host adapter(s).  This
	    includes I/O addresses, interrupts etc. Consult the man page for
	    your adapter driver to get more info. Apart from that, check out
	    <filename>/sys/i386/conf/LINT</filename> for an overview of a
	    kernel config file.  <filename>LINT</filename> contains every
	    possible option you can dream of.  It does
	    <emphasis>not</emphasis> imply <filename>LINT</filename> will
	    actually get you to a working kernel at all.</para>
	  
	  <para>Although it is probably stating the obvious: the kernel config
	    file should reflect your actual hardware setup.  So, interrupts,
	    I/O addresses etc must match the kernel config file.  During
	    system boot messages will be displayed to indicate whether the
	    configured hardware was actually found.</para>

	  <note>
	    <para>Note that most of the EISA/PCI drivers (namely
	      <devicename>ahb</devicename>, <devicename>ahc</devicename>,
	      <devicename>ncr</devicename> and <devicename>amd</devicename>
	      will automatically obtain the correct parameters from the host
	      adapters themselves at boot time; thus, you just need to write,
	      for instance, <literal>controller ahc0</literal>.</para>
	  </note>
	  
	  <para>An example loosely based on the FreeBSD 2.2.5-Release kernel
	    config  file <filename>LINT</filename> with some added comments
	    (between []):</para>
	      
	  <programlisting>
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
#
# aha: Adaptec 154x
# ahb: Adaptec 174x
# ahc: Adaptec 274x/284x/294x
# aic: Adaptec 152x and sound cards using the Adaptec AIC-6360 (slow!)
# amd: AMD 53c974 based SCSI cards (e.g., Tekram DC-390 and 390T)
# bt: Most Buslogic controllers
# nca: ProAudioSpectrum cards using the NCR 5380 or Trantor T130
# ncr: NCR/Symbios 53c810/815/825/875 etc based SCSI cards
# uha: UltraStore 14F and 34F
# sea: Seagate ST01/02 8 bit controller (slow!)
# wds: Western Digital WD7000 controller (no scatter/gather!).
#

[For an Adaptec AHA274x/284x/294x/394x etc controller]
controller	ahc0

[For an NCR/Symbios 53c875 based controller]
controller	ncr0

[For an Ultrastor adapter]
controller	uha0	at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr

# Map SCSI buses to specific SCSI adapters
controller	scbus0	at ahc0
controller	scbus2 at ncr0
controller	scbus1  at uha0

# The actual SCSI devices
disk sd0 at scbus0 target 0 unit 0	[SCSI disk 0 is at scbus 0, LUN 0]
disk sd1 at scbus0 target 1             [implicit LUN 0 if omitted]
disk sd2 at scbus1 target 3             [SCSI disk on the uha0]
disk sd3 at scbus2 target 4             [SCSI disk on the ncr0]
tape st1 at scbus0 target 6             [SCSI tape at target 6]
device cd0 at scbus?                    [the first ever CD-ROM found, no wiring]</programlisting>
	      
	  <para>The example above tells the kernel to look for a ahc (Adaptec
	    274x) controller, then for an NCR/Symbios board, and so on.  The
	    lines following the controller specifications  tell the kernel to
	    configure specific devices but <emphasis>only</emphasis> attach
	    them when they match the target ID and LUN specified on the
	    corresponding bus.</para>
	      
	  <para>Wired down devices get <quote>first shot</quote> at the unit
	    numbers so the first non <quote>wired down</quote> device, is
	    allocated the unit number  one greater than the highest
	    <quote>wired down</quote> unit number for that kind of device.  So,
	    if you had a SCSI tape at target ID 2 it would be configured as
	    st2, as the tape at target ID 6 is wired down to unit number
	    1.</para>

	  <note>
	    <para>Wired down devices need not be found to get their unit
	      number.  The unit number for a wired down device is reserved for
	      that device, even if it is turned off at boot time.  This allows
	      the device to be turned on and brought on-line at a later time,
	      without rebooting.  Notice that a device's unit number has
	      <emphasis>no</emphasis> relationship with its target ID on  the
	      SCSI bus.</para>
	  </note>
	  
	  <para>Below is another example of a kernel config file as used by
	    FreeBSD version &lt; 2.0.5.  The difference with the first example
	    is that devices are not <quote>wired down</quote>.  <quote>Wired
	    down</quote> means that you specify which SCSI target belongs to
	    which device.</para>
	      
	  <para>A kernel built to the config file below will attach  the first
	    SCSI disk it finds to sd0, the second disk to sd1 etc. If you ever
	    removed or added a disk, all other devices of the same type (disk
	    in this case) would 'move around'.  This implies you have to
	    change <filename>/etc/fstab</filename> each time.</para>
	      
	  <para>Although the old style still works, you  are
	    <emphasis>strongly</emphasis> recommended to use this new feature.
	    It will save you a lot of grief whenever you shift your hardware
	    around on the SCSI buses.  So, when you re-use your old trusty
	    config file after upgrading from a pre-FreeBSD2.0.5.R system check
	    this out.</para>
	  
	  <programlisting>
[driver for Adaptec 174x]
controller      ahb0 at isa? bio irq 11 vector ahbintr

[for Adaptec 154x]
controller      aha0    at isa? port "IO_AHA0" bio irq 11 drq 5 vector ahaintr

[for Seagate ST01/02]
controller      sea0    at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr

controller      scbus0

device          sd0     [support for 4 SCSI harddisks, sd0 up sd3]
device          st0	[support for 2 SCSI tapes]

[for the CD-ROM]
device          cd0     #Only need one of these, the code dynamically grows</programlisting>
	      
	  <para>Both examples support SCSI disks.  If during boot more devices
	    of a specific type (e.g. sd disks) are found than are configured
	    in the booting kernel, the system will simply allocate more
	    devices, incrementing the unit number starting at the last number
	    <quote>wired down</quote>.  If there are no <quote>wired
	    down</quote> devices then counting starts at unit 0.</para>
	      
	  <para>Use <command>man 4 scsi</command> to check for the latest info
	    on the SCSI subsystem.  For more detailed info on host adapter
	    drivers use eg <command>man 4 ahc</command> for info on the
	    Adaptec 294x driver.</para>
	</sect4>

	<sect4>
	  <title>Tuning your SCSI kernel setup</title>
	  
	  <para>Experience has shown that some devices are slow to respond to
	    INQUIRY commands after a SCSI bus reset (which happens at boot
	    time).  An INQUIRY command is sent by the kernel on boot to see
	    what kind of device (disk, tape, CD-ROM etc) is connected to a
	    specific target ID.  This process is called device probing by the
	    way.</para>
	      
	  <para>To work around the 'slow response' problem, FreeBSD allows a
	    tunable delay time before the SCSI devices are probed following a
	    SCSI bus reset.  You can set this delay time in your kernel
	    configuration file using a line like:</para>
	      
	  <programlisting>
options         SCSI_DELAY=15         #Be pessimistic about Joe SCSI device</programlisting>

	  <para>This line sets the delay time to 15 seconds.  On my own system
	    I had to use 3 seconds minimum to get my trusty old CD-ROM drive
	    to be recognized.  Start with a high value (say 30 seconds or so)
	    when you have problems  with device recognition.  If this helps,
	    tune it back until it just stays working.</para>
	</sect4>

	<sect4 id="scsi-rogue-devices">
	  <title>Rogue SCSI devices</title>
	      
	  <para>Although the SCSI standard tries to be complete and concise,
	    it is a complex standard and implementing things correctly is no
	    easy task.  Some vendors do a better job then others.</para>
	      
	  <para>This is exactly where the <quote>rogue</quote> devices come
	    into view. Rogues are devices that are recognized by the FreeBSD
	    kernel as behaving slightly (...) non-standard.  Rogue devices are
	    reported by the kernel when booting.  An example for two of my
	    cartridge tape units:</para>
	  
	  <screen>Feb 25 21:03:34 yedi /kernel: ahb0 targ 5 lun 0: &lt;TANDBERG TDC 3600       -06:&gt;
Feb 25 21:03:34 yedi /kernel: st0: Tandberg tdc3600 is a known rogue

Mar 29 21:16:37 yedi /kernel: aha0 targ 5 lun 0: &lt;ARCHIVE VIPER 150  21247-005&gt;
Mar 29 21:16:37 yedi /kernel: st1: Archive  Viper 150 is a known rogue </screen>
	      
	  <para>For instance, there are devices that respond to all LUNs on a
	    certain target ID, even if they are actually only one device.  It
	    is easy to see that the kernel might be fooled into believing that
	    there are 8 LUNs at that particular target ID. The confusion this
	    causes is left as an exercise to the reader.</para>
	      
	  <para>The SCSI subsystem of FreeBSD recognizes devices with bad
	    habits by looking at the INQUIRY response they send when probed.
	    Because the INQUIRY response also includes the version number of
	    the device  firmware, it is even possible that for different
	    firmware versions different workarounds are used. See e.g.
	    <filename>/sys/scsi/st.c</filename> and
	    <filename>/sys/scsi/scsiconf.c</filename> for more info on how
	    this is done.</para>
	      
	  <para>This scheme works fine, but keep in mind that it of course
	    only works for devices that are known to be weird.  If you are the
	    first to connect your bogus Mumbletech SCSI CD-ROM you might be
	    the one that has to define which workaround is needed.</para>
	      
	  <para>After you got your Mumbletech working, please send the
	    required workaround to the FreeBSD development team for inclusion
	    in the next release of FreeBSD.  Other Mumbletech owners will be
	    grateful  to you.</para>
	</sect4>

	<sect4>
	  <title>Multiple LUN devices</title>
	  
	  <para>In some cases you come across devices that use multiple
	    logical units (LUNs) on a single SCSI ID.  In most cases FreeBSD
	    only probes devices for LUN 0.  An example are so called bridge
	    boards that connect 2 non-SCSI harddisks to a SCSI bus (e.g. an
	    Emulex MD21 found in old Sun systems).</para>
	      
	  <para>This means that any devices with LUNs != 0 are not normally
	    found during device probe on system boot.  To work around this
	    problem you must add an appropriate entry in /sys/scsi/scsiconf.c
	    and rebuild your kernel.</para>
	      
	  <para>Look for a struct that is initialized like below:</para>

	  <programlisting>
{
        T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A",
        "mx1", SC_ONE_LU
}</programlisting>
	      
	  <para>For you Mumbletech BRIDGE2000 that has more than one LUN, acts
	    as a SCSI disk and has firmware revision 123 you would add
	    something like:</para>
	      
	  <programlisting>
{
        T_DIRECT, T_FIXED, "MUMBLETECH", "BRIDGE2000", "123",
        "sd", SC_MORE_LUS
}</programlisting>
	      
	  <para>The kernel on boot scans the inquiry data it receives against
	    the table and acts accordingly.  See the source for more
	    info.</para>
	</sect4>

	<sect4>
	  <title>Tagged command queueing</title>
	  
	  <para>Modern SCSI devices, particularly magnetic disks,
	    support what is called tagged command queuing (TCQ).</para>
	  
	  <para>In a nutshell, TCQ allows the device to have multiple I/O
	    requests outstanding at the same time.  Because the device is
	    intelligent, it can optimise its operations (like head
	    positioning) based on its own request queue.  On  SCSI devices
	    like RAID (Redundant Array of Independent Disks) arrays the TCQ
	    function is indispensable to take advantage of the device's
	    inherent parallelism.</para>
	      
	  <para>Each I/O request is uniquely identified by a <quote>tag</quote>
	    (hence the name tagged command queuing) and this tag is used by
	    FreeBSD to see which I/O in the device drivers queue is reported
	    as complete by the device.</para>
	      
	  <para>It should be noted however that TCQ requires device driver
	    support and that some devices implemented it <quote>not quite
	    right</quote> in their firmware.  This problem bit me once, and it
	    leads to highly mysterious problems.  In such cases, try to
	    disable TCQ.</para>
	</sect4>

	<sect4>
	  <title>Busmaster host adapters</title>
	  
	  <para>Most, but not all, SCSI host adapters are bus mastering
	    controllers.  This means that they can do I/O on their own without
	    putting load onto the host CPU for data movement.</para>
	      
	  <para>This is of course an advantage for a multitasking operating
	    system like FreeBSD.  It must be noted however that there might be
	    some rough edges.</para>
	      
	  <para>For instance an Adaptec 1542 controller can be set to use
	    different transfer speeds on the host bus (ISA or AT in this
	    case).  The controller is settable to different rates because not
	    all motherboards can handle the higher speeds.  Problems like
	    hangups, bad data etc might be the result of using a higher data
	    transfer rate then your motherboard can stomach.</para>
	      
	  <para>The solution is of course obvious: switch to a lower data
	    transfer rate and try if that works better.</para>
	      
	  <para>In the case of a Adaptec 1542, there is an option that can be
	    put into the kernel config file to allow dynamic determination of
	    the right, read: fastest feasible, transfer rate.  This option is
	    disabled by default:</para>
	      
	  <programlisting>
options        "TUNE_1542"             #dynamic tune of bus DMA speed</programlisting>
	      
	  <para>Check the man pages for the host adapter that you use.  Or
	    better still, use the ultimate documentation (read: driver
	    source).</para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>Tracking down problems</title>

	<para>The following list is an attempt to give a guideline for the
	  most common SCSI problems and their solutions.  It is by no means
	  complete.</para>
	    
	<itemizedlist>
	  <listitem>
	    <para>Check for loose connectors and cables.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Check and double check the location and number of your
	      terminators.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Check if your bus has at least one supplier of terminator
	      power (especially with external terminators.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Check if no double target IDs are used.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Check if all devices to be used are powered up.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Make a minimal bus config with as little devices as
	      possible.</para>
	  </listitem>
	  
	  <listitem>
	    <para>If possible, configure your host adapter to use slow bus
	      speeds.</para>
	  </listitem>
	  
	  <listitem>
	    <para>Disable tagged command queuing to make things as simple as
	      possible (for a NCR hostadapter based system see man
	      ncrcontrol)</para>
	  </listitem>
	  
	  <listitem>
	    <para>If you can compile a kernel, make one with the
	      <literal>SCSIDEBUG</literal> option, and try accessing the
	      device with debugging turned on for that device.  If your device
	      does not even probe at startup, you may have to define the
	      address of the device that is failing, and the desired debug
	      level in <filename>/sys/scsi/scsidebug.h</filename>. If it
	      probes but just does not work, you can use the
		    &man.scsi.8; command to dynamically set a debug level to
	      it in a running kernel (if <literal>SCSIDEBUG</literal> is
	      defined).  This will give you <emphasis>copious</emphasis>
	      debugging output with which to confuse the gurus. See
	      <command>man 4 scsi</command> for more exact information.  Also
	      look at <command>man 8 scsi</command>.</para>
	  </listitem>
	</itemizedlist>
      </sect3>
      
      <sect3 id="scsi-further-reading">
	<title>Further reading</title>

	<para>If you intend to do some serious SCSI hacking, you might want to
	  have the official standard at hand:</para>
	    
	<para>Approved American National Standards can be purchased from
	  ANSI at
	  
	  <address>
	    <otheraddr>13th Floor</otheraddr>
	    <street>11 West 42nd Street</street>
	    <city>New York</city>
	    <state>NY</state> <postcode>10036</postcode>
	    Sales Dept: <phone>(212) 642-4900</phone>
	  </address>
	</para>

	<para>You can also buy many ANSI
	  standards and most committee draft documents from Global
	  Engineering Documents,

	  <address>
	    <street>15 Inverness Way East</street>
	    <city>Englewood</city>
	    <state>CO</state>, <postcode>80112-5704</postcode>
	    Phone: <phone>(800) 854-7179</phone>
	    Outside USA and Canada: <phone>(303) 792-2181</phone>
	    Fax: <fax>(303) 792- 2192</fax>
	  </address>
	</para>

	<para>Many X3T10 draft documents are available electronically on the
	  SCSI BBS (719-574-0424) and on the <hostid
	    role="fqdn">ncrinfo.ncr.com</hostid> anonymous ftp site.</para>
	    
	<para>Latest X3T10 committee documents are:</para>

	<itemizedlist>
	  <listitem>
	    <para>AT Attachment (ATA or IDE) [X3.221-1994]
	      (<emphasis>Approved</emphasis>)</para>
	  </listitem>
	  
	  <listitem>
	    <para>ATA Extensions (ATA-2) [X3T10/948D Rev 2i]</para>
	  </listitem>
	  
	  <listitem>
	    <para>Enhanced Small Device Interface (ESDI)
	      [X3.170-1990/X3.170a-1991]
	      (<emphasis>Approved</emphasis>)</para>
	  </listitem>
	  
	  <listitem>
	    <para>Small Computer System Interface &mdash; 2 (SCSI-2)
	      [X3.131-1994] (<emphasis>Approved</emphasis>)</para>
	  </listitem>
	  
	  <listitem>
	    <para>SCSI-2 Common Access Method Transport and SCSI Interface
	      Module (CAM)  [X3T10/792D Rev 11]</para>
	  </listitem>
	</itemizedlist>

	<para>Other publications that might provide you with additional
	  information are:</para>

	<itemizedlist>
	  <listitem>
	    <para><quote>SCSI: Understanding the Small Computer System
	      Interface</quote>, written by NCR  Corporation.  Available from:
	      Prentice Hall, Englewood Cliffs, NJ, 07632 Phone: (201) 767-5937
	      ISBN 0-13-796855-8</para>
	  </listitem>
	  
	  <listitem>
	    <para><quote>Basics of SCSI</quote>, a SCSI tutorial written by
	      Ancot Corporation Contact Ancot for availability information at:
	      Phone: (415) 322-5322  Fax: (415) 322-0455</para>
	  </listitem>
	  
	  <listitem>
	    <para><quote>SCSI Interconnection Guide Book</quote>, an AMP
	      publication (dated 4/93, Catalog  65237) that lists the various
	      SCSI connectors and suggests cabling schemes.  Available from
	      AMP at (800) 522-6752 or (717) 564-0100</para>
	  </listitem>
	  
	  <listitem>
	    <para><quote>Fast Track to SCSI</quote>, A Product Guide written by
	      Fujitsu.  Available from: Prentice Hall, Englewood Cliffs, NJ,
	      07632 Phone: (201) 767-5937 ISBN 0-13-307000-X</para>
	  </listitem>
	  
	  <listitem>
	    <para><quote>The SCSI Bench Reference</quote>, <quote>The SCSI
	      Encyclopedia</quote>, and the <quote>SCSI Tutor</quote>, ENDL
	      Publications, 14426 Black Walnut Court, Saratoga CA, 95070
	      Phone: (408) 867-6642</para>
	  </listitem>
	  
	  <listitem>
	    <para><quote>Zadian SCSI Navigator</quote> (quick ref. book) and
	      <quote>Discover the Power of SCSI</quote>  (First book along with
	      a one-hour video and tutorial book), Zadian Software, Suite 214,
	      1210 S. Bascom Ave., San Jose, CA 92128, (408) 293-0800</para>
	  </listitem>
	</itemizedlist>

	<para>On Usenet the newsgroups <ulink
	    url="news:comp.periphs.scsi">comp.periphs.scsi</ulink> and <ulink
	    url="news:comp.periphs">comp.periphs</ulink> are noteworthy places
	  to look for more info.  You can also find the SCSI-Faq there, which
	  is posted periodically.</para>

	<para>Most major SCSI device and host adapter suppliers operate ftp
	  sites and/or BBS systems.  They may be valuable sources of
	  information about the devices you own.</para>
      </sect3>
    </sect2>
    
    <sect2 id="hw-storage-controllers">
      <title>* Disk/tape controllers</title>
      
      <sect3>
	<title>* SCSI</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>* IDE</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>* Floppy</title>

	<para></para>
      </sect3>
    </sect2>
    
    <sect2>
      <title>Hard drives</title>
      
      <sect3>
	<title>SCSI hard drives</title>

	<para><emphasis>Contributed by &a.asami;.  17 February
	    1998.</emphasis></para>
	    
	<para>As mentioned in the <link linkend="scsi">SCSI</link> section,
	  virtually all SCSI hard drives sold today are SCSI-2 compliant and
	  thus will work fine as long as you connect them to a supported SCSI
	  host adapter.  Most problems people encounter are either due to
	  badly designed cabling (cable too long, star topology, etc.),
	  insufficient termination, or defective parts. Please refer to the
	  <link linkend="scsi">SCSI</link> section first if your SCSI hard
	  drive is not working.  However, there are a couple of things you may
	  want to take into account before you purchase SCSI hard drives for
	  your system.</para>

	<sect4>
	  <title>Rotational speed</title>
	  
	  <para>Rotational speeds of SCSI drives sold today range from around
	    4,500RPM to 10,000RPM.  Most of them are either 5,400RPM or
	    7,200RPM.  Even though the 7,200RPM drives can generally transfer
	    data faster, they run considerably hotter than their 5,400RPM
	    counterparts.  A large fraction of today's disk drive malfunctions
	    are heat-related.  If you do not have very good cooling in your PC
	    case, you may want to stick with 5,400RPM or slower drives.</para>
	      
	  <para>Note that newer drives, with higher areal recording densities,
	    can deliver much more bits per rotation than older ones.  Today's
	    top-of-line 5,400RPM drives can sustain a throughput comparable to
	    7,200RPM drives of one or two model generations ago.  The number
	    to find on the spec sheet for bandwidth is <quote>internal data
	    (or transfer) rate</quote>.  It is usually in megabits/sec so
	    divide it by 8 and you'll get the rough approximation of how much
	    megabytes/sec you can get out of the drive.</para>
	      
	  <para>(If you are a speed maniac and want a 10,000RPM drive for your
	    cute little peecee, be my guest; however, those drives become
	    extremely hot.  Don't even think about it if you don't have a fan
	    blowing air <emphasis>directly at</emphasis> the drive or a
	    properly ventilated disk enclosure.)</para>
	      
	  <para>Obviously, the latest 10,000RPM drives and 7,200RPM drives can
	    deliver more data than the latest 5,400RPM drives, so if absolute
	    bandwidth is the necessity for your applications, you have little
	    choice but to get the faster drives.  Also, if you need low
	    latency, faster drives are better; not only do they usually have
	    lower average seek times, but also the rotational delay is one
	    place where slow-spinning drives can never beat a faster one.
	    (The average rotational latency is half the time it takes to
	    rotate the drive once; thus, it's 3 milliseconds for 10,000RPM
	    drives, 4.2ms for 7,200RPM drives and 5.6ms for 5,400RPM drives.)
	    Latency is seek time plus rotational delay. Make sure you
	    understand whether you need low latency or more accesses per
	    second, though; in the latter case (e.g., news servers), it may
	    not be optimal to purchase one big fast drive.  You can achieve
	    similar or even better results by using the ccd (concatenated
	    disk) driver to create a striped disk array out of multiple slower
	    drives for comparable overall cost.</para>
	      
	  <para>Make sure you have adequate air flow around the drive,
	    especially if you are going to use a fast-spinning drive.  You
	    generally need at least 1/2" (1.25cm) of spacing above and below a
	    drive.  Understand how the air flows through your PC case.  Most
	    cases have the power supply suck the air out of the back.  See
	    where the air flows in, and put the drive where it will have the
	    largest volume of cool air flowing around it. You may need to seal
	    some unwanted holes or add a new fan for effective cooling.</para>
	      
	  <para>Another consideration is noise.  Many 7,200 or faster drives
	    generate a high-pitched whine which is quite unpleasant to most
	    people.  That, plus the extra fans often required for cooling, may
	    make 7,200 or faster drives unsuitable for some office and home
	    environments.</para>
	</sect4>

	<sect4>
	  <title>Form factor</title>
	  
	  <para>Most SCSI drives sold today are of 3.5" form factor.  They
	    come in two different heights; 1.6" (<quote>half-height</quote>) or
	    1" (<quote>low-profile</quote>).  The half-height drive is the same
	    height as a CD-ROM drive.  However, don't forget the spacing rule
	    mentioned in the previous section.  If you have three standard
	    3.5" drive bays, you will not be able to put three half-height
	    drives in there (without frying them, that is).</para>
	</sect4>

	<sect4>
	  <title>Interface</title>
	  
	  <para>The majority of SCSI hard drives sold today are Ultra or
	    Ultra-wide SCSI.  The maximum bandwidth of Ultra SCSI is 20MB/sec,
	    and Ultra-wide SCSI is 40MB/sec.  There is no difference in max
	    cable length between Ultra and Ultra-wide; however, the more
	    devices you have on the same bus, the sooner you will start having
	    bus integrity problems.  Unless you have a well-designed disk
	    enclosure, it is not easy to make more than 5 or 6 Ultra SCSI
	    drives work on a single bus.</para>
	      
	  <para>On the other hand, if you need to connect many drives, going
	    for Fast-wide SCSI may not be a bad idea.  That will have the same
	    max bandwidth as Ultra (narrow) SCSI, while electronically it's
	    much easier to get it <quote>right</quote>.  My advice would be: if
	    you want to connect many disks, get wide SCSI drives; they usually
	    cost a little more but it may save you down the road.  (Besides,
	    if you can't afford the cost difference, you shouldn't be building
	    a disk array.)</para>
	      
	  <para>There are two variant of wide SCSI drives; 68-pin and 80-pin
	    SCA (Single Connector Attach).  The SCA drives don't have a
	    separate 4-pin power connector, and also read the SCSI ID settings
	    through the 80-pin connector.  If you are really serious about
	    building a large storage system, get SCA drives and a good SCA
	    enclosure (dual power supply with at least one extra fan).  They
	    are more electronically sound than 68-pin counterparts because
	    there is no <quote>stub</quote> of the SCSI bus inside the disk
	    canister as in arrays built from 68-pin drives.  They are easier
	    to install too (you just need to screw the drive in the canister,
	    instead of trying to squeeze in your fingers in a tight place to
	    hook up all the little cables (like the SCSI ID and disk activity
	    LED lines).</para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>* IDE hard drives</title>

	<para></para>
      </sect3>
    </sect2>
    
    <sect2>
      <title>Tape drives</title>
      
      <para><emphasis>Contributed by &a.jmb;.  2 July
	  1996.</emphasis></para>
      
      <sect3>
	<title>General tape access commands</title>

	<para>&man.mt.1; provides generic access to the tape drives.  Some of
	  the more common commands are <command>rewind</command>,
	  <command>erase</command>, and <command>status</command>.  See the
	    &man.mt.1; manual page for a detailed description.</para>
      </sect3>
      
      <sect3>
	<title>Controller Interfaces</title>

	<para>There are several different interfaces that support tape drives.
	  The interfaces are SCSI, IDE, Floppy and Parallel Port. A wide
	  variety of tape drives are available for these interfaces.
	  Controllers are discussed in <link
	    linkend="hw-storage-controllers">Disk/tape
	    controllers</link>.</para>
      </sect3>
      
      <sect3>
	<title>SCSI drives</title>

	<para>The &man.st.4; driver provides support for 8mm (Exabyte), 4mm
	  (DAT: Digital Audio Tape), QIC (Quarter-Inch Cartridge), DLT
	  (Digital Linear Tape), QIC Minicartridge and 9-track (remember the
	  big reels that you see spinning in Hollywood computer rooms) tape
	  drives.  See the &man.st.4; manual page for a detailed
	  description.</para>

	<para>The drives listed below are currently being used by members of
	  the FreeBSD community.  They are not the only drives that will work
	  with FreeBSD.  They just happen to be the ones that we use.</para>

	<sect4>
	  <title>4mm (DAT: Digital Audio Tape)</title>
	  
	  <para><link linkend="hw-storage-python-28454">Archive Python
	      28454</link></para>

	  <para><link linkend="hw-storage-python-04687">Archive Python
	      04687</link></para>
	  
	  <para><link linkend="hw-storage-hp1533a">HP C1533A</link></para>
	      
	  <para><link linkend="hw-storage-hp1534a">HP C1534A</link></para>
	      
	  <para><link linkend="hw-storage-hp35450a">HP 35450A</link></para>
	      
	  <para><link linkend="hw-storage-hp35470a">HP 35470A</link></para>
	      
	  <para><link linkend="hw-storage-hp35480a">HP 35480A</link></para>
	      
	  <para><link linkend="hw-storage-sdt5000">SDT-5000</link></para>
	      
	  <para><link linkend="hw-storage-wangtek6200">Wangtek
	      6200</link></para>
	</sect4>

	<sect4>
	  <title>8mm (Exabyte)</title>
	  
	  <para><link linkend="hw-storage-exb8200">EXB-8200</link></para>
	  
	  <para><link linkend="hw-storage-exb8500">EXB-8500</link></para>
	  
	  <para><link linkend="hw-storage-exb8505">EXB-8505</link></para>
	</sect4>

	<sect4>
	  <title>QIC (Quarter-Inch Cartridge)</title>
	  
	  <para><link linkend="hw-storage-anaconda">Archive Ananconda
	      2750</link></para>
	      
	  <para><link linkend="hw-storage-viper60">Archive Viper
	      60</link></para>
	      
	  <para><link linkend="hw-storage-viper150">Archive Viper
	      150</link></para>
	      
	  <para><link linkend="hw-storage-viper2525">Archive Viper
	      2525</link></para>
	      
	  <para><link linkend="hw-storage-tandberg3600">Tandberg TDC
	      3600</link></para>

	  <para><link linkend="hw-storage-tandberg3620">Tandberg TDC
	      3620</link></para>
	    
	  <para><link linkend="hw-storage-tandberg3800">Tandberg TDC
	      3800</link></para>
	      
	  <para><link linkend="hw-storage-tandberg4222">Tandberg TDC
	      4222</link></para>
	      
	  <para><link linkend="hw-storage-wangtek5525es">Wangtek
	      5525ES</link></para>
	</sect4>

	<sect4>
	  <title>DLT (Digital Linear Tape)</title>
	  
	  <para><link linkend="hw-storage-dectz87">Digital TZ87</link></para>
	</sect4>

	<sect4>
	  <title>Mini-Cartridge</title>
	  
	  <para><link linkend="hw-storage-ctms3200">Conner CTMS
	      3200</link></para>
	      
	  <para><link linkend="hw-storage-exb2501">Exabyte 2501</link></para>
	</sect4>

	<sect4>
	  <title>Autoloaders/Changers</title>
	  
	  <para><link linkend="hw-storage-hp1553a">Hewlett-Packard HP C1553A
	      Autoloading DDS2</link></para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>* IDE drives</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>Floppy drives</title>

	<para><link linkend="hw-storage-conner420r">Conner 420R</link></para>
      </sect3>
      
      <sect3>
	<title>* Parallel port drives</title>

	<para></para>
      </sect3>
      
      <sect3>
	<title>Detailed Information</title>

	<sect4 id="hw-storage-anaconda">
	  <title>Archive Anaconda 2750</title>
	  
	  <para>The boot message identifier for this drive is <literal>ARCHIVE
	      ANCDA 2750 28077 -003 type 1 removable SCSI 2</literal></para>
	  
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 1.35GB when using QIC-1350 tapes.  This
	    drive will read and write QIC-150 (DC6150), QIC-250 (DC6250), and
	    QIC-525 (DC6525) tapes as well.</para>
	      
	  <para>Data transfer rate is 350kB/s using
		&man.dump.8;.  Rates of 530kB/s have been reported when using
	    <link linkend="backups-programs-amanda">Amanda</link></para>

	  <para>Production of this drive has been discontinued.</para>
	  
	  <para>The SCSI bus connector on this tape drive is reversed from
	    that on most other SCSI devices.  Make sure that you have enough
	    SCSI cable to twist the cable one-half turn before and after the
	    Archive Anaconda tape drive, or turn your other SCSI devices
	    upside-down.</para>
	  
	  <para>Two kernel code changes are required to use this drive. This
	    drive will not work as delivered.</para>
	      
	  <para>If you have a SCSI-2 controller, short jumper 6. Otherwise,
	    the drive behaves are a SCSI-1 device.  When operating as a SCSI-1
	    device, this drive, <quote>locks</quote> the SCSI bus during some
	    tape operations, including: fsf, rewind, and rewoffl.</para>
	      
	  <para>If you are using the NCR SCSI controllers, patch the file
	    <filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
	    Build and install a new kernel.</para>
	      
	  <programlisting>
*** 4831,4835 ****
                };
        
!               if (np-&gt;latetime&gt;4) {
                        /*
                        **      Although we tried to wake it up,
--- 4831,4836 ----
                };

!               if (np-&gt;latetime&gt;1200) {
                        /*
                        **      Although we tried to wake it up,</programlisting>
	      
	  <para>Reported by: &a.jmb;</para>
	</sect4>

	<sect4 id="hw-storage-python-28454">
	  <title>Archive Python 28454</title>
	  
	  <para>The boot message identifier for this drive is <literal>ARCHIVE
	      Python 28454-XXX4ASB</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>density code 0x8c, 512-byte
	      blocks</literal></para>
	      
	  <para>This is a DDS-1 tape drive.</para>
	      
	  <para>Native capacity is 2.5GB on 90m tapes.</para>
	  
	  <para>Data transfer rate is XXX.</para>
	  
	  <para>This drive was repackaged by Sun Microsystems as model
	    595-3067.</para>
	      
	  <para>Reported by: Bob Bishop <email>rb@gid.co.uk</email></para>
	  
	  <para>Throughput is in the 1.5 MByte/sec range, however this will
	    drop if the disks and tape drive are on the same SCSI
	    controller.</para>

	  <para>Reported by: Robert E. Seastrom
	    <email>rs@seastrom.com</email></para>
	</sect4>

	<sect4 id="hw-storage-python-04687">
	  <title>Archive Python 04687</title>

	  <para>The boot message identifier for this drive is <literal>ARCHIVE 
	      Python 04687-XXX 6580</literal> <literal>Removable Sequential
	      Access SCSI-2 device</literal></para>

	  <para>This is a DAT-DDS-2 drive.</para>

	  <para>Native capacity is 4GB when using 120m tapes.</para>

	  <para>This drive supports hardware data compression.  Switch 4
	    controls MRS (Media Recognition System).  MRS tapes have stripes
	    on the transparent leader.  Switch 4 <emphasis>off</emphasis>
	    enables MRS, <emphasis>on</emphasis> disables MRS.</para>

	  <para>Parity is controlled by switch 5.  Switch 5
	    <emphasis>on</emphasis> to enable parity control.  Compression is
	    enabled with Switch 6 <emphasis>off</emphasis>.  It is possible to 
	    override compression with the <literal>SCSI MODE SELECT</literal>
	    command (see &man.mt.1;).</para>

	  <para>Data transfer rate is 800kB/s.</para>
	</sect4>

	<sect4 id="hw-storage-viper60">
	  <title>Archive Viper 60</title>
	  
	  <para>The boot message identifier for this drive is <literal>ARCHIVE
	      VIPER 60 21116 -007</literal> <literal>type 1 removable SCSI
	      1</literal></para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 60MB.</para>
	  
	  <para>Data transfer rate is XXX.</para>
	  
	  <para>Production of this drive has been discontinued.</para>
	  
	  <para>Reported by: Philippe Regnauld
	    <email>regnauld@hsc.fr</email></para>
	</sect4>

	<sect4 id="hw-storage-viper150">
	  <title>Archive Viper 150</title>
	  
	  <para>The boot message identifier for this drive is <literal>ARCHIVE
	      VIPER 150 21531 -004</literal> <literal>Archive Viper 150 is a
	      known rogue</literal> <literal>type 1 removable SCSI
	      1</literal>.  A multitude of firmware revisions exist for this
	    drive.  Your drive may report different numbers (e.g
	    <literal>21247 -005</literal>.</para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 150/250MB.  Both 150MB (DC6150) and 250MB
	    (DC6250) tapes have the recording format.  The 250MB tapes are
	    approximately 67% longer than the 150MB tapes.  This drive can
	    read 120MB tapes as well.  It can not write 120MB tapes.</para>
	      
	  <para>Data transfer rate is 100kB/s</para>
	  
	  <para>This drive reads and writes DC6150 (150MB) and DC6250 (250MB)
	    tapes.</para>
	      
	  <para>This drives quirks are known and pre-compiled into the scsi
	    tape device driver (&man.st.4;).</para>
	      
	  <para>Under FreeBSD 2.2-current, use <command>mt blocksize
	      512</command> to set the blocksize.  (The particular drive had
	    firmware revision 21247 -005.  Other firmware revisions may behave
	    differently) Previous versions of FreeBSD did not have this
	    problem.</para>
	      
	  <para>Production of this drive has been discontinued.</para>
	  
	  <para>Reported by: Pedro A M Vazquez
	    <email>vazquez@IQM.Unicamp.BR</email></para>
	  
	  <para>Mike Smith
	    <email>msmith@atrad.adelaide.edu.au</email></para>
	</sect4>
	    
	<sect4 id="hw-storage-viper2525">
	  <title>Archive Viper 2525</title>
	  
	  <para>The boot message identifier for this drive is <literal>ARCHIVE
	      VIPER 2525 25462 -011</literal> <literal>type 1 removable SCSI
	      1</literal></para>
	  
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 525MB.</para>
	  
	  <para>Data transfer rate is 180kB/s at 90 inches/sec.</para>
	  
	  <para>The drive reads QIC-525, QIC-150, QIC-120 and QIC-24 tapes.
	    Writes QIC-525, QIC-150, and QIC-120.</para>
	      
	  <para>Firmware revisions prior to <literal>25462 -011</literal> are
	    bug ridden and will not function properly.</para>
	  
	  <para>Production of this drive has been discontinued.</para>
	</sect4>

	<sect4 id="hw-storage-conner420r">
	  <title>Conner 420R</title>
	  
	  <para>The boot message identifier for this drive is <literal>Conner
	      tape</literal>.</para>
	      
	  <para>This is a floppy controller, minicartridge tape drive.</para>
	      
	  <para>Native capacity is XXXX</para>
	  
	  <para>Data transfer rate is XXX</para>
	  
	  <para>The drive uses QIC-80 tape cartridges.</para>
	  
	  <para>Reported by: Mark Hannon
	    <email>mark@seeware.DIALix.oz.au</email></para>
	</sect4>

	<sect4 id="hw-storage-ctms3200">
	  <title>Conner CTMS 3200</title>
	      
	  <para>The boot message identifier for this drive is <literal>CONNER
	      CTMS 3200 7.00</literal> <literal>type 1 removable SCSI
	      2</literal>.</para>
	      
	  <para>This is a minicartridge tape drive.</para>
	  
	  <para>Native capacity is XXXX</para>
	  
	  <para>Data transfer rate is XXX</para>
	  
	  <para>The drive uses QIC-3080 tape cartridges.</para>
	  
	  <para>Reported by: Thomas S. Traylor
	    <email>tst@titan.cs.mci.com</email></para>
	</sect4>

	<sect4 id="hw-storage-dectz87">
	  <title><ulink
	      url="http://www.digital.com/info/Customer-Update/931206004.txt.html">DEC TZ87</ulink></title>
	  
	  <para>The boot message identifier for this drive is <literal>DEC
	      TZ87 (C) DEC 9206</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>density code 0x19</literal></para>
	      
	  <para>This is a DLT tape drive.</para>
	  
	  <para>Native capacity is 10GB.</para>
	  
	  <para>This drive supports hardware data compression.</para>
	  
	  <para>Data transfer rate is 1.2MB/s.</para>
	  
	  <para>This drive is identical to the Quantum DLT2000.  The drive
	    firmware can be set to emulate several well-known drives,
	    including an Exabyte 8mm drive.</para>
	      
	  <para>Reported by: &a.wilko;</para>
	</sect4>

	<sect4 id="hw-storage-exb2501">
	  <title><ulink
	      url="http://www.Exabyte.COM:80/Products/Minicartridge/2501/Rfeatures.html">Exabyte EXB-2501</ulink></title>
	      
	  <para>The boot message identifier for this drive is <literal>EXABYTE
	      EXB-2501</literal></para>
	      
	  <para>This is a mini-cartridge tape drive.</para>
	      
	  <para>Native capacity is 1GB when using MC3000XL
	    minicartridges.</para>
	      
	  <para>Data transfer rate is XXX</para>
	  
	  <para>This drive can read and write DC2300 (550MB), DC2750 (750MB),
	    MC3000 (750MB), and MC3000XL (1GB) minicartridges.</para>
	      
	  <para>WARNING: This drive does not meet the SCSI-2 specifications.
	    The drive locks up completely in response to a SCSI MODE_SELECT
	    command unless there is a formatted tape in the drive.  Before
	    using this drive, set the tape blocksize with</para>
	      
	  <screen>&prompt.root; <userinput>mt -f /dev/st0ctl.0 blocksize 1024</userinput></screen>
	      
	  <para>Before using a minicartridge for the first time, the
	    minicartridge must be formated.  FreeBSD 2.1.0-RELEASE and
	    earlier:</para>
	      
	  <screen>&prompt.root; <userinput>/sbin/scsi -f /dev/rst0.ctl -s 600 -c "4 0 0 0 0 0"</userinput></screen>
	      
	  <para>(Alternatively, fetch a copy of the
	    <command>scsiformat</command> shell script from FreeBSD
	    2.1.5/2.2.) FreeBSD 2.1.5 and later:</para>
	      
	  <screen>&prompt.root; <userinput>/sbin/scsiformat -q -w /dev/rst0.ctl</userinput></screen>
	      
	  <para>Right now, this drive cannot really be recommended for
	    FreeBSD.</para>
	      
	  <para>Reported by: Bob Beaulieu
	    <email>ez@eztravel.com</email></para>
	</sect4>

	<sect4 id="hw-storage-exb8200">
	  <title>Exabyte EXB-8200</title>
	  
	  <para>The boot message identifier for this drive is <literal>EXABYTE
	      EXB-8200 252X</literal> <literal>type 1 removable SCSI
	      1</literal></para>
	      
	  <para>This is an 8mm tape drive.</para>
	  
	  <para>Native capacity is 2.3GB.</para>
	  
	  <para>Data transfer rate is 270kB/s.</para>
	  
	  <para>This drive is fairly slow in responding to the SCSI bus during
	    boot.  A custom kernel may be required (set SCSI_DELAY to 10
	    seconds).</para>
	  
	  <para>There are a large number of firmware configurations for this
	    drive, some have been customized to a particular vendor's
	    hardware.  The firmware can be changed via EPROM
	    replacement.</para>
	      
	  <para>Production of this drive has been discontinued.</para>
	  
	  <para>Reported by: Mike Smith
	    <email>msmith@atrad.adelaide.edu.au</email></para>
	</sect4>

	<sect4 id="hw-storage-exb8500">
	  <title>Exabyte EXB-8500</title>
	  
	  <para>The boot message identifier for this drive is <literal>EXABYTE
	      EXB-8500-85Qanx0 0415</literal> <literal>type 1 removable SCSI
	      2</literal></para>
	      
	  <para>This is an 8mm tape drive.</para>
	  
	  <para>Native capacity is 5GB.</para>
	  
	  <para>Data transfer rate is 300kB/s.</para>
	      
	  <para>Reported by: Greg Lehey <email>grog@lemis.de</email></para>
	</sect4>

	<sect4 id="hw-storage-exb8505">
	  <title><ulink
	      url="http://www.Exabyte.COM:80/Products/8mm/8505XL/Rfeatures.html">Exabyte EXB-8505</ulink></title>
	      
	      <para>The boot message identifier for this drive is
	    <literal>EXABYTE EXB-85058SQANXR1 05B0</literal> <literal>type 1
	      removable SCSI 2</literal></para>
	      
	  <para>This is an 8mm tape drive which supports compression, and is
	    upward compatible with the EXB-5200 and EXB-8500.</para>
	  
	  <para>Native capacity is 5GB.</para>
	  
	  <para>The drive supports hardware data compression.</para>
	  
	  <para>Data transfer rate is 300kB/s.</para>
	  
	  <para>Reported by: Glen Foster
	    <email>gfoster@gfoster.com</email></para>
	</sect4>

	<sect4 id="hw-storage-hp1533a">
	  <title>Hewlett-Packard HP C1533A</title>
	  
	  <para>The boot message identifier for this drive is <literal>HP
	      C1533A 9503</literal> <literal>type 1 removable SCSI
	      2</literal>.</para>
	      
	  <para>This is a DDS-2 tape drive.  DDS-2 means hardware data
	    compression and narrower tracks for increased data
	    capacity.</para>
	  
	  <para>Native capacity is 4GB when using 120m tapes.  This drive
	    supports hardware data compression.</para>
	      
	  <para>Data transfer rate is 510kB/s.</para>
	  
	  <para>This drive is used in Hewlett-Packard's SureStore 6000eU and
	    6000i tape drives and C1533A DDS-2 DAT drive.</para>
	  
	  <para>The drive has a block of 8 dip switches.  The proper settings
	    for FreeBSD are: 1 ON; 2 ON; 3 OFF; 4 ON; 5 ON; 6 ON; 7 ON; 8
	    ON.</para>
	  
	  <informaltable frame="none">
	    <tgroup cols="3">
	      <thead>
		<row>
		  <entry>switch 1</entry>
		  <entry>switch 2</entry>
		  <entry>Result</entry>
		</row>
	      </thead>
	      
	      <tbody>
		<row>
		  <entry>On</entry>
		  <entry>On</entry>
		  <entry>Compression enabled at power-on, with host
		    control</entry>
		</row>
		
		<row>
		  <entry>On</entry>
		  <entry>Off</entry>
		  <entry>Compression enabled at power-on, no host
		    control</entry>
		</row>
		
		<row>
		  <entry>Off</entry>
		  <entry>On</entry>
		  <entry>Compression disabled at power-on, with host
		    control</entry>
		</row>
		
		<row>
		  <entry>Off</entry>
		  <entry>Off</entry>
		  <entry>Compression disabled at power-on, no host
		    control</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </informaltable>
	  
	  <para>Switch 3 controls MRS (Media Recognition System).  MRS tapes
	    have stripes on the transparent leader.  These identify the tape
	    as DDS (Digital Data Storage) grade media.  Tapes that do not have
	    the stripes will be treated as write-protected.  Switch 3 OFF
	    enables MRS.  Switch 3 ON disables MRS.</para>
	      
	      <para>See <ulink url="http://www.hp.com/tape/c_intro.html">HP
	      SureStore Tape Products</ulink> and <ulink
	      url="http://www.impediment.com/hp/hp_technical.html">Hewlett-Packard
	      Disk and Tape Technical Information</ulink> for more information
	    on configuring this drive.</para>
	      
	  <para><emphasis>Warning:</emphasis> Quality control on these drives
	    varies greatly.  One FreeBSD core-team member has returned 2 of
	    these drives.  Neither lasted more than 5 months.</para>
	      
	  <para>Reported by: &a.se;</para>
	</sect4>

	<sect4 id="hw-storage-hp1534a">
	  <title>Hewlett-Packard HP 1534A</title>
	  
	  <para>The boot message identifier for this drive is <literal>HP
	      HP35470A T503</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>Sequential-Access density code 0x13,
	      variable blocks</literal>.</para>
	      
	  <para>This is a DDS-1 tape drive.  DDS-1 is the original DAT tape
	    format.</para>
	      
	  <para>Native capacity is 2GB when using 90m tapes.</para>
	      
	  <para>Data transfer rate is 183kB/s.</para>
	  
	  <para>The same mechanism is used in Hewlett-Packard's SureStore
	    <ulink url="http://www.dmo.hp.com/tape/sst2000.htm">2000i</ulink>
	    tape drive, C35470A DDS format DAT drive, C1534A DDS format DAT
	    drive and HP C1536A DDS format DAT drive.</para>
	      
	  <para>The HP C1534A DDS format DAT drive has two indicator lights,
	    one green and one amber.  The green one indicates tape action:
	    slow flash during load, steady when loaded, fast flash during
	    read/write operations.  The amber one indicates warnings: slow
	    flash when cleaning is required or tape is nearing the end of its
	    useful life, steady indicates an hard fault.  (factory service
	    required?)</para>
	      
	  <para>Reported by Gary Crutcher
	    <email>gcrutchr@nightflight.com</email></para>
	</sect4>

	<sect4 id="hw-storage-hp1553a">
	  <title>Hewlett-Packard HP C1553A Autoloading DDS2</title>
	  
	  <para>The boot message identifier for this drive is "".</para>
	  
	  <para>This is a DDS-2 tape drive with a tape changer.  DDS-2 means
	    hardware data compression and narrower tracks for increased data
	    capacity.</para>
	      
	  <para>Native capacity is 24GB when using 120m tapes.  This drive
	    supports hardware data compression.</para>
	      
	  <para>Data transfer rate is 510kB/s (native).</para>
	      
	  <para>This drive is used in Hewlett-Packard's SureStore <ulink
	      url="http://www.dmo.hp.com/tape/sst12000.htm">12000e</ulink>
	    tape drive.</para>
	      
	  <para>The drive has two selectors on the rear panel.  The selector
	    closer to the fan is SCSI id.  The other selector should be set to
	    7.</para>
	      
	  <para>There are four internal switches.  These should be set: 1 ON;
	    2 ON; 3 ON; 4 OFF.</para>
	      
	  <para>At present the kernel drivers do not automatically change
	    tapes at the end of a volume.  This shell script can be used to
	    change tapes:</para>
	      
	  <programlisting>
#!/bin/sh
PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH

usage()
{
        echo "Usage: dds_changer [123456ne] raw-device-name
        echo "1..6 = Select cartridge"
        echo "next cartridge"
        echo "eject magazine"
        exit 2
}

if [ $# -ne 2 ] ; then
        usage
fi

cdb3=0
cdb4=0
cdb5=0

case $1 in
        [123456])
                cdb3=$1
                cdb4=1
                ;;
        n)
                ;;
        e)
                cdb5=0x80
                ;;
        ?)
                usage
                ;;
esac

scsi -f $2 -s 100 -c "1b 0 0 $cdb3 $cdb4 $cdb5"</programlisting>
	</sect4>

	<sect4 id="hw-storage-hp35450a">
	  <title>Hewlett-Packard HP 35450A</title>
	  
	  <para>The boot message identifier for this drive is <literal>HP
	      HP35450A -A C620</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>Sequential-Access density code
	      0x13</literal></para>
	      
	  <para>This is a DDS-1 tape drive.  DDS-1 is the original DAT tape
	    format.</para>
	      
	  <para>Native capacity is 1.2GB.</para>
	      
	  <para>Data transfer rate is 160kB/s.</para>
	  
	  <para>Reported by: mark thompson
	    <email>mark.a.thompson@pobox.com</email></para>
	</sect4>

	<sect4 id="hw-storage-hp35470a">
	  <title>Hewlett-Packard HP 35470A</title>
	  
	  <para>The boot message identifier for this drive is <literal>HP
	      HP35470A 9 09</literal> <literal>type 1 removable SCSI
	      2</literal></para>
	      
	  <para>This is a DDS-1 tape drive.  DDS-1 is the original DAT tape
	    format.</para>
	      
	  <para>Native capacity is 2GB when using 90m tapes.</para>
	      
	  <para>Data transfer rate is 183kB/s.</para>
	  
	  <para>The same mechanism is used in Hewlett-Packard's SureStore
	    <ulink url="http://www.dmo.hp.com/tape/sst2000.htm">2000i</ulink>
	    tape drive, C35470A DDS format DAT drive, C1534A DDS format DAT
	    drive, and HP C1536A DDS format DAT drive.</para>
	      
	  <para><emphasis>Warning:</emphasis> Quality control on these drives
	    varies greatly.  One FreeBSD core-team member has returned 5 of
	    these drives.  None lasted more than 9 months.</para>
	      
	  <para>Reported by: David Dawes
	    <email>dawes@rf900.physics.usyd.edu.au</email> (9 09)</para>
	      
	</sect4>

	<sect4 id="hw-storage-hp35480a">
	  <title>Hewlett-Packard HP 35480A</title>
	  
	  <para>The boot message identifier for this drive is <literal>HP
	      HP35480A 1009</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>Sequential-Access density code
	      0x13</literal>.</para>
	      
	  <para>This is a DDS-DC tape drive.  DDS-DC is DDS-1 with hardware
	    data compression.  DDS-1 is the original DAT tape format.</para>
	      
	  <para>Native capacity is 2GB when using 90m tapes.  It cannot handle
	    120m tapes.  This drive supports hardware data compression.
	    Please refer to the section on <link
	      linkend="hw-storage-hp1533a">HP C1533A</link> for the proper
	    switch settings.</para>
	      
	  <para>Data transfer rate is 183kB/s.</para>
	  
	  <para>This drive is used in Hewlett-Packard's SureStore <ulink
	      url="http://www.dmo.hp.com/tape/sst5000.htm">5000eU</ulink> and
	    <ulink url="http://www.dmo.hp.com/tape/sst5000.htm">5000i</ulink>
	    tape drives and C35480A DDS format DAT drive..</para>
	      
	  <para>This drive will occasionally hang during a tape eject
	    operation (<command>mt offline</command>). Pressing the front
	    panel button will eject the tape and bring the tape drive back to
	    life.</para>
	      
	  <para>WARNING: HP 35480-03110 only.  On at least two occasions this
	    tape drive when used with FreeBSD 2.1.0, an IBM Server 320 and an
	    2940W SCSI controller resulted in all SCSI disk partitions being
	    lost.  The problem has not be analyzed or resolved at this
	    time.</para>
	</sect4>

	<sect4 id="hw-storage-sdt5000">
	  <title><ulink
	      url="http://www.sel.sony.com/SEL/ccpg/storage/tape/t5000.html">Sony SDT-5000</ulink></title>
	      
	  <para>There are at least two significantly different models: one is
	    a DDS-1 and the other DDS-2.  The DDS-1 version is
	    <literal>SDT-5000 3.02</literal>.  The DDS-2 version is
	    <literal>SONY SDT-5000 327M</literal>. The DDS-2 version has a 1MB
	    cache.  This cache is able to keep the tape streaming in almost
	    any circumstances.</para>
	      
	  <para>The boot message identifier for this drive is <literal>SONY
	      SDT-5000 3.02</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>Sequential-Access density code
	      0x13</literal></para>
	      
	  <para>Native capacity is 4GB when using 120m tapes.  This drive
	    supports hardware data compression.</para>
	      
	  <para>Data transfer rate is depends upon the model or the drive. The
	    rate is 630kB/s for the <literal>SONY SDT-5000 327M</literal>
	    while compressing the data.  For the <literal>SONY SDT-5000
	      3.02</literal>, the data transfer rate is 225kB/s.</para>
	      
	  <para>In order to get this drive to stream, set the blocksize to 512
	    bytes (<command>mt blocksize 512</command>) reported by Kenneth
	    Merry ken@ulc199.residence.gatech.edu</para>
	      
	  <para><literal>SONY SDT-5000 327M</literal> information reported by
	    Charles Henrich henrich@msu.edu</para>
	      
	  <para>Reported by: &a.jmz;</para>
	</sect4>

	<sect4 id="hw-storage-tandberg3600">
	  <title>Tandberg TDC 3600</title>
	  
	  <para>The boot message identifier for this drive is
	    <literal>TANDBERG TDC 3600 =08:</literal> <literal>type 1
	      removable SCSI 2</literal></para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 150/250MB.</para>
	  
	  <para>This drive has quirks which are known and work around code is
	    present in the scsi tape device driver (&man.st.4;).
	    Upgrading the firmware to XXX version will fix the quirks and
	    provide SCSI 2 capabilities.</para>
	      
	  <para>Data transfer rate is 80kB/s.</para>
	  
	  <para>IBM and Emerald units will not work.  Replacing the firmware
	    EPROM of these units will solve the problem.</para>
	      
	  <para>Reported by: Michael Smith
	    <email>msmith@atrad.adelaide.edu.au</email></para>
	</sect4>

	<sect4 id="hw-storage-tandberg3620">
	  <title>Tandberg TDC 3620</title>
	  
	  <para>This is very similar to the <link
	      linkend="hw-storage-tandberg3600">Tandberg TDC 3600</link>
	    drive.</para>
	      
	  <para>Reported by: &a.joerg;</para>
	</sect4>

	<sect4 id="hw-storage-tandberg3800">
	  <title>Tandberg TDC 3800</title>

	  <para>The boot message identifier for this drive is
	    <literal>TANDBERG TDC 3800 =04Y</literal> <literal>Removable
	      Sequential Access SCSI-2 device</literal></para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 525MB.</para>
	  
	  <para>Reported by: &a.jhs;</para>
	</sect4>

	<sect4 id="hw-storage-tandberg4222">
	  <title>Tandberg TDC 4222</title>
	  
	  <para>The boot message identifier for this drive is
	    <literal>TANDBERG TDC 4222 =07</literal> <literal>type 1 removable
	      SCSI 2</literal></para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 2.5GB.  The drive will read all cartridges
	    from the 60 MB (DC600A) upwards, and write 150 MB (DC6150)
	    upwards.  Hardware compression is optionally supported for the 2.5
	    GB cartridges.</para>
	      
	  <para>This drives quirks are known and pre-compiled into the scsi
	    tape device driver (&man.st.4;) beginning with FreeBSD
	    2.2-current.  For previous versions of FreeBSD, use
	    <command>mt</command> to read one block from the tape, rewind the
	    tape, and then execute the backup program (<command>mt fsr 1; mt
	      rewind; dump ...</command>)</para>
	      
	  <para>Data transfer rate is 600kB/s (vendor claim with compression),
	    350 KB/s can even be reached in start/stop mode. The rate
	    decreases for smaller cartridges.</para>
	  
	  <para>Reported by: &a.joerg;</para>
	</sect4>

	<sect4 id="hw-storage-wangtek5525es">
	  <title>Wangtek 5525ES</title>
	  
	  <para>The boot message identifier for this drive is <literal>WANGTEK
	      5525ES SCSI REV7 3R1</literal> <literal>type 1 removable SCSI
	      1</literal> <literal>density code 0x11, 1024-byte
	      blocks</literal></para>
	      
	  <para>This is a QIC tape drive.</para>
	  
	  <para>Native capacity is 525MB.</para>
	  
	  <para>Data transfer rate is 180kB/s.</para>
	  
	  <para>The drive reads 60, 120, 150, and 525MB tapes.  The drive will
	    not write 60MB (DC600 cartridge) tapes.  In order to overwrite 120
	    and 150 tapes reliably, first erase (<command>mt erase</command>)
	    the tape.  120 and 150 tapes used a wider track (fewer tracks per
	    tape) than 525MB tapes. The <quote>extra</quote> width of the
	    previous tracks is not overwritten, as a result the new data lies
	    in a band surrounded on both sides by the previous data unless the
	    tape have been erased.</para>
	      
	  <para>This drives quirks are known and pre-compiled into the scsi
	    tape device driver (&man.st.4;).</para>
	  
	  <para>Other firmware revisions that are known to work are:
	    M75D</para>
	  
	  <para>Reported by: Marc van Kempen <email>marc@bowtie.nl</email>
	    <literal>REV73R1</literal> Andrew Gordon
	    <email>Andrew.Gordon@net-tel.co.uk</email>
	    <literal>M75D</literal></para>
	</sect4>

	<sect4 id="hw-storage-wangtek6200">
	  <title>Wangtek 6200</title>
	  
	  <para>The boot message identifier for this drive is <literal>WANGTEK
	      6200-HS 4B18</literal> <literal>type 1 removable SCSI
	      2</literal> <literal>Sequential-Access density code
	      0x13</literal></para>
	  
	  <para>This is a DDS-1 tape drive.</para>
	  
	  <para>Native capacity is 2GB using 90m tapes.</para>
	  
	  <para>Data transfer rate is 150kB/s.</para>
	  
	  <para>Reported by: Tony Kimball <email>alk@Think.COM</email></para>
	</sect4>
      </sect3>
      
      <sect3>
	<title>* Problem drives</title>

	<para></para>
      </sect3>
    </sect2>
    
    <sect2>
      <title>CD-ROM drives</title>
      
      <para><emphasis>Contributed by &a.obrien;.  23 November
	      1997.</emphasis></para>
      
      <para>As mentioned in <link linkend="hw-jordans-picks-cdrom">Jordan's
	  Picks</link> Generally speaking those in <emphasis>The FreeBSD
	  Project</emphasis> prefer SCSI CDROM drives over IDE CDROM drives.
	However not all SCSI CDROM drives are equal.  Some feel the quality of
	some SCSI CDROM drives have been deteriorating to that of IDE CDROM
	drives.  Toshiba used to be the favored stand-by, but many on the SCSI
	mailing list have found displeasure with the 12x speed XM-5701TA as
	its volume (when playing audio CDROMs) is not controllable by the
	various audio player software.</para>
	  
      <para>Another area where SCSI CDROM manufacturers are cutting corners is
	adherence to the <link linkend="scsi-further-reading">SCSI
	  specification</link>. Many SCSI CDROMs will respond to <link
	  linkend="scsi-rogue-devices">multiple LUNs</link> for its target
	address.  Known violators include the 6x Teac CD-56S 1.0D.</para>
    </sect2>
    
    <sect2>
      <title>* Other</title>
      
      <para></para>
    </sect2>
  </sect1>
  
  <sect1 id="hw-other">
    <title>* Other</title>
    
    
    <sect2>
      <title>* PCMCIA</title>
      
      <para></para>
    </sect2>
  </sect1>
</appendix>

<!-- 
     Local Variables:
     mode: sgml
     sgml-declaration: "../appendix.decl"
     sgml-indent-data: t
     sgml-omittag: nil
     sgml-always-quote-attributes: t
     sgml-parent-document: ("../book.sgml" "part" "appendix")
     End:
-->