Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

tokenring: delete all remaining driver support

This represents the mass deletion of the of the tokenring support.

It gets rid of:
  - the net/tr.c which the drivers depended on
  - the drivers/net component
  - the Kbuild infrastructure around it
  - any tokenring related CONFIG_ settings in any defconfigs
  - the tokenring headers in the include/linux dir
  - the firmware associated with the tokenring drivers.
  - any associated token ring documentation.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
  • Loading branch information...
commit ee446fd5e6dafee4a16fd1bd345d2571dcfd6f5d 1 parent 211ed86
Paul Gortmaker authored

Showing 43 changed files with 0 additions and 25,869 deletions. Show diff stats Hide diff stats

  1. +0 1  Documentation/filesystems/proc.txt
  2. +0 8 Documentation/networking/00-INDEX
  3. +0 58 Documentation/networking/3c359.txt
  4. +0 79 Documentation/networking/olympic.txt
  5. +0 66 Documentation/networking/smctr.txt
  6. +0 147 Documentation/networking/tms380tr.txt
  7. +0 4 arch/mips/configs/mtx1_defconfig
  8. +0 5 arch/xtensa/configs/common_defconfig
  9. +0 1  drivers/message/fusion/mptlan.h
  10. +0 2  drivers/net/Kconfig
  11. +0 1  drivers/net/Makefile
  12. +0 46 drivers/net/Space.c
  13. +0 1,831 drivers/net/tokenring/3c359.c
  14. +0 291 drivers/net/tokenring/3c359.h
  15. +0 199 drivers/net/tokenring/Kconfig
  16. +0 16 drivers/net/tokenring/Makefile
  17. +0 468 drivers/net/tokenring/abyss.c
  18. +0 58 drivers/net/tokenring/abyss.h
  19. +0 1,964 drivers/net/tokenring/ibmtr.c
  20. +0 370 drivers/net/tokenring/ibmtr_cs.c
  21. +0 1,909 drivers/net/tokenring/lanstreamer.c
  22. +0 343 drivers/net/tokenring/lanstreamer.h
  23. +0 761 drivers/net/tokenring/madgemc.c
  24. +0 70 drivers/net/tokenring/madgemc.h
  25. +0 1,737 drivers/net/tokenring/olympic.c
  26. +0 321 drivers/net/tokenring/olympic.h
  27. +0 422 drivers/net/tokenring/proteon.c
  28. +0 432 drivers/net/tokenring/skisa.c
  29. +0 5,717 drivers/net/tokenring/smctr.c
  30. +0 1,585 drivers/net/tokenring/smctr.h
  31. +0 2,306 drivers/net/tokenring/tms380tr.c
  32. +0 1,141 drivers/net/tokenring/tms380tr.h
  33. +0 236 drivers/net/tokenring/tmspci.c
  34. +0 1,573 firmware/3com/3C359.bin.ihex
  35. +0 2  firmware/Makefile
  36. +0 38 firmware/WHENCE
  37. +0 477 firmware/tr_smctr.bin.ihex
  38. +0 1  include/linux/Kbuild
  39. +0 373 include/linux/ibmtr.h
  40. +0 103 include/linux/if_tr.h
  41. +0 37 include/linux/trdevice.h
  42. +0 1  net/802/Makefile
  43. +0 669 net/802/tr.c
