ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / Documentation / DocBook / sis900.tmpl
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[]>
2
3 <book id="SiS900Guide">
4
5 <bookinfo>
6
7 <title>SiS 900/7016 Fast Ethernet Device Driver</Title>
8
9 <authorgroup>
10 <author>
11 <FirstName>Ollie</FirstName>
12 <surname>Lho</surname>
13 </author>
14
15 <author>
16 <FirstName>Lei Chun</FirstName>
17 <surname>Chang</surname>
18 </author>
19 </authorgroup>
20
21 <edition>Document Revision: 0.3 for SiS900 driver v1.06 & v1.07</edition>
22 <PubDate>November 16, 2000</PubDate>
23
24 <copyright>
25  <year>1999</year>
26  <holder>Silicon Integrated System Corp.</holder>
27 </copyright>
28
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>
36
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>
43
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>
50
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>
57
58 </bookinfo>
59
60 <toc></toc>
61
62 <chapter id="intro">
63  <Title>Introduction</Title>
64
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>
76
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>
81
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>
87
88 <chapter id="changes">
89  <Title>Changes</Title>
90
91 <Para>
92 Changes made in Revision 1.07
93
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>
102
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>
109
110 <ListItem>
111 <Para>
112 MII detection is modified to support multiple mii transceiver.
113 </Para>
114 </ListItem>
115
116 <ListItem>
117 <Para>
118 Bugs in read&lowbar;eeprom, mdio&lowbar;* were removed.
119 </Para>
120 </ListItem>
121
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>
128
129 <ListItem>
130 <Para>
131 Clean up of physical/virtual address space mess in buffer 
132 descriptors.
133 </Para>
134 </ListItem>
135
136 <ListItem>
137 <Para>
138 Better transmit/receive error handling.
139 </Para>
140 </ListItem>
141
142 <ListItem>
143 <Para>
144 The driver now uses zero-copy single buffer management
145 scheme to improve performance.
146 </Para>
147 </ListItem>
148
149 <ListItem>
150 <Para>
151 Names of variables were changed to be more consistent.
152 </Para>
153 </ListItem>
154
155 <ListItem>
156 <Para>
157 Clean up of auo-negotiation and timer code.
158 </Para>
159 </ListItem>
160
161 <ListItem>
162 <Para>
163 Automatic detection and change of PHY on the fly.
164 </Para>
165 </ListItem>
166
167 <ListItem>
168 <Para>
169 Bug in mac probing fixed.
170 </Para>
171 </ListItem>
172
173 <ListItem>
174 <Para>
175 Fix 630E equalier problem by modifying the equalizer workaround rule.
176 </Para>
177 </ListItem>
178
179 <ListItem>
180 <Para>
181 Support for ICS1893 10/100 Interated PHYceiver.
182 </Para>
183 </ListItem>
184
185 <ListItem>
186 <Para>
187 Support for media select by ifconfig.
188 </Para>
189 </ListItem>
190
191 <ListItem>
192 <Para>
193 Added kernel-doc extratable documentation.
194 </Para>
195 </ListItem>
196
197 </OrderedList>
198 </Para>
199 </chapter>
200
201 <chapter id="tested">
202  <Title>Tested Environment</Title>
203
204 <Para>
205 This driver is developed on the following hardware
206
207 <ItemizedList>
208 <ListItem>
209
210 <Para>
211 Intel Celeron 500 with SiS 630 (rev 02) chipset
212 </Para>
213 </ListItem>
214 <ListItem>
215
216 <Para>
217 SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card
218 </Para>
219 </ListItem>
220
221 </ItemizedList>
222
223 and tested with these software environments
224
225 <ItemizedList>
226 <ListItem>
227
228 <Para>
229 Red Hat Linux version 6.2
230 </Para>
231 </ListItem>
232 <ListItem>
233
234 <Para>
235 Linux kernel version 2.4.0
236 </Para>
237 </ListItem>
238 <ListItem>
239
240 <Para>
241 Netscape version 4.6
242 </Para>
243 </ListItem>
244 <ListItem>
245
246 <Para>
247 NcFTP 3.0.0 beta 18
248 </Para>
249 </ListItem>
250 <ListItem>
251
252 <Para>
253 Samba version 2.0.3
254 </Para>
255 </ListItem>
256
257 </ItemizedList>
258
259 </Para>
260
261 </chapter>
262
263 <chapter id="files">
264 <Title>Files in This Package</Title>
265
266 <Para>
267 In the package you can find these files:
268 </Para>
269
270 <Para>
271 <VariableList>
272
273 <VarListEntry>
274 <Term>sis900.c</Term>
275 <ListItem>
276 <Para>
277 Driver source file in C 
278 </Para>
279 </ListItem>
280 </VarListEntry>
281
282 <VarListEntry>
283 <Term>sis900.h</Term>
284 <ListItem>
285 <Para>
286 Header file for sis900.c
287 </Para>
288 </ListItem>
289 </VarListEntry>
290
291 <VarListEntry>
292 <Term>sis900.sgml</Term>
293 <ListItem>
294 <Para>
295 DocBook SGML source of the document
296 </Para>
297 </ListItem>
298 </VarListEntry>
299
300 <VarListEntry>
301 <Term>sis900.txt</Term>
302 <ListItem>
303 <Para>
304 Driver document in plain text
305 </Para>
306 </ListItem>
307 </VarListEntry>
308
309 </VariableList>
310 </Para>
311 </chapter>
312
313 <chapter id="install">
314  <Title>Installation</Title>
315
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.tldp.org/">Ethernet HOWTO</ULink> and
327 <ULink URL="http://www.tldp.org/">Networking HOWTO</ULink> available from
328 Linux Documentation Project (LDP).
329 </Para>
330
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>
342
343 <Sect1>
344 <Title>Building the driver as loadable module</Title>
345
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>
350
351 <Para><screen>
352 make menuconfig
353 </screen></Para>
354
355 <Para>
356 Choose <quote>Loadable module support  ---></quote>, 
357 then select <quote>Enable loadable module support</quote>.
358 </Para>
359
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>
367
368 <Para>
369 After reconfiguring the kernel, you can make the driver module by
370 </Para>
371
372 <Para><screen>
373 make modules
374 </screen></Para>
375
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>
380
381 <Para><screen>
382 make modules_install
383 </screen></Para>
384
385 <Para>
386 Load the driver into kernel by
387 </Para>
388
389 <Para><screen>
390 insmod sis900
391 </screen></Para>
392
393 <Para>
394 When loading the driver into memory, some information message can be view by
395 </Para>
396
397 <Para>
398 <screen>
399 dmesg
400 </screen>
401
402 or
403
404 <screen>
405 cat /var/log/message
406 </screen>
407 </Para>
408
409 <Para>
410 If the driver is loaded properly you will have messages similar to this:
411 </Para>
412
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>
419
420 <Para>
421 showing the version of the driver and the results of probing routine.
422 </Para>
423
424 <Para>
425 Once the driver is loaded, network can be brought up by
426 </Para>
427
428 <Para><screen>
429 /sbin/ifconfig eth0 IPADDR broadcast BROADCAST netmask NETMASK media TYPE
430 </screen></Para>
431
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.tldp.org/">Networking HOWTO</ULink>.
439 </Para>
440
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>
445
446 <Para><screen>
447 eth0: Media Link On 100mbps full-duplex
448 </screen></Para>
449
450 <Para>
451 If you try to unplug the twist pair (TP) cable you will get
452 </Para>
453
454 <Para><screen>
455 eth0: Media Link Off
456 </screen></Para>
457
458 <Para>
459 indicating that the link is failed.
460 </Para>
461 </Sect1>
462
463 <Sect1>
464 <Title>Building the driver into kernel</Title>
465
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>
472
473 <Para><screen>
474 make clean
475
476 make bzlilo
477 </screen></Para>
478
479 <Para>
480 Next time the system reboot, you have the driver in memory.
481 </Para>
482
483 </Sect1>
484 </chapter>
485
486 <chapter id="problems">
487  <Title>Known Problems and Bugs</Title>
488
489 <Para>
490 There are some known problems and bugs. If you find any other bugs please 
491 mail to <ULink URL="mailto:lcchang@sis.com.tw">lcchang@sis.com.tw</ULink>
492
493 <OrderedList>
494
495 <ListItem>
496 <Para>
497 AM79C901 HomePNA PHY is not thoroughly tested, there may be some 
498 bugs in the <quote>on the fly</quote> change of transceiver. 
499 </Para>
500 </ListItem>
501
502 <ListItem>
503 <Para>
504 A bug is hidden somewhere in the receive buffer management code, 
505 the bug causes NULL pointer reference in the kernel. This fault is 
506 caught before bad things happen and reported with the message:
507
508 <computeroutput>
509 eth0: NULL pointer encountered in Rx ring, skipping 
510 </computeroutput>
511
512 which can be viewed with <Literal remap="tt">dmesg</Literal> or 
513 <Literal remap="tt">cat /var/log/message</Literal>.
514 </Para>
515 </ListItem>
516
517 <ListItem>
518 <Para>
519 The media type change from 10Mbps to 100Mbps twisted-pair ethernet 
520 by ifconfig causes the media link down.
521 </Para>
522 </ListItem>
523
524 </OrderedList>
525 </Para>
526 </chapter>
527
528 <chapter id="RHistory">
529  <Title>Revision History</Title>
530
531 <Para>
532 <ItemizedList>
533
534 <ListItem>
535 <Para>
536 November 13, 2000, Revision 1.07, seventh release, 630E problem fixed 
537 and further clean up.
538 </Para>
539 </ListItem>
540
541 <ListItem>
542 <Para>
543 November 4, 1999, Revision 1.06, Second release, lots of clean up
544 and optimization.
545 </Para>
546 </ListItem>
547
548 <ListItem>
549 <Para>
550 August 8, 1999, Revision 1.05, Initial Public Release
551 </Para>
552 </ListItem>
553
554 </ItemizedList>
555 </Para>
556 </chapter>
557
558 <chapter id="acknowledgements">
559  <Title>Acknowledgements</Title>
560
561 <Para>
562 This driver was originally derived form 
563 <ULink URL="mailto:becker@cesdis1.gsfc.nasa.gov">Donald Becker</ULink>'s
564 <ULink URL="ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/kern-2.3/pci-skeleton.c"
565 >pci-skeleton</ULink> and
566 <ULink URL="ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/kern-2.3/rtl8139.c"
567 >rtl8139</ULink> drivers. Donald also provided various suggestion
568 regarded with improvements made in revision 1.06.
569 </Para>
570
571 <Para>
572 The 1.05 revision was created by 
573 <ULink URL="mailto:cmhuang@sis.com.tw">Jim Huang</ULink>, AMD 79c901 
574 support was added by <ULink URL="mailto:lcs@sis.com.tw">Chin-Shan Li</ULink>.
575 </Para>
576 </chapter>
577
578 <chapter id="functions">
579 <title>List of Functions</title>
580 !Idrivers/net/sis900.c
581 </chapter>
582
583 </book>