Ok, there's a test13-pre6 out there now, which does a partial sync with
[davej-history.git] / Documentation / DocBook / sis900.tmpl
blob88c8ff6a3d06ce83ff36ffb02afb554aa449cb64
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[]>
3 <book id="SiS900Guide">
5 <bookinfo>
7 <title>SiS 900/7016 Fast Ethernet Device Driver</Title>
9 <authorgroup>
10 <author>
11 <FirstName>Ollie</FirstName>
12 <surname>Lho</surname>
13 </author>
15 <author>
16 <FirstName>Lei Chun</FirstName>
17 <surname>Chang</surname>
18 </author>
19 </authorgroup>
21 <edition>Document Revision: 0.3 for SiS900 driver v1.06 & v1.07</edition>
22 <PubDate>November 16, 2000</PubDate>
24 <copyright>
25  <year>1999</year>
26  <holder>Silicon Integrated System Corp.</holder>
27 </copyright>
29 <legalnotice>
30  <para>
31         This program is free software; you can redistribute it and/or modify
32         it under the terms of the GNU General Public License as published by
33         the Free Software Foundation; either version 2 of the License, or
34         (at your option) any later version.
35  </para>
37  <para>
38         This program is distributed in the hope that it will be useful,
39         but WITHOUT ANY WARRANTY; without even the implied warranty of
40         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41         GNU General Public License for more details.
42  </para>
44  <para>
45         You should have received a copy of the GNU General Public License
46         along with this program; if not, write to the Free Software
47         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
48  </para>
49 </legalnotice>
51 <Abstract>
52 <Para>
53 This document gives some information on installation and usage of SiS 900/7016
54 device driver under Linux.
55 </Para>
56 </Abstract>
58 </bookinfo>
60 <toc></toc>
62 <chapter id="intro">
63  <Title>Introduction</Title>
65 <Para>
66 This document describes the revision 1.06 and 1.07 of SiS 900/7016 Fast Ethernet 
67 device driver under Linux. The driver is developed by Silicon Integrated
68 System Corp. and distributed freely under the GNU General Public License (GPL).
69 The driver can be compiled as a loadable module and used under Linux kernel 
70 version 2.2.x. (rev. 1.06)
71 With minimal changes, the driver can also be used under 2.3.x and 2.4.x kernel 
72 (rev. 1.07), please see 
73 <XRef LinkEnd="install">. If you are intended to 
74 use the driver for earlier kernels, you are on your own.
75 </Para>
77 <Para>
78 The driver is tested with usual TCP/IP applications including
79 FTP, Telnet, Netscape etc. and is used constantly by the developers.
80 </Para>
82 <Para>
83 Please send all comments/fixes/questions to
84 <ULink URL="mailto:lcchang@sis.com.tw">Lei-Chun Chang</ULink>.
85 </Para>
86 </chapter>
88 <chapter id="changes">
89  <Title>Changes</Title>
91 <Para>
92 Changes made in Revision 1.07
94 <OrderedList>
95 <ListItem>
96 <Para>
97 Separation of sis900.c and sis900.h in order to move most 
98 constant definition to sis900.h (many of those constants were
99 corrected)
100 </Para>
101 </ListItem>
103 <ListItem>
104 <Para>
105 Clean up PCI detection, the pci-scan from Donald Becker were not used,
106 just simple pci&lowbar;find&lowbar;*.
107 </Para>
108 </ListItem>
110 <ListItem>
111 <Para>
112 MII detection is modified to support multiple mii transceiver.
113 </Para>
114 </ListItem>
116 <ListItem>
117 <Para>
118 Bugs in read&lowbar;eeprom, mdio&lowbar;* were removed.
119 </Para>
120 </ListItem>
122 <ListItem>
123 <Para>
124 Lot of sis900 irrelevant comments were removed/changed and
125 more comments were added to reflect the real situation.
126 </Para>
127 </ListItem>
129 <ListItem>
130 <Para>
131 Clean up of physical/virtual address space mess in buffer 
132 descriptors.
133 </Para>
134 </ListItem>
136 <ListItem>
137 <Para>
138 Better transmit/receive error handling.
139 </Para>
140 </ListItem>
142 <ListItem>
143 <Para>
144 The driver now uses zero-copy single buffer management
145 scheme to improve performance.
146 </Para>
147 </ListItem>
149 <ListItem>
150 <Para>
151 Names of variables were changed to be more consistent.
152 </Para>
153 </ListItem>
155 <ListItem>
156 <Para>
157 Clean up of auo-negotiation and timer code.
158 </Para>
159 </ListItem>
161 <ListItem>
162 <Para>
163 Automatic detection and change of PHY on the fly.
164 </Para>
165 </ListItem>
167 <ListItem>
168 <Para>
169 Bug in mac probing fixed.
170 </Para>
171 </ListItem>
173 <ListItem>
174 <Para>
175 Fix 630E equalier problem by modifying the equalizer workaround rule.
176 </Para>
177 </ListItem>
179 <ListItem>
180 <Para>
181 Support for ICS1893 10/100 Interated PHYceiver.
182 </Para>
183 </ListItem>
185 <ListItem>
186 <Para>
187 Support for media select by ifconfig.
188 </Para>
189 </ListItem>
191 <ListItem>
192 <Para>
193 Added kernel-doc extratable documentation.
194 </Para>
195 </ListItem>
197 </OrderedList>
198 </Para>
199 </chapter>
201 <chapter id="tested">
202  <Title>Tested Environment</Title>
204 <Para>
205 This driver is developed on the following hardware
207 <ItemizedList>
208 <ListItem>
210 <Para>
211 Intel Celeron 500 with SiS 630 (rev 02) chipset
212 </Para>
213 </ListItem>
214 <ListItem>
216 <Para>
217 SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card
218 </Para>
219 </ListItem>
221 </ItemizedList>
223 and tested with these software environments
225 <ItemizedList>
226 <ListItem>
228 <Para>
229 Red Hat Linux version 6.2
230 </Para>
231 </ListItem>
232 <ListItem>
234 <Para>
235 Linux kernel version 2.4.0
236 </Para>
237 </ListItem>
238 <ListItem>
240 <Para>
241 Netscape version 4.6
242 </Para>
243 </ListItem>
244 <ListItem>
246 <Para>
247 NcFTP 3.0.0 beta 18
248 </Para>
249 </ListItem>
250 <ListItem>
252 <Para>
253 Samba version 2.0.3
254 </Para>
255 </ListItem>
257 </ItemizedList>
259 </Para>
261 </chapter>
263 <chapter id="files">
264 <Title>Files in This Package</Title>
266 <Para>
267 In the package you can find these files:
268 </Para>
270 <Para>
271 <VariableList>
273 <VarListEntry>
274 <Term>sis900.c</Term>
275 <ListItem>
276 <Para>
277 Driver source file in C 
278 </Para>
279 </ListItem>
280 </VarListEntry>
282 <VarListEntry>
283 <Term>sis900.h</Term>
284 <ListItem>
285 <Para>
286 Header file for sis900.c
287 </Para>
288 </ListItem>
289 </VarListEntry>
291 <VarListEntry>
292 <Term>sis900.sgml</Term>
293 <ListItem>
294 <Para>
295 DocBook SGML source of the document
296 </Para>
297 </ListItem>
298 </VarListEntry>
300 <VarListEntry>
301 <Term>sis900.txt</Term>
302 <ListItem>
303 <Para>
304 Driver document in plain text
305 </Para>
306 </ListItem>
307 </VarListEntry>
309 </VariableList>
310 </Para>
311 </chapter>
313 <chapter id="install">
314  <Title>Installation</Title>
316 <Para>
317 Silicon Integrated System Corp. is cooperating closely with core Linux Kernel
318 developers. The revisions of SiS 900 driver are distributed by the usuall channels
319 for kernel tar files and patches. Those kernel tar files for official kernel and
320 patches for kernel pre-release can be download at 
321 <ULink URL="http://ftp.kernel.org/pub/linux/kernel/">official kernel ftp site</ULink> 
322 and its mirrors.
323 The 1.06 revision can be found in kernel version later than 2.3.15 and pre-2.2.14, 
324 and 1.07 revision can be found in kernel version 2.4.0.
325 If you have no prior experience in networking under Linux, please read
326 <ULink URL="http://www.linuxdoc.org/">Ethernet HOWTO</ULink> and
327 <ULink URL="http://www.linuxdoc.org/">Networking HOWTO</ULink> available from
328 Linux Documentation Project (LDP).
329 </Para>
331 <Para>
332 The driver is bundled in release later than 2.2.11 and 2.3.15 so this 
333 is the most easy case. 
334 Be sure you have the appropriate packages for compiling kernel source.
335 Those packages are listed in Document/Changes in kernel source 
336 distribution. If you have to install the driver other than those bundled
337 in kernel release, you should have your driver file 
338 <filename>sis900.c</filename> and <filename>sis900.h</filename> 
339 copied into <filename class=directory>/usr/src/linux/drivers/net/</filename> first.
340 There are two alternative ways to install the driver
341 </Para>
343 <Sect1>
344 <Title>Building the driver as loadable module</Title>
346 <Para>
347 To build the driver as a loadable kernel module you have to reconfigure
348 the kernel to activate network support by
349 </Para>
351 <Para><screen>
352 make menuconfig
353 </screen></Para>
355 <Para>
356 Choose <quote>Loadable module support  ---></quote>, 
357 then select <quote>Enable loadable module support</quote>.
358 </Para>
360 <Para>
361 Choose <quote>Network Device Support  ---></quote>, select 
362 <quote>Ethernet (10 or 100Mbit)</quote>.
363 Then select <quote>EISA, VLB, PCI and on board controllers</quote>, 
364 and choose <quote>SiS 900/7016 PCI Fast Ethernet Adapter support</quote> 
365 to <quote>M</quote>.
366 </Para>
368 <Para>
369 After reconfiguring the kernel, you can make the driver module by
370 </Para>
372 <Para><screen>
373 make modules
374 </screen></Para>
376 <Para>
377 The driver should be compiled with no errors. After compiling the driver,
378 the driver can be installed to proper place by
379 </Para>
381 <Para><screen>
382 make modules_install
383 </screen></Para>
385 <Para>
386 Load the driver into kernel by
387 </Para>
389 <Para><screen>
390 insmod sis900
391 </screen></Para>
393 <Para>
394 When loading the driver into memory, some information message can be view by
395 </Para>
397 <Para>
398 <screen>
399 dmesg
400 </screen>
404 <screen>
405 cat /var/log/message
406 </screen>
407 </Para>
409 <Para>
410 If the driver is loaded properly you will have messages similar to this:
411 </Para>
413 <Para><screen>
414 sis900.c: v1.07.06  11/07/2000
415 eth0: SiS 900 PCI Fast Ethernet at 0xd000, IRQ 10, 00:00:e8:83:7f:a4.
416 eth0: SiS 900 Internal MII PHY transceiver found at address 1.
417 eth0: Using SiS 900 Internal MII PHY as default
418 </screen></Para>
420 <Para>
421 showing the version of the driver and the results of probing routine.
422 </Para>
424 <Para>
425 Once the driver is loaded, network can be brought up by
426 </Para>
428 <Para><screen>
429 /sbin/ifconfig eth0 IPADDR broadcast BROADCAST netmask NETMASK media TYPE
430 </screen></Para>
432 <Para>
433 where IPADDR, BROADCAST, NETMASK are your IP address, broadcast address and
434 netmask respectively. TYPE is used to set medium type used by the device. 
435 Typical values are "10baseT"(twisted-pair 10Mbps Ethernet) or "100baseT"
436 (twisted-pair 100Mbps Ethernet). For more information on how to configure 
437 network interface, please refer to  
438 <ULink URL="http://www.linuxdoc.org/">Networking HOWTO</ULink>.
439 </Para>
441 <Para>
442 The link status is also shown by kernel messages. For example, after the
443 network interface is activated, you may have the message:
444 </Para>
446 <Para><screen>
447 eth0: Media Link On 100mbps full-duplex
448 </screen></Para>
450 <Para>
451 If you try to unplug the twist pair (TP) cable you will get
452 </Para>
454 <Para><screen>
455 eth0: Media Link Off
456 </screen></Para>
458 <Para>
459 indicating that the link is failed.
460 </Para>
461 </Sect1>
463 <Sect1>
464 <Title>Building the driver into kernel</Title>
466 <Para>
467 If you want to make the driver into kernel, choose <quote>Y</quote> 
468 rather than <quote>M</quote> on 
469 <quote>SiS 900/7016 PCI Fast Ethernet Adapter support</quote> 
470 when configuring the kernel. Build the kernel image in the usual way
471 </Para>
473 <Para><screen>
474 make dep
476 make clean
478 make bzlilo
479 </screen></Para>
481 <Para>
482 Next time the system reboot, you have the driver in memory.
483 </Para>
485 </Sect1>
486 </chapter>
488 <chapter id="problems">
489  <Title>Known Problems and Bugs</Title>
491 <Para>
492 There are some known problems and bugs. If you find any other bugs please 
493 mail to <ULink URL="mailto:lcchang@sis.com.tw">lcchang@sis.com.tw</ULink>
495 <OrderedList>
497 <ListItem>
498 <Para>
499 AM79C901 HomePNA PHY is not thoroughly tested, there may be some 
500 bugs in the <quote>on the fly</quote> change of transceiver. 
501 </Para>
502 </ListItem>
504 <ListItem>
505 <Para>
506 A bug is hidden somewhere in the receive buffer management code, 
507 the bug causes NULL pointer reference in the kernel. This fault is 
508 caught before bad things happen and reported with the message:
510 <computeroutput>
511 eth0: NULL pointer encountered in Rx ring, skipping 
512 </computeroutput>
514 which can be viewed with <Literal remap="tt">dmesg</Literal> or 
515 <Literal remap="tt">cat /var/log/message</Literal>.
516 </Para>
517 </ListItem>
519 <ListItem>
520 <Para>
521 The media type change from 10Mbps to 100Mbps twisted-pair ethernet 
522 by ifconfig causes the media link down.
523 </Para>
524 </ListItem>
526 </OrderedList>
527 </Para>
528 </chapter>
530 <chapter id="RHistory">
531  <Title>Revision History</Title>
533 <Para>
534 <ItemizedList>
536 <ListItem>
537 <Para>
538 November 13, 2000, Revision 1.07, seventh release, 630E problem fixed 
539 and furthur clean up.
540 </Para>
541 </ListItem>
543 <ListItem>
544 <Para>
545 November 4, 1999, Revision 1.06, Second release, lots of clean up
546 and optimization.
547 </Para>
548 </ListItem>
550 <ListItem>
551 <Para>
552 August 8, 1999, Revision 1.05, Initial Public Release
553 </Para>
554 </ListItem>
556 </ItemizedList>
557 </Para>
558 </chapter>
560 <chapter id="acknowledgements">
561  <Title>Acknowledgements</Title>
563 <Para>
564 This driver was originally derived form 
565 <ULink URL="mailto:becker@cesdis1.gsfc.nasa.gov">Donald Becker</ULink>'s
566 <ULink URL="ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/kern-2.3/pci-skeleton.c"
567 >pci-skeleton</ULink> and
568 <ULink URL="ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/kern-2.3/rtl8139.c"
569 >rtl8139</ULink> drivers. Donald also provided various suggestion
570 regarded with improvements made in revision 1.06.
571 </Para>
573 <Para>
574 The 1.05 revision was created by 
575 <ULink URL="mailto:cmhuang@sis.com.tw">Jim Huang</ULink>, AMD 79c901 
576 support was added by <ULink URL="mailto:lcs@sis.com.tw">Chin-Shan Li</ULink>.
577 </Para>
578 </chapter>
580 <chapter id="functions">
581 <title>List of Functions</title>
582 !Idrivers/net/sis900.c
583 </chapter>
585 </book>