summaryrefslogtreecommitdiffstats
path: root/Documentation/networking/sis900.txt
blob: 6c26c9927728eeeae113af8fb20fde13cacdbb91 (plain)
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
  SiS 900/7016 Fast Ethernet Device Driver
  by Ollie Lho (ollie@sis.com.tw)
  November 4, 1999. Document Revision: 0.2

  This document gives some information on installation and usage of SiS
  900/7016 device driver under Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. License

  3. Changes

  4. Tested Environment

  5. Files in This Package

  6. Installation

     6.1 Kernel version later than 2.2.11 and 2.3.15
        6.1.1 Building the driver as loadable module
        6.1.2 Building the driver into kernel
     6.2 Earlier Kernel Version in 2.2.x and 2.3.x Series

  7. Known Problems and Bugs

  8. Revision History

  9. Acknowledgements



  ______________________________________________________________________

  1.  Introduction

  This document describes the revision 1.06 of SiS 900/7016 Fast
  Ethernet device driver under Linux. The driver is developed by Silicon
  Integrated System Corp. and distributed freely under the GNU General
  Public License (GPL). The driver can be compiled as a loadable module
  and used under Linux kernel version 2.2.x. With minimal changes, the
  driver can also be used under 2.3.x kernel, please see section
  ``Installation''. If you are intended to use the driver for earlier
  kernels, you are on your own.

  The driver is tested with usual TCP/IP applications including FTP,
  Telnet, Netscape etc. and is used constantly by the developers.

  Please send all comments/fixes/questions to Ollie Lho.


  2.  License










          Copyright (C) 1999 Silicon Integrated System Corp.

          This program is free software; you can redistribute it and/or modify
          it under the terms of the GNU General Public License as published by
          the Free Software Foundation; either version 2 of the License, or
          (at your option) any later version.

          This program is distributed in the hope that it will be useful,
          but WITHOUT ANY WARRANTY; without even the implied warranty of
          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
          GNU General Public License for more details.

          You should have received a copy of the GNU General Public License
          along with this program; if not, write to the Free Software
          Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA





  3.  Changes

  Changes made in Revision 1.06

  1. Separation of sis900.c and sis900.h in order to move most constant
     definition to sis900.h (many of those constants were corrected)

  2. Clean up PCI detection, the pci-scan from Donald Becker were not
     used, just simple pci_find_*.

  3. MII detection is modified to support multiple mii transceiver.

  4. Bugs in read_eeprom, mdio_* were removed.

  5. Lot of sis900 irrelevant comments were removed/changed and more
     comments were added to reflect the real situation.

  6. Clean up of physical/virtual address space mess in buffer
     descriptors.

  7. Better transmit/receive error handling.

  8. The driver now uses zero-copy single buffer management scheme to
     improve performance.

  9. Names of variables were changed to be more consistent.

  10.
     Clean up of auo-negotiation and timer code.

  11.
     Automatic detection and change of PHY on the fly.


  4.  Tested Environment

  This driver is developed on the following hardware

  o  Intel Celeron 336 with SiS 620 (rev 02) chipset

  o  SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card

     and tested with these software environments

  o  Red Hat Linux version 6.0

  o  Linux kernel version 2.2.13

  o  Netscape version 4.6

  o  NcFTP 3.0.0 beta 18

  o  Samba version 2.0.3


  5.  Files in This Package

  In the package you can find these files:


     sis900-2.2.x.c
        Driver source for kernel 2.2.x

     sis900-2.3.x.c
        Driver source for kernel 2.3.x

     sis900.h
        Header file for both 2.2.x and 2.3.x kernel

     sis900.sgml
        Linux-Doc SGML source of the document


  6.  Installation

  Silicon Integrated System Corp. is cooperating closely with core Linux
  Kernel developers. The revisions of SiS 900 driver are distributed by
  the usual channels for kernel tar files and patches. Those kernel tar
  files for official kernel and patches for kernel pre-release can be
  download at official kernel ftp site
  <http://ftp.kernel.org/pub/linux/kernel/> and its mirrors.  The 1.06
  revision can be found in kernel version later than 2.3.15 and
  pre-2.2.14.  If you have no prior experience in networking under
  Linux, please read Ethernet HOWTO and Networking HOWTO available from
  Linux Documentation Project (LDP).

  The installation procedure are different according to your kernel
  versions.


  6.1.  Kernel version later than 2.2.11 and 2.3.15

  The driver is bundled in release later than 2.2.11 and 2.3.15 so this
  is the most easy case.  Be sure you have the appropriate packages for
  compiling kernel source.  Those packages are listed in
  Document/Changes in kernel source distribution. There are two
  alternative ways to install the driver


  6.1.1.  Building the driver as loadable module

  To build the driver as a loadable kernel module you have to
  reconfigure the kernel to activate network support by



       make config




  Choose "Network Device Support" to "Y" and "Ethernet Support" to "Y".
  Then you have to choose "SiS 900 Fast Ethernet Adapter Support" to
  "M".

  After reconfiguring the kernel, you can make the driver module by


       make modules




  The driver should be compiled with no errors. After compiling the
  driver, the driver can be installed to proper place by



       make modules_install




  Load the driver into kernel by



       insmod sis900




  When loading the driver into memory, some information message can be
  view by



       dmesg




  or


       cat /var/log/message




  If the driver is loaded properly you will have messages similar to
  this:



       sis900.c: v1.06  11/04/99
       eth0: SiS 900 PCI Fast Ethernet at 0xd000, IRQ 10, 00:00:e8:83:7f:a4.
       eth0: SiS 900 Internal MII PHY transceiver found at address 1.
       eth0: Using SiS 900 Internal MII PHY as default




  showing the version of the driver and the results of probing routine.

  Once the driver is loaded, network can be brought up by



       /sbin/ifconfig eth0 IPADDR broadcast BROADCAST netmask NETMASK





  where IPADDR, BROADCAST, NETMASK are your IP address, broadcast
  address and netmask respectively. For more information on how to
  configure network interface, please refer to Networking HOWTO.

  The link status is also shown by kernel messages. For example, after
  the network interface is activated, you may have the message:



       eth0: Media Link On 100mbps full-duplex




  If you try to unplug the twist pair (TP) cable you will get



       eth0: Media Link Off




  indicating that the link is failed.


  6.1.2.  Building the driver into kernel

  If you want to make the driver into kernel, choose "Y" rather than "M"
  on "SiS 900 Fast Ethernet Adapter Support" when configuring the
  kernel.  Build the kernel image in the usual way



       make dep

       make clean

       make bzlilo




  Next time the system reboot, you have the driver in memory.


  6.2.  Earlier Kernel Version in 2.2.x and 2.3.x Series

  Installing the driver for earlier kernels in 2.2.x and 2.3.x series
  requires a little bit more work. First you have to copy sis900-2.x.x.c
  to /usr/src/linux/drivers/net/ and you have to modify some files
  manually (sorry !! no patch available !!)

  in Space.c, add


       extern int sis900_probe(struct device *dev);

       ...

       #ifdef CONFIG_SIS900
               {sis900_probe,0},
       #endif


  in Config.in add


       if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
               ... //other adapter drivers
               tristate 'SiS 900 PCI Fast Ethernet Adapter Support' CONFIG_SIS900
               ... //other adapter drivers
       fi




  in Makefile add


       ifeq ($(CONFIG_SIS900),y)
               L_OBJS += sis900.o
       else
               ifeq ($(CONFIG_SIS900),m)
                       M_OBJS += sis900.o
               endif
       endif




  After modifying these files, the driver can be build as described in
  the previous section.


  7.  Known Problems and Bugs

  There are some known problems and bugs. If you find any other bugs
  please mail to ollie@sis.com.tw

  1. AM79C901 HomePNA PHY is not thoroughly tested, there may be some
     bugs in the "on the fly" change of transceiver.

  2. A bug is hidden somewhere in the receive buffer management code,
     the bug causes NULL pointer reference in the kernel. This fault is
     caught before bad things happen and reported with the message:


       eth0: NULL pointer encountered in Rx ring, skipping




  which can be viewed with dmesg or cat /var/log/message.


  8.  Revision History


  o  November 4, 1999, Revision 1.06, Second release, lots of clean up
     and optimization.

  o  August 8, 1999, Revision 1.05, Initial Public Release


  9.  Acknowledgements

  This driver was originally derived form Donald Becker's pci-skeleton
  and rtl8139 drivers. Donald also provided various suggestion regarded
  with improvements made in revision 1.06.

  The 1.05 revision was created by Jim Huang, AMD 79c901 support was
  added by Chin-Shan Li.