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>
53This document gives some information on installation and usage of SiS 900/7016
54device 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>
66This document describes the revision 1.06 and 1.07 of SiS 900/7016 Fast Ethernet
67device driver under Linux. The driver is developed by Silicon Integrated
68System Corp. and distributed freely under the GNU General Public License (GPL).
69The driver can be compiled as a loadable module and used under Linux kernel
70version 2.2.x. (rev. 1.06)
71With 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
74use the driver for earlier kernels, you are on your own.
75</Para>
76
77<Para>
78The driver is tested with usual TCP/IP applications including
79FTP, Telnet, Netscape etc. and is used constantly by the developers.
80</Para>
81
82<Para>
83Please 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>
92Changes made in Revision 1.07
93
94<OrderedList>
95<ListItem>
96<Para>
97Separation of sis900.c and sis900.h in order to move most
98constant definition to sis900.h (many of those constants were
99corrected)
100</Para>
101</ListItem>
102
103<ListItem>
104<Para>
105Clean up PCI detection, the pci-scan from Donald Becker were not used,
106just simple pci&lowbar;find&lowbar;*.
107</Para>
108</ListItem>
109
110<ListItem>
111<Para>
112MII detection is modified to support multiple mii transceiver.
113</Para>
114</ListItem>
115
116<ListItem>
117<Para>
118Bugs in read&lowbar;eeprom, mdio&lowbar;* were removed.
119</Para>
120</ListItem>
121
122<ListItem>
123<Para>
124Lot of sis900 irrelevant comments were removed/changed and
125more comments were added to reflect the real situation.
126</Para>
127</ListItem>
128
129<ListItem>
130<Para>
131Clean up of physical/virtual address space mess in buffer
132descriptors.
133</Para>
134</ListItem>
135
136<ListItem>
137<Para>
138Better transmit/receive error handling.
139</Para>
140</ListItem>
141
142<ListItem>
143<Para>
144The driver now uses zero-copy single buffer management
145scheme to improve performance.
146</Para>
147</ListItem>
148
149<ListItem>
150<Para>
151Names of variables were changed to be more consistent.
152</Para>
153</ListItem>
154
155<ListItem>
156<Para>
157Clean up of auo-negotiation and timer code.
158</Para>
159</ListItem>
160
161<ListItem>
162<Para>
163Automatic detection and change of PHY on the fly.
164</Para>
165</ListItem>
166
167<ListItem>
168<Para>
169Bug in mac probing fixed.
170</Para>
171</ListItem>
172
173<ListItem>
174<Para>
175Fix 630E equalier problem by modifying the equalizer workaround rule.
176</Para>
177</ListItem>
178
179<ListItem>
180<Para>
181Support for ICS1893 10/100 Interated PHYceiver.
182</Para>
183</ListItem>
184
185<ListItem>
186<Para>
187Support for media select by ifconfig.
188</Para>
189</ListItem>
190
191<ListItem>
192<Para>
193Added 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>
205This driver is developed on the following hardware
206
207<ItemizedList>
208<ListItem>
209
210<Para>
211Intel Celeron 500 with SiS 630 (rev 02) chipset
212</Para>
213</ListItem>
214<ListItem>
215
216<Para>
217SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card
218</Para>
219</ListItem>
220
221</ItemizedList>
222
223and tested with these software environments
224
225<ItemizedList>
226<ListItem>
227
228<Para>
229Red Hat Linux version 6.2
230</Para>
231</ListItem>
232<ListItem>
233
234<Para>
235Linux kernel version 2.4.0
236</Para>
237</ListItem>
238<ListItem>
239
240<Para>
241Netscape version 4.6
242</Para>
243</ListItem>
244<ListItem>
245
246<Para>
247NcFTP 3.0.0 beta 18
248</Para>
249</ListItem>
250<ListItem>
251
252<Para>
253Samba 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>
267In 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>
277Driver source file in C
278</Para>
279</ListItem>
280</VarListEntry>
281
282<VarListEntry>
283<Term>sis900.h</Term>
284<ListItem>
285<Para>
286Header file for sis900.c
287</Para>
288</ListItem>
289</VarListEntry>
290
291<VarListEntry>
292<Term>sis900.sgml</Term>
293<ListItem>
294<Para>
295DocBook SGML source of the document
296</Para>
297</ListItem>
298</VarListEntry>
299
300<VarListEntry>
301<Term>sis900.txt</Term>
302<ListItem>
303<Para>
304Driver 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>
317Silicon Integrated System Corp. is cooperating closely with core Linux Kernel
318developers. The revisions of SiS 900 driver are distributed by the usuall channels
319for kernel tar files and patches. Those kernel tar files for official kernel and
320patches for kernel pre-release can be download at
321<ULink URL="http://ftp.kernel.org/pub/linux/kernel/">official kernel ftp site</ULink>
322and its mirrors.
323The 1.06 revision can be found in kernel version later than 2.3.15 and pre-2.2.14,
324and 1.07 revision can be found in kernel version 2.4.0.
325If 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
328Linux Documentation Project (LDP).
329</Para>
330
331<Para>
332The driver is bundled in release later than 2.2.11 and 2.3.15 so this
333is the most easy case.
334Be sure you have the appropriate packages for compiling kernel source.
335Those packages are listed in Document/Changes in kernel source
336distribution. If you have to install the driver other than those bundled
337in kernel release, you should have your driver file
338<filename>sis900.c</filename> and <filename>sis900.h</filename>
339copied into <filename class=directory>/usr/src/linux/drivers/net/</filename> first.
340There 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>
347To build the driver as a loadable kernel module you have to reconfigure
348the kernel to activate network support by
349</Para>
350
351<Para><screen>
352make menuconfig
353</screen></Para>
354
355<Para>
356Choose <quote>Loadable module support  ---></quote>,
357then select <quote>Enable loadable module support</quote>.
358</Para>
359
360<Para>
361Choose <quote>Network Device Support  ---></quote>, select
362<quote>Ethernet (10 or 100Mbit)</quote>.
363Then select <quote>EISA, VLB, PCI and on board controllers</quote>,
364and choose <quote>SiS 900/7016 PCI Fast Ethernet Adapter support</quote>
365to <quote>M</quote>.
366</Para>
367
368<Para>
369After reconfiguring the kernel, you can make the driver module by
370</Para>
371
372<Para><screen>
373make modules
374</screen></Para>
375
376<Para>
377The driver should be compiled with no errors. After compiling the driver,
378the driver can be installed to proper place by
379</Para>
380
381<Para><screen>
382make modules_install
383</screen></Para>
384
385<Para>
386Load the driver into kernel by
387</Para>
388
389<Para><screen>
390insmod sis900
391</screen></Para>
392
393<Para>
394When loading the driver into memory, some information message can be view by
395</Para>
396
397<Para>
398<screen>
399dmesg
400</screen>
401
402or
403
404<screen>
405cat /var/log/message
406</screen>
407</Para>
408
409<Para>
410If the driver is loaded properly you will have messages similar to this:
411</Para>
412
413<Para><screen>
414sis900.c: v1.07.06  11/07/2000
415eth0: SiS 900 PCI Fast Ethernet at 0xd000, IRQ 10, 00:00:e8:83:7f:a4.
416eth0: SiS 900 Internal MII PHY transceiver found at address 1.
417eth0: Using SiS 900 Internal MII PHY as default
418</screen></Para>
419
420<Para>
421showing the version of the driver and the results of probing routine.
422</Para>
423
424<Para>
425Once 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>
433where IPADDR, BROADCAST, NETMASK are your IP address, broadcast address and
434netmask respectively. TYPE is used to set medium type used by the device.
435Typical values are "10baseT"(twisted-pair 10Mbps Ethernet) or "100baseT"
436(twisted-pair 100Mbps Ethernet). For more information on how to configure
437network interface, please refer to
438<ULink URL="http://www.tldp.org/">Networking HOWTO</ULink>.
439</Para>
440
441<Para>
442The link status is also shown by kernel messages. For example, after the
443network interface is activated, you may have the message:
444</Para>
445
446<Para><screen>
447eth0: Media Link On 100mbps full-duplex
448</screen></Para>
449
450<Para>
451If you try to unplug the twist pair (TP) cable you will get
452</Para>
453
454<Para><screen>
455eth0: Media Link Off
456</screen></Para>
457
458<Para>
459indicating that the link is failed.
460</Para>
461</Sect1>
462
463<Sect1>
464<Title>Building the driver into kernel</Title>
465
466<Para>
467If you want to make the driver into kernel, choose <quote>Y</quote>
468rather than <quote>M</quote> on
469<quote>SiS 900/7016 PCI Fast Ethernet Adapter support</quote>
470when configuring the kernel. Build the kernel image in the usual way
471</Para>
472
473<Para><screen>
474make dep
475
476make clean
477
478make bzlilo
479</screen></Para>
480
481<Para>
482Next time the system reboot, you have the driver in memory.
483</Para>
484
485</Sect1>
486</chapter>
487
488<chapter id="problems">
489 <Title>Known Problems and Bugs</Title>
490
491<Para>
492There are some known problems and bugs. If you find any other bugs please
493mail to <ULink URL="mailto:lcchang@sis.com.tw">lcchang@sis.com.tw</ULink>
494
495<OrderedList>
496
497<ListItem>
498<Para>
499AM79C901 HomePNA PHY is not thoroughly tested, there may be some
500bugs in the <quote>on the fly</quote> change of transceiver.
501</Para>
502</ListItem>
503
504<ListItem>
505<Para>
506A bug is hidden somewhere in the receive buffer management code,
507the bug causes NULL pointer reference in the kernel. This fault is
508caught before bad things happen and reported with the message:
509
510<computeroutput>
511eth0: NULL pointer encountered in Rx ring, skipping
512</computeroutput>
513
514which can be viewed with <Literal remap="tt">dmesg</Literal> or
515<Literal remap="tt">cat /var/log/message</Literal>.
516</Para>
517</ListItem>
518
519<ListItem>
520<Para>
521The media type change from 10Mbps to 100Mbps twisted-pair ethernet
522by ifconfig causes the media link down.
523</Para>
524</ListItem>
525
526</OrderedList>
527</Para>
528</chapter>
529
530<chapter id="RHistory">
531 <Title>Revision History</Title>
532
533<Para>
534<ItemizedList>
535
536<ListItem>
537<Para>
538November 13, 2000, Revision 1.07, seventh release, 630E problem fixed
539and furthur clean up.
540</Para>
541</ListItem>
542
543<ListItem>
544<Para>
545November 4, 1999, Revision 1.06, Second release, lots of clean up
546and optimization.
547</Para>
548</ListItem>
549
550<ListItem>
551<Para>
552August 8, 1999, Revision 1.05, Initial Public Release
553</Para>
554</ListItem>
555
556</ItemizedList>
557</Para>
558</chapter>
559
560<chapter id="acknowledgements">
561 <Title>Acknowledgements</Title>
562
563<Para>
564This 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
570regarded with improvements made in revision 1.06.
571</Para>
572
573<Para>
574The 1.05 revision was created by
575<ULink URL="mailto:cmhuang@sis.com.tw">Jim Huang</ULink>, AMD 79c901
576support was added by <ULink URL="mailto:lcs@sis.com.tw">Chin-Shan Li</ULink>.
577</Para>
578</chapter>
579
580<chapter id="functions">
581<title>List of Functions</title>
582!Idrivers/net/sis900.c
583</chapter>
584
585</book>
586