1  Documentation/filesystems/proc.txt
@@ -996,7 +996,6 @@ Table 1-9: Network info in /proc/net
996 996 snmp SNMP data
997 997 sockstat Socket statistics
998 998 tcp TCP sockets
999   - tr_rif Token ring RIF routing table
1000 999 udp UDP sockets
1001 1000 unix UNIX domain sockets
1002 1001 wireless Wireless interface data (Wavelan etc)
8 Documentation/networking/00-INDEX
... ... @@ -1,7 +1,5 @@
1 1 00-INDEX
2 2 - this file
3   -3c359.txt
4   - - information on the 3Com TokenLink Velocity XL (3c5359) driver.
5 3 3c505.txt
6 4 - information on the 3Com EtherLink Plus (3c505) driver.
7 5 3c509.txt
@@ -142,8 +140,6 @@ netif-msg.txt
142 140 - Design of the network interface message level setting (NETIF_MSG_*).
143 141 nfc.txt
144 142 - The Linux Near Field Communication (NFS) subsystem.
145   -olympic.txt
146   - - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info.
147 143 openvswitch.txt
148 144 - Open vSwitch developer documentation.
149 145 operstates.txt
@@ -184,8 +180,6 @@ skfp.txt
184 180 - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
185 181 smc9.txt
186 182 - the driver for SMC's 9000 series of Ethernet cards
187   -smctr.txt
188   - - SMC TokenCard TokenRing Linux driver info.
189 183 spider-net.txt
190 184 - README for the Spidernet Driver (as found in PS3 / Cell BE).
191 185 stmmac.txt
@@ -200,8 +194,6 @@ tcp-thin.txt
200 194 - kernel tuning options for low rate 'thin' TCP streams.
201 195 tlan.txt
202 196 - ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info.
203   -tms380tr.txt
204   - - SysKonnect Token Ring ISA/PCI adapter driver info.
205 197 tproxy.txt
206 198 - Transparent proxy support user guide.
207 199 tuntap.txt
58 Documentation/networking/3c359.txt
... ... @@ -1,58 +0,0 @@
1   -
2   -3COM PCI TOKEN LINK VELOCITY XL TOKEN RING CARDS README
3   -
4   -Release 0.9.0 - Release
5   - Jul 17th 2000 Mike Phillips
6   -
7   - 1.2.0 - Final
8   - Feb 17th 2002 Mike Phillips
9   - Updated for submission to the 2.4.x kernel.
10   -
11   -Thanks:
12   - Terry Murphy from 3Com for tech docs and support,
13   - Adam D. Ligas for testing the driver.
14   -
15   -Note:
16   - This driver will NOT work with the 3C339 Token Ring cards, you need
17   -to use the tms380 driver instead.
18   -
19   -Options:
20   -
21   -The driver accepts three options: ringspeed, pkt_buf_sz and message_level.
22   -
23   -These options can be specified differently for each card found.
24   -
25   -ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will
26   -make the card autosense the ringspeed and join at the appropriate speed,
27   -this will be the default option for most people. 4 or 16 allow you to
28   -explicitly force the card to operate at a certain speed. The card will fail
29   -if you try to insert it at the wrong speed. (Although some hubs will allow
30   -this so be *very* careful). The main purpose for explicitly setting the ring
31   -speed is for when the card is first on the ring. In autosense mode, if the card
32   -cannot detect any active monitors on the ring it will open at the same speed as
33   -its last opening. This can be hazardous if this speed does not match the speed
34   -you want the ring to operate at.
35   -
36   -pkt_buf_sz: This is this initial receive buffer allocation size. This will
37   -default to 4096 if no value is entered. You may increase performance of the
38   -driver by setting this to a value larger than the network packet size, although
39   -the driver now re-sizes buffers based on MTU settings as well.
40   -
41   -message_level: Controls level of messages created by the driver. Defaults to 0:
42   -which only displays start-up and critical messages. Presently any non-zero
43   -value will display all soft messages as well. NB This does not turn
44   -debugging messages on, that must be done by modified the source code.
45   -
46   -Variable MTU size:
47   -
48   -The driver can handle a MTU size up to either 4500 or 18000 depending upon
49   -ring speed. The driver also changes the size of the receive buffers as part
50   -of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
51   -to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
52   -position = 296,000 bytes of memory space, plus of course anything
53   -necessary for the tx sk_buff's. Remember this is per card, so if you are
54   -building routers, gateway's etc, you could start to use a lot of memory
55   -real fast.
56   -
57   -2/17/02 Mike Phillips
58   -
79 Documentation/networking/olympic.txt
... ... @@ -1,79 +0,0 @@
1   -
2   -IBM PCI Pit/Pit-Phy/Olympic CHIPSET BASED TOKEN RING CARDS README
3   -
4   -Release 0.2.0 - Release
5   - June 8th 1999 Peter De Schrijver & Mike Phillips
6   -Release 0.9.C - Release
7   - April 18th 2001 Mike Phillips
8   -
9   -Thanks:
10   -Erik De Cock, Adrian Bridgett and Frank Fiene for their
11   -patience and testing.
12   -Donald Champion for the cardbus support
13   -Kyle Lucke for the dma api changes.
14   -Jonathon Bitner for hardware support.
15   -Everybody on linux-tr for their continued support.
16   -
17   -Options:
18   -
19   -The driver accepts four options: ringspeed, pkt_buf_sz,
20   -message_level and network_monitor.
21   -
22   -These options can be specified differently for each card found.
23   -
24   -ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will
25   -make the card autosense the ringspeed and join at the appropriate speed,
26   -this will be the default option for most people. 4 or 16 allow you to
27   -explicitly force the card to operate at a certain speed. The card will fail
28   -if you try to insert it at the wrong speed. (Although some hubs will allow
29   -this so be *very* careful). The main purpose for explicitly setting the ring
30   -speed is for when the card is first on the ring. In autosense mode, if the card
31   -cannot detect any active monitors on the ring it will not open, so you must
32   -re-init the card at the appropriate speed. Unfortunately at present the only
33   -way of doing this is rmmod and insmod which is a bit tough if it is compiled
34   -in the kernel.
35   -
36   -pkt_buf_sz: This is this initial receive buffer allocation size. This will
37   -default to 4096 if no value is entered. You may increase performance of the
38   -driver by setting this to a value larger than the network packet size, although
39   -the driver now re-sizes buffers based on MTU settings as well.
40   -
41   -message_level: Controls level of messages created by the driver. Defaults to 0:
42   -which only displays start-up and critical messages. Presently any non-zero
43   -value will display all soft messages as well. NB This does not turn
44   -debugging messages on, that must be done by modified the source code.
45   -
46   -network_monitor: Any non-zero value will provide a quasi network monitoring
47   -mode. All unexpected MAC frames (beaconing etc.) will be received
48   -by the driver and the source and destination addresses printed.
49   -Also an entry will be added in /proc/net called olympic_tr%d, where tr%d
50   -is the registered device name, i.e tr0, tr1, etc. This displays low
51   -level information about the configuration of the ring and the adapter.
52   -This feature has been designed for network administrators to assist in
53   -the diagnosis of network / ring problems. (This used to OLYMPIC_NETWORK_MONITOR,
54   -but has now changed to allow each adapter to be configured differently and
55   -to alleviate the necessity to re-compile olympic to turn the option on).
56   -
57   -Multi-card:
58   -
59   -The driver will detect multiple cards and will work with shared interrupts,
60   -each card is assigned the next token ring device, i.e. tr0 , tr1, tr2. The
61   -driver should also happily reside in the system with other drivers. It has
62   -been tested with ibmtr.c running, and I personally have had one Olicom PCI
63   -card and two IBM olympic cards (all on the same interrupt), all running
64   -together.
65   -
66   -Variable MTU size:
67   -
68   -The driver can handle a MTU size up to either 4500 or 18000 depending upon
69   -ring speed. The driver also changes the size of the receive buffers as part
70   -of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
71   -to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
72   -position = 296,000 bytes of memory space, plus of course anything
73   -necessary for the tx sk_buff's. Remember this is per card, so if you are
74   -building routers, gateway's etc, you could start to use a lot of memory
75   -real fast.
76   -
77   -
78   -6/8/99 Peter De Schrijver and Mike Phillips
79   -
66 Documentation/networking/smctr.txt
... ... @@ -1,66 +0,0 @@
1   -Text File for the SMC TokenCard TokenRing Linux driver (smctr.c).
2   - By Jay Schulist <jschlst@samba.org>
3   -
4   -The Linux SMC Token Ring driver works with the SMC TokenCard Elite (8115T)
5   -ISA and SMC TokenCard Elite/A (8115T/A) MCA adapters.
6   -
7   -Latest information on this driver can be obtained on the Linux-SNA WWW site.
8   -Please point your browser to: http://www.linux-sna.org
9   -
10   -This driver is rather simple to use. Select Y to Token Ring adapter support
11   -in the kernel configuration. A choice for SMC Token Ring adapters will
12   -appear. This drives supports all SMC ISA/MCA adapters. Choose this
13   -option. I personally recommend compiling the driver as a module (M), but if you
14   -you would like to compile it statically answer Y instead.
15   -
16   -This driver supports multiple adapters without the need to load multiple copies
17   -of the driver. You should be able to load up to 7 adapters without any kernel
18   -modifications, if you are in need of more please contact the maintainer of this
19   -driver.
20   -
21   -Load the driver either by lilo/loadlin or as a module. When a module using the
22   -following command will suffice for most:
23   -
24   -# modprobe smctr
25   -smctr.c: v1.00 12/6/99 by jschlst@samba.org
26   -tr0: SMC TokenCard 8115T at Io 0x300, Irq 10, Rom 0xd8000, Ram 0xcc000.
27   -
28   -Now just setup the device via ifconfig and set and routes you may have. After
29   -this you are ready to start sending some tokens.
30   -
31   -Errata:
32   -1). For anyone wondering where to pick up the SMC adapters please browse
33   - to http://www.smc.com
34   -
35   -2). If you are the first/only Token Ring Client on a Token Ring LAN, please
36   - specify the ringspeed with the ringspeed=[4/16] module option. If no
37   - ringspeed is specified the driver will attempt to autodetect the ring
38   - speed and/or if the adapter is the first/only station on the ring take
39   - the appropriate actions.
40   -
41   - NOTE: Default ring speed is 16MB UTP.
42   -
43   -3). PnP support for this adapter sucks. I recommend hard setting the
44   - IO/MEM/IRQ by the jumpers on the adapter. If this is not possible
45   - load the module with the following io=[ioaddr] mem=[mem_addr]
46   - irq=[irq_num].
47   -
48   - The following IRQ, IO, and MEM settings are supported.
49   -
50   - IO ports:
51   - 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, 0x300,
52   - 0x320, 0x340, 0x360, 0x380.
53   -
54   - IRQs:
55   - 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15
56   -
57   - Memory addresses:
58   - 0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000,
59   - 0xB8000, 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000,
60   - 0xD0000, 0xD4000, 0xD8000, 0xDC000, 0xE0000, 0xE4000,
61   - 0xE8000, 0xEC000, 0xF0000, 0xF4000, 0xF8000, 0xFC000
62   -
63   -This driver is under the GNU General Public License. Its Firmware image is
64   -included as an initialized C-array and is licensed by SMC to the Linux
65   -users of this driver. However no warranty about its fitness is expressed or
66   -implied by SMC.
147 Documentation/networking/tms380tr.txt
... ... @@ -1,147 +0,0 @@
1   -Text file for the Linux SysKonnect Token Ring ISA/PCI Adapter Driver.
2   - Text file by: Jay Schulist <jschlst@samba.org>
3   -
4   -The Linux SysKonnect Token Ring driver works with the SysKonnect TR4/16(+) ISA,
5   -SysKonnect TR4/16(+) PCI, SysKonnect TR4/16 PCI, and older revisions of the
6   -SK NET TR4/16 ISA card.
7   -
8   -Latest information on this driver can be obtained on the Linux-SNA WWW site.
9   -Please point your browser to:
10   -http://www.linux-sna.org
11   -
12   -Many thanks to Christoph Goos for his excellent work on this driver and
13   -SysKonnect for donating the adapters to Linux-SNA for the testing and
14   -maintenance of this device driver.
15   -
16   -Important information to be noted:
17   -1. Adapters can be slow to open (~20 secs) and close (~5 secs), please be
18   - patient.
19   -2. This driver works very well when autoprobing for adapters. Why even
20   - think about those nasty io/int/dma settings of modprobe when the driver
21   - will do it all for you!
22   -
23   -This driver is rather simple to use. Select Y to Token Ring adapter support
24   -in the kernel configuration. A choice for SysKonnect Token Ring adapters will
25   -appear. This drives supports all SysKonnect ISA and PCI adapters. Choose this
26   -option. I personally recommend compiling the driver as a module (M), but if you
27   -you would like to compile it statically answer Y instead.
28   -
29   -This driver supports multiple adapters without the need to load multiple copies
30   -of the driver. You should be able to load up to 7 adapters without any kernel
31   -modifications, if you are in need of more please contact the maintainer of this
32   -driver.
33   -
34   -Load the driver either by lilo/loadlin or as a module. When a module using the
35   -following command will suffice for most:
36   -
37   -# modprobe sktr
38   -
39   -This will produce output similar to the following: (Output is user specific)
40   -
41   -sktr.c: v1.01 08/29/97 by Christoph Goos
42   -tr0: SK NET TR 4/16 PCI found at 0x6100, using IRQ 17.
43   -tr1: SK NET TR 4/16 PCI found at 0x6200, using IRQ 16.
44   -tr2: SK NET TR 4/16 ISA found at 0xa20, using IRQ 10 and DMA 5.
45   -
46   -Now just setup the device via ifconfig and set and routes you may have. After
47   -this you are ready to start sending some tokens.
48   -
49   -Errata:
50   -For anyone wondering where to pick up the SysKonnect adapters please browse
51   -to http://www.syskonnect.com
52   -
53   -This driver is under the GNU General Public License. Its Firmware image is
54   -included as an initialized C-array and is licensed by SysKonnect to the Linux
55   -users of this driver. However no warranty about its fitness is expressed or
56   -implied by SysKonnect.
57   -
58   -Below find attached the setting for the SK NET TR 4/16 ISA adapters
59   --------------------------------------------------------------------
60   -
61   - ***************************
62   - *** C O N T E N T S ***
63   - ***************************
64   -
65   - 1) Location of DIP-Switch W1
66   - 2) Default settings
67   - 3) DIP-Switch W1 description
68   -
69   -
70   - ==============================================================
71   - CHAPTER 1 LOCATION OF DIP-SWITCH
72   - ==============================================================
73   -
74   -UÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
75   -þUÄÄÄÄÄÄ¿ UÄÄÄÄÄ¿ UÄÄÄ¿ þ
76   -þAÄÄÄÄÄÄU W1 AÄÄÄÄÄU UÄÄÄÄ¿ þ þ þ
77   -þUÄÄÄÄÄÄ¿ þ þ þ þ UÄÄÅ¿
78   -þAÄÄÄÄÄÄU UÄÄÄÄÄÄÄÄÄÄÄ¿ AÄÄÄÄU þ þ þ þþ
79   -þUÄÄÄÄÄÄ¿ þ þ UÄÄÄ¿ AÄÄÄU AÄÄÅU
80   -þAÄÄÄÄÄÄU þ TMS380C26 þ þ þ þ
81   -þUÄÄÄÄÄÄ¿ þ þ AÄÄÄU AÄ¿
82   -þAÄÄÄÄÄÄU þ þ þ þ
83   -þ AÄÄÄÄÄÄÄÄÄÄÄU þ þ
84   -þ þ þ
85   -þ AÄU
86   -þ þ
87   -þ þ
88   -þ þ
89   -þ þ
90   -AÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄU
91   - AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU
92   -
93   - ==============================================================
94   - CHAPTER 2 DEFAULT SETTINGS
95   - ==============================================================
96   -
97   - W1 1 2 3 4 5 6 7 8
98   - +------------------------------+
99   - | ON X |
100   - | OFF X X X X X X X |
101   - +------------------------------+
102   -
103   - W1.1 = ON Adapter drives address lines SA17..19
104   - W1.2 - 1.5 = OFF BootROM disabled
105   - W1.6 - 1.8 = OFF I/O address 0A20h
106   -
107   - ==============================================================
108   - CHAPTER 3 DIP SWITCH W1 DESCRIPTION
109   - ==============================================================
110   -
111   - UÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄ¿ ON
112   - þ 1 þ 2 þ 3 þ 4 þ 5 þ 6 þ 7 þ 8 þ
113   - AÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄU OFF
114   - |AD | BootROM Addr. | I/O |
115   - +-+-+-------+-------+-----+-----+
116   - | | |
117   - | | +------ 6 7 8
118   - | | ON ON ON 1900h
119   - | | ON ON OFF 0900h
120   - | | ON OFF ON 1980h
121   - | | ON OFF OFF 0980h
122   - | | OFF ON ON 1b20h
123   - | | OFF ON OFF 0b20h
124   - | | OFF OFF ON 1a20h
125   - | | OFF OFF OFF 0a20h (+)
126   - | |
127   - | |
128   - | +-------- 2 3 4 5
129   - | OFF x x x disabled (+)
130   - | ON ON ON ON C0000
131   - | ON ON ON OFF C4000
132   - | ON ON OFF ON C8000
133   - | ON ON OFF OFF CC000
134   - | ON OFF ON ON D0000
135   - | ON OFF ON OFF D4000
136   - | ON OFF OFF ON D8000
137   - | ON OFF OFF OFF DC000
138   - |
139   - |
140   - +----- 1
141   - OFF adapter does NOT drive SA<17..19>
142   - ON adapter drives SA<17..19> (+)
143   -
144   -
145   - (+) means default setting
146   -
147   - ********************************
4 arch/mips/configs/mtx1_defconfig
@@ -346,11 +346,8 @@ CONFIG_CHELSIO_T1=m
346 346 CONFIG_IXGB=m
347 347 CONFIG_S2IO=m
348 348 CONFIG_MYRI10GE=m
349   -CONFIG_TR=y
350 349 CONFIG_IBMOL=m
351 350 CONFIG_IBMLS=m
352   -CONFIG_3C359=m
353   -CONFIG_TMS380TR=m
354 351 CONFIG_TMSPCI=m
355 352 CONFIG_ABYSS=m
356 353 CONFIG_USB_CATC=m
@@ -376,7 +373,6 @@ CONFIG_PCMCIA_SMC91C92=m
376 373 CONFIG_PCMCIA_XIRC2PS=m
377 374 CONFIG_PCMCIA_AXNET=m
378 375 CONFIG_ARCNET_COM20020_CS=m
379   -CONFIG_PCMCIA_IBMTR=m
380 376 CONFIG_WAN=y
381 377 CONFIG_LANMEDIA=m
382 378 CONFIG_HDLC=m
5 arch/xtensa/configs/common_defconfig
@@ -333,11 +333,6 @@ CONFIG_XT2000_SONIC=y
333 333 # CONFIG_S2IO is not set
334 334
335 335 #
336   -# Token Ring devices
337   -#
338   -# CONFIG_TR is not set
339   -
340   -#
341 336 # Wireless LAN (non-hamradio)
342 337 #
343 338 CONFIG_NET_RADIO=y
1  drivers/message/fusion/mptlan.h
@@ -69,7 +69,6 @@
69 69 #include <linux/spinlock.h>
70 70 #include <linux/workqueue.h>
71 71 #include <linux/delay.h>
72   -// #include <linux/trdevice.h>
73 72
74 73 #include <asm/uaccess.h>
75 74 #include <asm/io.h>
2  drivers/net/Kconfig
@@ -282,8 +282,6 @@ source "drivers/net/slip/Kconfig"
282 282
283 283 source "drivers/s390/net/Kconfig"
284 284
285   -source "drivers/net/tokenring/Kconfig"
286   -
287 285 source "drivers/net/usb/Kconfig"
288 286
289 287 source "drivers/net/wireless/Kconfig"
1  drivers/net/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_SLIP) += slip/
50 50 obj-$(CONFIG_SLHC) += slip/
51 51 obj-$(CONFIG_NET_SB1000) += sb1000.o
52 52 obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
53   -obj-$(CONFIG_TR) += tokenring/
54 53 obj-$(CONFIG_WAN) += wan/
55 54 obj-$(CONFIG_WLAN) += wireless/
56 55 obj-$(CONFIG_WIMAX) += wimax/
46 drivers/net/Space.c
@@ -29,7 +29,6 @@
29 29 */
30 30 #include <linux/netdevice.h>
31 31 #include <linux/etherdevice.h>
32   -#include <linux/trdevice.h>
33 32 #include <linux/errno.h>
34 33 #include <linux/init.h>
35 34 #include <linux/netlink.h>
@@ -284,46 +283,6 @@ static void __init ethif_probe2(int unit)
284 283 probe_list2(unit, parport_probes, base_addr == 0));
285 284 }
286 285
287   -#ifdef CONFIG_TR
288   -/* Token-ring device probe */
289   -extern int ibmtr_probe_card(struct net_device *);
290   -extern struct net_device *smctr_probe(int unit);
291   -
292   -static struct devprobe2 tr_probes2[] __initdata = {
293   -#ifdef CONFIG_SMCTR
294   - {smctr_probe, 0},
295   -#endif
296   - {NULL, 0},
297   -};
298   -
299   -static __init int trif_probe(int unit)
300   -{
301   - int err = -ENODEV;
302   -#ifdef CONFIG_IBMTR
303   - struct net_device *dev = alloc_trdev(0);
304   - if (!dev)
305   - return -ENOMEM;
306   -
307   - sprintf(dev->name, "tr%d", unit);
308   - netdev_boot_setup_check(dev);
309   - err = ibmtr_probe_card(dev);
310   - if (err)
311   - free_netdev(dev);
312   -#endif
313   - return err;
314   -}
315   -
316   -static void __init trif_probe2(int unit)
317   -{
318   - unsigned long base_addr = netdev_boot_base("tr", unit);
319   -
320   - if (base_addr == 1)
321   - return;
322   - probe_list2(unit, tr_probes2, base_addr == 0);
323   -}
324   -#endif
325   -
326   -
327 286 /* Statically configured drivers -- order matters here. */
328 287 static int __init net_olddevs_init(void)
329 288 {
@@ -333,11 +292,6 @@ static int __init net_olddevs_init(void)
333 292 for (num = 0; num < 8; ++num)
334 293 sbni_probe(num);
335 294 #endif
336   -#ifdef CONFIG_TR
337   - for (num = 0; num < 8; ++num)
338   - if (!trif_probe(num))
339   - trif_probe2(num);
340   -#endif
341 295 for (num = 0; num < 8; ++num)
342 296 ethif_probe2(num);
343 297
1,831 drivers/net/tokenring/3c359.c
... ... @@ -1,1831 +0,0 @@
1   -/*
2   - * 3c359.c (c) 2000 Mike Phillips (mikep@linuxtr.net) All Rights Reserved
3   - *
4   - * Linux driver for 3Com 3c359 Tokenlink Velocity XL PCI NIC
5   - *
6   - * Base Driver Olympic:
7   - * Written 1999 Peter De Schrijver & Mike Phillips
8   - *
9   - * This software may be used and distributed according to the terms
10   - * of the GNU General Public License, incorporated herein by reference.
11   - *
12   - * 7/17/00 - Clean up, version number 0.9.0. Ready to release to the world.
13   - *
14   - * 2/16/01 - Port up to kernel 2.4.2 ready for submission into the kernel.
15   - * 3/05/01 - Last clean up stuff before submission.
16   - * 2/15/01 - Finally, update to new pci api.
17   - *
18   - * To Do:
19   - */
20   -
21   -/*
22   - * Technical Card Details
23   - *
24   - * All access to data is done with 16/8 bit transfers. The transfer
25   - * method really sucks. You can only read or write one location at a time.
26   - *
27   - * Also, the microcode for the card must be uploaded if the card does not have
28   - * the flashrom on board. This is a 28K bloat in the driver when compiled
29   - * as a module.
30   - *
31   - * Rx is very simple, status into a ring of descriptors, dma data transfer,
32   - * interrupts to tell us when a packet is received.
33   - *
34   - * Tx is a little more interesting. Similar scenario, descriptor and dma data
35   - * transfers, but we don't have to interrupt the card to tell it another packet
36   - * is ready for transmission, we are just doing simple memory writes, not io or mmio
37   - * writes. The card can be set up to simply poll on the next
38   - * descriptor pointer and when this value is non-zero will automatically download
39   - * the next packet. The card then interrupts us when the packet is done.
40   - *
41   - */
42   -
43   -#define XL_DEBUG 0
44   -
45   -#include <linux/jiffies.h>
46   -#include <linux/module.h>
47   -#include <linux/kernel.h>
48   -#include <linux/errno.h>
49   -#include <linux/timer.h>
50   -#include <linux/in.h>
51   -#include <linux/ioport.h>
52   -#include <linux/string.h>
53   -#include <linux/proc_fs.h>
54   -#include <linux/ptrace.h>
55   -#include <linux/skbuff.h>
56   -#include <linux/interrupt.h>
57   -#include <linux/delay.h>
58   -#include <linux/netdevice.h>
59   -#include <linux/trdevice.h>
60   -#include <linux/stddef.h>
61   -#include <linux/init.h>
62   -#include <linux/pci.h>
63   -#include <linux/spinlock.h>
64   -#include <linux/bitops.h>
65   -#include <linux/firmware.h>
66   -#include <linux/slab.h>
67   -
68   -#include <net/checksum.h>
69   -
70   -#include <asm/io.h>
71   -
72   -#include "3c359.h"
73   -
74   -static char version[] __devinitdata =
75   -"3c359.c v1.2.0 2/17/01 - Mike Phillips (mikep@linuxtr.net)" ;
76   -
77   -#define FW_NAME "3com/3C359.bin"
78   -MODULE_AUTHOR("Mike Phillips <mikep@linuxtr.net>") ;
79   -MODULE_DESCRIPTION("3Com 3C359 Velocity XL Token Ring Adapter Driver\n") ;
80   -MODULE_FIRMWARE(FW_NAME);
81   -
82   -/* Module parameters */
83   -
84   -/* Ring Speed 0,4,16
85   - * 0 = Autosense
86   - * 4,16 = Selected speed only, no autosense
87   - * This allows the card to be the first on the ring
88   - * and become the active monitor.
89   - *
90   - * WARNING: Some hubs will allow you to insert
91   - * at the wrong speed.
92   - *
93   - * The adapter will _not_ fail to open if there are no
94   - * active monitors on the ring, it will simply open up in
95   - * its last known ringspeed if no ringspeed is specified.
96   - */
97   -
98   -static int ringspeed[XL_MAX_ADAPTERS] = {0,} ;
99   -
100   -module_param_array(ringspeed, int, NULL, 0);
101   -MODULE_PARM_DESC(ringspeed,"3c359: Ringspeed selection - 4,16 or 0") ;
102   -
103   -/* Packet buffer size */
104   -
105   -static int pkt_buf_sz[XL_MAX_ADAPTERS] = {0,} ;
106   -
107   -module_param_array(pkt_buf_sz, int, NULL, 0) ;
108   -MODULE_PARM_DESC(pkt_buf_sz,"3c359: Initial buffer size") ;
109   -/* Message Level */
110   -
111   -static int message_level[XL_MAX_ADAPTERS] = {0,} ;
112   -
113   -module_param_array(message_level, int, NULL, 0) ;
114   -MODULE_PARM_DESC(message_level, "3c359: Level of reported messages") ;
115   -/*
116   - * This is a real nasty way of doing this, but otherwise you
117   - * will be stuck with 1555 lines of hex #'s in the code.
118   - */
119   -
120   -static DEFINE_PCI_DEVICE_TABLE(xl_pci_tbl) =
121   -{
122   - {PCI_VENDOR_ID_3COM,PCI_DEVICE_ID_3COM_3C359, PCI_ANY_ID, PCI_ANY_ID, },
123   - { } /* terminate list */
124   -};
125   -MODULE_DEVICE_TABLE(pci,xl_pci_tbl) ;
126   -
127   -static int xl_init(struct net_device *dev);
128   -static int xl_open(struct net_device *dev);
129   -static int xl_open_hw(struct net_device *dev) ;
130   -static int xl_hw_reset(struct net_device *dev);
131   -static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev);
132   -static void xl_dn_comp(struct net_device *dev);
133   -static int xl_close(struct net_device *dev);
134   -static void xl_set_rx_mode(struct net_device *dev);
135   -static irqreturn_t xl_interrupt(int irq, void *dev_id);
136   -static int xl_set_mac_address(struct net_device *dev, void *addr) ;
137   -static void xl_arb_cmd(struct net_device *dev);
138   -static void xl_asb_cmd(struct net_device *dev) ;
139   -static void xl_srb_cmd(struct net_device *dev, int srb_cmd) ;
140   -static void xl_wait_misr_flags(struct net_device *dev) ;
141   -static int xl_change_mtu(struct net_device *dev, int mtu);
142   -static void xl_srb_bh(struct net_device *dev) ;
143   -static void xl_asb_bh(struct net_device *dev) ;
144   -static void xl_reset(struct net_device *dev) ;
145   -static void xl_freemem(struct net_device *dev) ;
146   -
147   -
148   -/* EEProm Access Functions */
149   -static u16 xl_ee_read(struct net_device *dev, int ee_addr) ;
150   -static void xl_ee_write(struct net_device *dev, int ee_addr, u16 ee_value) ;
151   -
152   -/* Debugging functions */
153   -#if XL_DEBUG
154   -static void print_tx_state(struct net_device *dev) ;
155   -static void print_rx_state(struct net_device *dev) ;
156   -
157   -static void print_tx_state(struct net_device *dev)
158   -{
159   -
160   - struct xl_private *xl_priv = netdev_priv(dev);
161   - struct xl_tx_desc *txd ;
162   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
163   - int i ;
164   -
165   - printk("tx_ring_head: %d, tx_ring_tail: %d, free_ent: %d\n",xl_priv->tx_ring_head,
166   - xl_priv->tx_ring_tail, xl_priv->free_ring_entries) ;
167   - printk("Ring , Address , FSH , DnNextPtr, Buffer, Buffer_Len\n");
168   - for (i = 0; i < 16; i++) {
169   - txd = &(xl_priv->xl_tx_ring[i]) ;
170   - printk("%d, %08lx, %08x, %08x, %08x, %08x\n", i, virt_to_bus(txd),
171   - txd->framestartheader, txd->dnnextptr, txd->buffer, txd->buffer_length ) ;
172   - }
173   -
174   - printk("DNLISTPTR = %04x\n", readl(xl_mmio + MMIO_DNLISTPTR) );
175   -
176   - printk("DmaCtl = %04x\n", readl(xl_mmio + MMIO_DMA_CTRL) );
177   - printk("Queue status = %0x\n",netif_running(dev) ) ;
178   -}
179   -
180   -static void print_rx_state(struct net_device *dev)
181   -{
182   -
183   - struct xl_private *xl_priv = netdev_priv(dev);
184   - struct xl_rx_desc *rxd ;
185   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
186   - int i ;
187   -
188   - printk("rx_ring_tail: %d\n", xl_priv->rx_ring_tail);
189   - printk("Ring , Address , FrameState , UPNextPtr, FragAddr, Frag_Len\n");
190   - for (i = 0; i < 16; i++) {
191   - /* rxd = (struct xl_rx_desc *)xl_priv->rx_ring_dma_addr + (i * sizeof(struct xl_rx_desc)) ; */
192   - rxd = &(xl_priv->xl_rx_ring[i]) ;
193   - printk("%d, %08lx, %08x, %08x, %08x, %08x\n", i, virt_to_bus(rxd),
194   - rxd->framestatus, rxd->upnextptr, rxd->upfragaddr, rxd->upfraglen ) ;
195   - }
196   -
197   - printk("UPLISTPTR = %04x\n", readl(xl_mmio + MMIO_UPLISTPTR));
198   -
199   - printk("DmaCtl = %04x\n", readl(xl_mmio + MMIO_DMA_CTRL));
200   - printk("Queue status = %0x\n",netif_running(dev));
201   -}
202   -#endif
203   -
204   -/*
205   - * Read values from the on-board EEProm. This looks very strange
206   - * but you have to wait for the EEProm to get/set the value before
207   - * passing/getting the next value from the nic. As with all requests
208   - * on this nic it has to be done in two stages, a) tell the nic which
209   - * memory address you want to access and b) pass/get the value from the nic.
210   - * With the EEProm, you have to wait before and between access a) and b).
211   - * As this is only read at initialization time and the wait period is very
212   - * small we shouldn't have to worry about scheduling issues.
213   - */
214   -
215   -static u16 xl_ee_read(struct net_device *dev, int ee_addr)
216   -{
217   - struct xl_private *xl_priv = netdev_priv(dev);
218   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
219   -
220   - /* Wait for EEProm to not be busy */
221   - writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
222   - while ( readw(xl_mmio + MMIO_MACDATA) & EEBUSY ) ;
223   -
224   - /* Tell EEProm what we want to do and where */
225   - writel(IO_WORD_WRITE | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
226   - writew(EEREAD + ee_addr, xl_mmio + MMIO_MACDATA) ;
227   -
228   - /* Wait for EEProm to not be busy */
229   - writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
230   - while ( readw(xl_mmio + MMIO_MACDATA) & EEBUSY ) ;
231   -
232   - /* Tell EEProm what we want to do and where */
233   - writel(IO_WORD_WRITE | EECONTROL , xl_mmio + MMIO_MAC_ACCESS_CMD) ;
234   - writew(EEREAD + ee_addr, xl_mmio + MMIO_MACDATA) ;
235   -
236   - /* Finally read the value from the EEProm */
237   - writel(IO_WORD_READ | EEDATA , xl_mmio + MMIO_MAC_ACCESS_CMD) ;
238   - return readw(xl_mmio + MMIO_MACDATA) ;
239   -}
240   -
241   -/*
242   - * Write values to the onboard eeprom. As with eeprom read you need to
243   - * set which location to write, wait, value to write, wait, with the
244   - * added twist of having to enable eeprom writes as well.
245   - */
246   -
247   -static void xl_ee_write(struct net_device *dev, int ee_addr, u16 ee_value)
248   -{
249   - struct xl_private *xl_priv = netdev_priv(dev);
250   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
251   -
252   - /* Wait for EEProm to not be busy */
253   - writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
254   - while ( readw(xl_mmio + MMIO_MACDATA) & EEBUSY ) ;
255   -
256   - /* Enable write/erase */
257   - writel(IO_WORD_WRITE | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
258   - writew(EE_ENABLE_WRITE, xl_mmio + MMIO_MACDATA) ;
259   -
260   - /* Wait for EEProm to not be busy */
261   - writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
262   - while ( readw(xl_mmio + MMIO_MACDATA) & EEBUSY ) ;
263   -
264   - /* Put the value we want to write into EEDATA */
265   - writel(IO_WORD_WRITE | EEDATA, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
266   - writew(ee_value, xl_mmio + MMIO_MACDATA) ;
267   -
268   - /* Tell EEProm to write eevalue into ee_addr */
269   - writel(IO_WORD_WRITE | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
270   - writew(EEWRITE + ee_addr, xl_mmio + MMIO_MACDATA) ;
271   -
272   - /* Wait for EEProm to not be busy, to ensure write gets done */
273   - writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
274   - while ( readw(xl_mmio + MMIO_MACDATA) & EEBUSY ) ;
275   -
276   - return ;
277   -}
278   -
279   -static const struct net_device_ops xl_netdev_ops = {
280   - .ndo_open = xl_open,
281   - .ndo_stop = xl_close,
282   - .ndo_start_xmit = xl_xmit,
283   - .ndo_change_mtu = xl_change_mtu,
284   - .ndo_set_rx_mode = xl_set_rx_mode,
285   - .ndo_set_mac_address = xl_set_mac_address,
286   -};
287   -
288   -static int __devinit xl_probe(struct pci_dev *pdev,
289   - const struct pci_device_id *ent)
290   -{
291   - struct net_device *dev ;
292   - struct xl_private *xl_priv ;
293   - static int card_no = -1 ;
294   - int i ;
295   -
296   - card_no++ ;
297   -
298   - if (pci_enable_device(pdev)) {
299   - return -ENODEV ;
300   - }
301   -
302   - pci_set_master(pdev);
303   -
304   - if ((i = pci_request_regions(pdev,"3c359"))) {
305   - return i ;
306   - }
307   -
308   - /*
309   - * Allowing init_trdev to allocate the private data will align
310   - * xl_private on a 32 bytes boundary which we need for the rx/tx
311   - * descriptors
312   - */
313   -
314   - dev = alloc_trdev(sizeof(struct xl_private)) ;
315   - if (!dev) {
316   - pci_release_regions(pdev) ;
317   - return -ENOMEM ;
318   - }
319   - xl_priv = netdev_priv(dev);
320   -
321   -#if XL_DEBUG
322   - printk("pci_device: %p, dev:%p, dev->priv: %p, ba[0]: %10x, ba[1]:%10x\n",
323   - pdev, dev, netdev_priv(dev), (unsigned int)pdev->resource[0].start, (unsigned int)pdev->resource[1].start);
324   -#endif
325   -
326   - dev->irq=pdev->irq;
327   - dev->base_addr=pci_resource_start(pdev,0) ;
328   - xl_priv->xl_card_name = pci_name(pdev);
329   - xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE);
330   - xl_priv->pdev = pdev ;
331   -
332   - if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) )
333   - xl_priv->pkt_buf_sz = PKT_BUF_SZ ;
334   - else
335   - xl_priv->pkt_buf_sz = pkt_buf_sz[card_no] ;
336   -
337   - dev->mtu = xl_priv->pkt_buf_sz - TR_HLEN ;
338   - xl_priv->xl_ring_speed = ringspeed[card_no] ;
339   - xl_priv->xl_message_level = message_level[card_no] ;
340   - xl_priv->xl_functional_addr[0] = xl_priv->xl_functional_addr[1] = xl_priv->xl_functional_addr[2] = xl_priv->xl_functional_addr[3] = 0 ;
341   - xl_priv->xl_copy_all_options = 0 ;
342   -
343   - if((i = xl_init(dev))) {
344   - iounmap(xl_priv->xl_mmio) ;
345   - free_netdev(dev) ;
346   - pci_release_regions(pdev) ;
347   - return i ;
348   - }
349   -
350   - dev->netdev_ops = &xl_netdev_ops;
351   - SET_NETDEV_DEV(dev, &pdev->dev);
352   -
353   - pci_set_drvdata(pdev,dev) ;
354   - if ((i = register_netdev(dev))) {
355   - printk(KERN_ERR "3C359, register netdev failed\n") ;
356   - pci_set_drvdata(pdev,NULL) ;
357   - iounmap(xl_priv->xl_mmio) ;
358   - free_netdev(dev) ;
359   - pci_release_regions(pdev) ;
360   - return i ;
361   - }
362   -
363   - printk(KERN_INFO "3C359: %s registered as: %s\n",xl_priv->xl_card_name,dev->name) ;
364   -
365   - return 0;
366   -}
367   -
368   -static int xl_init_firmware(struct xl_private *xl_priv)
369   -{
370   - int err;
371   -
372   - err = request_firmware(&xl_priv->fw, FW_NAME, &xl_priv->pdev->dev);
373   - if (err) {
374   - printk(KERN_ERR "Failed to load firmware \"%s\"\n", FW_NAME);
375   - return err;
376   - }
377   -
378   - if (xl_priv->fw->size < 16) {
379   - printk(KERN_ERR "Bogus length %zu in \"%s\"\n",
380   - xl_priv->fw->size, FW_NAME);
381   - release_firmware(xl_priv->fw);
382   - err = -EINVAL;
383   - }
384   -
385   - return err;
386   -}
387   -
388   -static int __devinit xl_init(struct net_device *dev)
389   -{
390   - struct xl_private *xl_priv = netdev_priv(dev);
391   - int err;
392   -
393   - printk(KERN_INFO "%s\n", version);
394   - printk(KERN_INFO "%s: I/O at %hx, MMIO at %p, using irq %d\n",
395   - xl_priv->xl_card_name, (unsigned int)dev->base_addr ,xl_priv->xl_mmio, dev->irq);
396   -
397   - spin_lock_init(&xl_priv->xl_lock) ;
398   -
399   - err = xl_init_firmware(xl_priv);
400   - if (err == 0)
401   - err = xl_hw_reset(dev);
402   -
403   - return err;
404   -}
405   -
406   -
407   -/*
408   - * Hardware reset. This needs to be a separate entity as we need to reset the card
409   - * when we change the EEProm settings.
410   - */
411   -
412   -static int xl_hw_reset(struct net_device *dev)
413   -{
414   - struct xl_private *xl_priv = netdev_priv(dev);
415   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
416   - unsigned long t ;
417   - u16 i ;
418   - u16 result_16 ;
419   - u8 result_8 ;
420   - u16 start ;
421   - int j ;
422   -
423   - if (xl_priv->fw == NULL)
424   - return -EINVAL;
425   -
426   - /*
427   - * Reset the card. If the card has got the microcode on board, we have
428   - * missed the initialization interrupt, so we must always do this.
429   - */
430   -
431   - writew( GLOBAL_RESET, xl_mmio + MMIO_COMMAND ) ;
432   -
433   - /*
434   - * Must wait for cmdInProgress bit (12) to clear before continuing with
435   - * card configuration.
436   - */
437   -
438   - t=jiffies;
439   - while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) {
440   - schedule();
441   - if (time_after(jiffies, t + 40 * HZ)) {
442   - printk(KERN_ERR "%s: 3COM 3C359 Velocity XL card not responding to global reset.\n", dev->name);
443   - return -ENODEV;
444   - }
445   - }
446   -
447   - /*
448   - * Enable pmbar by setting bit in CPAttention
449   - */
450   -
451   - writel( (IO_BYTE_READ | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
452   - result_8 = readb(xl_mmio + MMIO_MACDATA) ;
453   - result_8 = result_8 | CPA_PMBARVIS ;
454   - writel( (IO_BYTE_WRITE | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
455   - writeb(result_8, xl_mmio + MMIO_MACDATA) ;
456   -
457   - /*
458   - * Read cpHold bit in pmbar, if cleared we have got Flashrom on board.
459   - * If not, we need to upload the microcode to the card
460   - */
461   -
462   - writel( (IO_WORD_READ | PMBAR),xl_mmio + MMIO_MAC_ACCESS_CMD);
463   -
464   -#if XL_DEBUG
465   - printk(KERN_INFO "Read from PMBAR = %04x\n", readw(xl_mmio + MMIO_MACDATA));
466   -#endif
467   -
468   - if ( readw( (xl_mmio + MMIO_MACDATA)) & PMB_CPHOLD ) {
469   -
470   - /* Set PmBar, privateMemoryBase bits (8:2) to 0 */
471   -
472   - writel( (IO_WORD_READ | PMBAR),xl_mmio + MMIO_MAC_ACCESS_CMD);
473   - result_16 = readw(xl_mmio + MMIO_MACDATA) ;
474   - result_16 = result_16 & ~((0x7F) << 2) ;
475   - writel( (IO_WORD_WRITE | PMBAR), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
476   - writew(result_16,xl_mmio + MMIO_MACDATA) ;
477   -
478   - /* Set CPAttention, memWrEn bit */
479   -
480   - writel( (IO_BYTE_READ | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
481   - result_8 = readb(xl_mmio + MMIO_MACDATA) ;
482   - result_8 = result_8 | CPA_MEMWREN ;
483   - writel( (IO_BYTE_WRITE | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
484   - writeb(result_8, xl_mmio + MMIO_MACDATA) ;
485   -
486   - /*
487   - * Now to write the microcode into the shared ram
488   - * The microcode must finish at position 0xFFFF,
489   - * so we must subtract to get the start position for the code
490   - *
491   - * Looks strange but ensures compiler only uses
492   - * 16 bit unsigned int
493   - */
494   - start = (0xFFFF - (xl_priv->fw->size) + 1) ;
495   -
496   - printk(KERN_INFO "3C359: Uploading Microcode: ");
497   -
498   - for (i = start, j = 0; j < xl_priv->fw->size; i++, j++) {
499   - writel(MEM_BYTE_WRITE | 0XD0000 | i,
500   - xl_mmio + MMIO_MAC_ACCESS_CMD);
501   - writeb(xl_priv->fw->data[j], xl_mmio + MMIO_MACDATA);
502   - if (j % 1024 == 0)
503   - printk(".");
504   - }
505   - printk("\n") ;
506   -
507   - for (i = 0; i < 16; i++) {
508   - writel((MEM_BYTE_WRITE | 0xDFFF0) + i,
509   - xl_mmio + MMIO_MAC_ACCESS_CMD);
510   - writeb(xl_priv->fw->data[xl_priv->fw->size - 16 + i],
511   - xl_mmio + MMIO_MACDATA);
512   - }
513   -
514   - /*
515   - * Have to write the start address of the upload to FFF4, but
516   - * the address must be >> 4. You do not want to know how long
517   - * it took me to discover this.
518   - */
519   -
520   - writel(MEM_WORD_WRITE | 0xDFFF4, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
521   - writew(start >> 4, xl_mmio + MMIO_MACDATA);
522   -
523   - /* Clear the CPAttention, memWrEn Bit */
524   -
525   - writel( (IO_BYTE_READ | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
526   - result_8 = readb(xl_mmio + MMIO_MACDATA) ;
527   - result_8 = result_8 & ~CPA_MEMWREN ;
528   - writel( (IO_BYTE_WRITE | CPATTENTION), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
529   - writeb(result_8, xl_mmio + MMIO_MACDATA) ;
530   -
531   - /* Clear the cpHold bit in pmbar */
532   -
533   - writel( (IO_WORD_READ | PMBAR),xl_mmio + MMIO_MAC_ACCESS_CMD);
534   - result_16 = readw(xl_mmio + MMIO_MACDATA) ;
535   - result_16 = result_16 & ~PMB_CPHOLD ;
536   - writel( (IO_WORD_WRITE | PMBAR), xl_mmio + MMIO_MAC_ACCESS_CMD) ;
537   - writew(result_16,xl_mmio + MMIO_MACDATA) ;
538   -
539   -
540   - } /* If microcode upload required */
541   -
542   - /*
543   - * The card should now go though a self test procedure and get itself ready
544   - * to be opened, we must wait for an srb response with the initialization
545   - * information.
546   - */
547   -
548   -#if XL_DEBUG
549   - printk(KERN_INFO "%s: Microcode uploaded, must wait for the self test to complete\n", dev->name);
550   -#endif
551   -
552   - writew(SETINDENABLE | 0xFFF, xl_mmio + MMIO_COMMAND) ;
553   -
554   - t=jiffies;
555   - while ( !(readw(xl_mmio + MMIO_INTSTATUS_AUTO) & INTSTAT_SRB) ) {
556   - schedule();
557   - if (time_after(jiffies, t + 15 * HZ)) {
558   - printk(KERN_ERR "3COM 3C359 Velocity XL card not responding.\n");
559   - return -ENODEV;
560   - }
561   - }
562   -
563   - /*
564   - * Write the RxBufArea with D000, RxEarlyThresh, TxStartThresh,
565   - * DnPriReqThresh, read the tech docs if you want to know what
566   - * values they need to be.
567   - */
568   -
569   - writel(MMIO_WORD_WRITE | RXBUFAREA, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
570   - writew(0xD000, xl_mmio + MMIO_MACDATA) ;
571   -
572   - writel(MMIO_WORD_WRITE | RXEARLYTHRESH, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
573   - writew(0X0020, xl_mmio + MMIO_MACDATA) ;
574   -
575   - writew( SETTXSTARTTHRESH | 0x40 , xl_mmio + MMIO_COMMAND) ;
576   -
577   - writeb(0x04, xl_mmio + MMIO_DNBURSTTHRESH) ;
578   - writeb(0x04, xl_mmio + DNPRIREQTHRESH) ;
579   -
580   - /*
581   - * Read WRBR to provide the location of the srb block, have to use byte reads not word reads.
582   - * Tech docs have this wrong !!!!
583   - */
584   -
585   - writel(MMIO_BYTE_READ | WRBR, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
586   - xl_priv->srb = readb(xl_mmio + MMIO_MACDATA) << 8 ;
587   - writel( (MMIO_BYTE_READ | WRBR) + 1, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
588   - xl_priv->srb = xl_priv->srb | readb(xl_mmio + MMIO_MACDATA) ;
589   -
590   -#if XL_DEBUG
591   - writel(IO_WORD_READ | SWITCHSETTINGS, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
592   - if ( readw(xl_mmio + MMIO_MACDATA) & 2) {
593   - printk(KERN_INFO "Default ring speed 4 mbps\n");
594   - } else {
595   - printk(KERN_INFO "Default ring speed 16 mbps\n");
596   - }
597   - printk(KERN_INFO "%s: xl_priv->srb = %04x\n",xl_priv->xl_card_name, xl_priv->srb);
598   -#endif
599   -
600   - return 0;
601   -}
602   -
603   -static int xl_open(struct net_device *dev)
604   -{
605   - struct xl_private *xl_priv=netdev_priv(dev);
606   - u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
607   - u8 i ;
608   - __le16 hwaddr[3] ; /* Should be u8[6] but we get word return values */