sis900.tmpl 12 KB

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