Commit 662c8869 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 3cd77e0c f96d1ee4
......@@ -2,9 +2,9 @@
All rights reserved
===========================================================================
sk98lin.txt created 18-Jul-2003
sk98lin.txt created 23-Sep-2003
Readme File for sk98lin v6.14
Readme File for sk98lin v6.18
Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX
This file contains
......@@ -19,7 +19,6 @@ This file contains
5 Large Frame Support
6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)
7 Troubleshooting
8 History
===========================================================================
......@@ -76,8 +75,8 @@ follows:
To integrate the driver permanently into the kernel, proceed as follows:
1. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
2. Mark "Marvell Yukon/SysKonnect SK-98xx/SK-95xx Gigabit Ethernet Adapter
support" with (*)
2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
with (*)
3. Build a new kernel when the configuration of the above options is
finished.
4. Install the new kernel.
......@@ -88,8 +87,8 @@ To use the driver as a module, proceed as follows:
1. Enable 'loadable module support' in the kernel.
2. For automatic driver start, enable the 'Kernel module loader'.
3. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
4. Mark "Marvell Yukon/SysKonnect SK-98xx/SK-95xx Gigabit Ethernet Adapter
support" with (M)
4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
with (M)
5. Execute the command "make modules".
6. Execute the command "make modules_install".
The appropiate modules will be installed.
......@@ -201,7 +200,7 @@ You also want to set DuplexCapabilities on the first adapter
to FULL, and on the second adapter to HALF.
Then, you must enter:
modprobe sk98lin AutoNeg=On,Off DupCap=Full,Half
modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half
NOTE: The number of adapters that can be configured this way is
limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM).
......@@ -259,9 +258,9 @@ This parameter can be used to set the flow control capabilities the
port reports during auto-negotiation. It can be set for each port
individually.
Possible modes:
-- Sym = Symetric: both link partners are allowed to send
-- Sym = Symmetric: both link partners are allowed to send
PAUSE frames
-- SymOrRem = SymetricOrRemote: both or only remote partner
-- SymOrRem = SymmetricOrRemote: both or only remote partner
are allowed to send PAUSE frames
-- LocSend = LocalSend: only local link partner is allowed
to send PAUSE frames
......@@ -286,7 +285,7 @@ with this parameter.
4.2 Adapter Parameters
-----------------------
Connection Type
Connection Type (SK-98xx V2.0 copper adapters only)
---------------
Parameter: ConType
Values: Auto, 100FD, 100HD, 10FD, 10HD
......@@ -546,7 +545,7 @@ Problem: Upon driver start, the following error message is displayed:
Nr: 0xcc
Msg: SkGeInitPort() cannot init running ports"
Reason: You are using a driver compiled for single processor machines
on a multiprocessor machine with SMP (Symetric MultiProcessor)
on a multiprocessor machine with SMP (Symmetric MultiProcessor)
kernel.
Solution: Configure your kernel appropriately and recompile the kernel or
the modules.
......@@ -564,216 +563,6 @@ information is available:
- Driver version
***
8 History
==========
VERSION 6.14
New Features:
- None
Problems fixed:
- Fix: memory leak when sending short padded frames
- Fix: helptext for menuconfig in kernel 2.6 updated
- Fix: PNMI_READ defines retrieve correct amount of bytes
Known limitations:
- None
VERSION 6.13
New Features:
- New parameter ConType combining different per-port parameters
Problems fixed:
- Fix: change of MTU-size without warning (bugreport #10721)
- Fix: HW checksumming when Kernel 2.5/2.6 corrected
- Fix: Padding of small packets (<60 bytes) not 0xaa, but 0x00 instead
- Fix: Minor edits corrected
- Fix: Obsolete function SetQueueSize() removed
- Fix: Removed proprietary defines - used defines from skgehw.h instead
Known limitations:
- None
VERSION 6.12
New Features:
- enabling/disabling checksum
Problems fixed:
- Fix: KLM load/unload using new refcount interface for Kernel 2.5/2.6
Known limitations:
- None
VERSION 6.11 (In-Kernel version)
New Features:
- Support for Kernel 2.5/2.6
- Support for new IO-control MIB data structure
- New SkOsGetTime function
Problems fixed:
- Fix: Race condition with broken LM80 chip
- Fix: Common modules update (#10803, #10768, #10767)
- Fix: Dim, ProcFS, Isr, Module Support changes for Kernel 2.5/2.6
Known limitations:
- None
VERSION 6.10
New Features:
- none
Problems fixed:
- Fix: Race condition with padded frames
Known limitations:
- None
VERSION 6.09
New Features:
- none
Problems fixed:
- Fix: Disabled HW Error IRQ on 32-bit Yukon if sensor IRQ occurs
- Fix: Delay race condition with some server machines
Known limitations:
- None
VERSION 6.08
New Features:
- Add: Dynamic Interrupt moderation
- Add: Blink mode verification
- Fix: CSUM changes
Problems fixed:
- Fix: CSUM changes
Known limitations:
- None
VERSION 6.04 - 6.07
New Features:
- Common modules update
Problems fixed:
- none
Known limitations:
- None
VERSION 6.03
New Features:
- Common modules update
Problems fixed:
- Remove useless init_module/cleanup_module forward declarations
Known limitations:
- None
VERSION 6.02 (In-Kernel version)
New Features:
- Common modules update
Problems fixed:
- Boot message cleanup
Known limitations:
- None
VERSION 6.00 (In-Kernel version)
New Features:
- Support for SK-98xx V2.0 adapters
- Support for gmac
- Support for kernel 2.4.x and kernel 2.2.x
- Zerocopy support for kernel 2.4.x with sendfile()
- Support for scatter-gather functionality with sendfile()
- Speed support for SK-98xx V2.0 adapters
- New ProcFs entries
- New module parameters
Problems fixed:
- ProcFS initialization
- csum packet error
- Ierror/crc counter error (#10767)
- rx_too_long counter error (#10751)
Known limitations:
- None
VERSION 4.11
New Features:
- none
Problems fixed:
- Error statistic counter fix (#10620)
- RLMT-Fixes (#10659, #10639, #10650)
- LM80 sensor initialization fix (#10623)
- SK-CSUM memory fixes (#10610).
Known limitations:
- None
VERSION 4.10
New Features:
- New ProcFs entries
Problems fixed:
- Corrected some printk's
Known limitations:
- None
VERSION 4.09
New Features:
- IFF_RUNNING support (link status)
- New ProcFs entries
Problems fixed:
- too long counters
- too short counters
- Kernel error compilation
Known limitations:
- None
VERSION 4.06 (In-Kernel version)
Problems fixed:
- MTU init problems
VERSION 4.04
Problems fixed:
- removed VLAN error messages
VERSION 4.02 (In-Kernel version)
New Features:
- Add Kernel 2.4 changes
Known limitations:
- None
VERSION 4.01 (In-Kernel version)
Problems fixed:
- Full statistics support for DualNet mode
Known limitations:
- None
VERSION 4.00 (In-Kernel version)
Problems fixed:
- Memory leak found
New Features:
- Proc filesystem integration
- DualNet functionality integrated
- Rlmt networks added
Known limitations:
- statistics partially incorrect in DualNet mode
VERSION 3.04 (In-Kernel version)
Problems fixed:
- Driver start failed on UltraSPARC
- Rx checksum calculation for big endian machines did not work
- Jumbo frames were counted as input-errors in netstat
VERSION 3.03 (Standalone version)
Problems fixed:
- Compilation did not find script "printver.sh" if "." not in PATH
Known limitations:
- None
VERSION 3.02 (In-Kernel version)
Problems fixed:
- None
New Features:
- Integration in Linux kernel source (2.2.14 and 2.3.29)
Known limitations:
- None
VERSION 3.01
Problems fixed:
- None
New Features:
- Full source release
Known limitations:
- None
VERSION 3.00
Problems fixed:
- None
New Features:
- Support for 1000Base-T adapters (SK-9821 and SK-9822)
Known limitations:
- None
***End of Readme File***
......@@ -692,12 +692,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* version-control: t
* kept-new-versions: 5
* c-indent-level: 4
* End:
*/
......@@ -382,9 +382,7 @@ static int __init el3_probe(int card_idx)
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
static int pnp_cards;
struct pnp_dev *idev = NULL;
#endif /* __ISAPNP__ */
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
if (nopnp == 1)
goto no_pnp;
......@@ -440,12 +438,15 @@ static int __init el3_probe(int card_idx)
#else
/* Select an open I/O location at 0x1*0 to do contention select. */
for ( ; id_port < 0x200; id_port += 0x10) {
if (check_region(id_port, 1))
if (!request_region(id_port, 1, "3c509"))
continue;
outb(0x00, id_port);
outb(0xff, id_port);
if (inb(id_port) & 0x01)
if (inb(id_port) & 0x01){
release_region(id_port, 1);
break;
} else
release_region(id_port, 1);
}
if (id_port >= 0x200) {
/* Rare -- do we really need a warning? */
......
......@@ -1173,14 +1173,3 @@ void cleanup_module(void)
#endif /* MODULE */
MODULE_LICENSE("GPL");
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c 8390.c"
* version-control: t
* kept-new-versions: 5
* c-indent-level: 4
* tab-width: 4
* End:
*/
......@@ -1891,18 +1891,23 @@ config SK98LIN
by this driver:
- 3Com 3C940 Gigabit LOM Ethernet Adapter
- 3Com 3C941 Gigabit LOM Ethernet Adapter
- Allied Telesyn AT-2970SX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970SX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970TX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter
- Allied Telesyn AT-2971SX Gigabit Ethernet Adapter
- Allied Telesyn AT-2971T Gigabit Ethernet Adapter
- Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter
- N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)
- DGE-530T Gigabit Ethernet Adapter
- EG1032 v2 Instant Gigabit Network Adapter
- EG1064 v2 Instant Gigabit Network Adapter
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (Abit)
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (Asus)
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (ECS)
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (Epox)
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (Gigabyte)
- Marvell 88E8001 Gigabit LOM Ethernet Adapter (Iwill)
- Marvell RDK-8001 Adapter
- Marvell RDK-8002 Adapter
- Marvell RDK-8003 Adapter
......@@ -1911,27 +1916,31 @@ config SK98LIN
- Marvell RDK-8007 Adapter
- Marvell RDK-8008 Adapter
- Marvell RDK-8009 Adapter
- Marvell RDK-8010 Adapter
- Marvell RDK-8011 Adapter
- Marvell RDK-8012 Adapter
- Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter
- Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (32 bit)
- Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (64 bit)
- N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)
- SK-9521 10/100/1000Base-T Adapter
- SK-9521 V2.0 10/100/1000Base-T Adapter
- SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)
- SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter
- SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)
- SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)
- SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter
- SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)
- SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)
- SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)
- SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)
- SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)
- SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)
- SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)
- SK-9521 V2.0 10/100/1000Base-T Adapter
- SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter
- SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter
- SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter
- SK-9521 10/100/1000Base-T Adapter
- SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)
- SMC EZ Card 1000 (SMC9452TXV.2)
The adapters support Jumbo Frames.
The dual link adapters support link-failover and dual port features.
......@@ -1945,141 +1954,6 @@ config SK98LIN
To compile this driver as a module, choose M here: the module
will be called sk98lin. This is recommended.
config CONFIG_SK98LIN_T1
bool "3Com 3C940/3C941 Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- 3Com 3C940 Gigabit LOM Ethernet Adapter
- 3Com 3C941 Gigabit LOM Ethernet Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T2
bool "Allied Telesyn AT-29xx Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- Allied Telesyn AT-2970SX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
- Allied Telesyn AT-2970TX Gigabit Ethernet Adapter
- Allied Telesyn AT-2971SX Gigabit Ethernet Adapter
- Allied Telesyn AT-2971T Gigabit Ethernet Adapter
- Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter
- Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T3
bool "CNet N-Way Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T4
bool "D-Link DGE-530T Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- DGE-530T Gigabit Ethernet Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T5
bool "Linksys EG10xx Ethernet Server Adapter"
depends on SK98LIN
help
This driver supports:
- EG1032 v2 Instant Gigabit Network Adapter
- EG1064 v2 Instant Gigabit Network Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T6
bool "Marvell RDK-80xx Adapter"
depends on SK98LIN
help
This driver supports:
- Marvell RDK-8001 Adapter
- Marvell RDK-8002 Adapter
- Marvell RDK-8003 Adapter
- Marvell RDK-8004 Adapter
- Marvell RDK-8006 Adapter
- Marvell RDK-8007 Adapter
- Marvell RDK-8008 Adapter
- Marvell RDK-8009 Adapter
- Marvell RDK-8011 Adapter
- Marvell RDK-8012 Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T7
bool "Marvell Yukon Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T8
bool "SysKonnect SK-98xx Server Gigabit Adapter"
depends on SK98LIN
help
This driver supports:
- SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)
- SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)
- SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)
- SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)
- SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)
- SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)
- SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)
- SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)
- SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)
- SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config CONFIG_SK98LIN_T9
bool "SysKonnect SK-98xx V2.0 Gigabit Ethernet Adapter"
depends on SK98LIN
help
This driver supports:
- SK-9521 V2.0 10/100/1000Base-T Adapter
- SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter
- SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter
- SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter
- SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter
- SK-9521 10/100/1000Base-T Adapter
Questions concerning this driver may be addressed to:
linux@syskonnect.de
config TIGON3
tristate "Broadcom Tigon3 support"
depends on PCI
......
......@@ -396,13 +396,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c ac3200.c"
* version-control: t
* kept-new-versions: 5
* tab-width: 4
* End:
*/
......@@ -21,11 +21,9 @@ config ARCNET
from <http://www.tldp.org/docs.html#howto>(even though ARCnet
is not really Ethernet).
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called arcnet. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called arcnet.
config ARCNET_1201
tristate "Enable standard ARCNet packet format (RFC 1201)"
......@@ -69,11 +67,9 @@ config ARCNET_COM90xx
have always used the old ARCnet driver without knowing what type of
card you had, this is probably the one for you.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called com90xx. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called com90xx.
config ARCNET_COM90xxIO
tristate "ARCnet COM90xx (IO mapped) chipset driver"
......@@ -84,11 +80,9 @@ config ARCNET_COM90xxIO
the normal driver. Only use it if your card doesn't support shared
memory.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called com90io. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called com90io.
config ARCNET_RIM_I
tristate "ARCnet COM90xx (RIM I) chipset driver"
......@@ -99,11 +93,9 @@ config ARCNET_RIM_I
driver is completely untested, so if you have one of these cards,
please mail dwmw2@infradead.org, especially if it works!
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you
want). The module will be called arc-rimi. If you want to compile
it as a module, say M here and read <file:Documentation/modules.txt>
as well as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called arc-rimi.
config ARCNET_COM20020
tristate "ARCnet COM20020 chipset driver"
......@@ -113,11 +105,9 @@ config ARCNET_COM20020
things as promiscuous mode, so packet sniffing is possible, and
extra diagnostic information.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called com20020. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt> as
well as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called com20020.
config ARCNET_COM20020_ISA
tristate "Support for COM20020 on ISA"
......
......@@ -440,13 +440,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c e2100.c"
* version-control: t
* tab-width: 4
* kept-new-versions: 5
* End:
*/
......@@ -98,7 +98,7 @@ KERN_INFO "baycom_epp: version 0.7 compiled " __TIME__ " " __DATE__ "\n";
#define NR_PORTS 4
static struct net_device baycom_device[NR_PORTS];
static struct net_device *baycom_device[NR_PORTS];
/* --------------------------------------------------------------------- */
......@@ -1084,7 +1084,6 @@ static int epp_open(struct net_device *dev)
/* start the bottom half stuff */
schedule_delayed_work(&bc->run_work, 1);
netif_start_queue(dev);
MOD_INC_USE_COUNT;
return 0;
epptimeout:
......@@ -1119,7 +1118,6 @@ static int epp_close(struct net_device *dev)
bc->skb = NULL;
printk(KERN_INFO "%s: close epp at iobase 0x%lx irq %u\n",
bc_drvname, dev->base_addr, dev->irq);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -1357,69 +1355,76 @@ MODULE_LICENSE("GPL");
/* --------------------------------------------------------------------- */
static void __init baycom_epp_setup(struct net_device *dev)
{
struct baycom_state *bc = dev->priv;
/*
* initialize part of the baycom_state struct
*/
bc->magic = BAYCOM_MAGIC;
bc->cfg.fclk = 19666600;
bc->cfg.bps = 9600;
/*
* initialize part of the device struct
*/
dev->init = baycom_probe;
}
static int __init init_baycomepp(void)
{
struct net_device *dev;
int i, found = 0;
char set_hw = 1;
struct baycom_state *bc;
printk(bc_drvinfo);
/*
* register net devices
*/
for (i = 0; i < NR_PORTS; i++) {
dev = baycom_device+i;
struct net_device *dev;
dev = alloc_netdev(sizeof(struct baycom_state), "bce%d",
baycom_epp_setup);
if (!dev) {
printk(KERN_WARNING "bce%d : out of memory\n", i);
return found ? 0 : -ENOMEM;
}
sprintf(dev->name, "bce%d", i);
dev->base_addr = iobase[i];
if (!mode[i])
set_hw = 0;
if (!set_hw)
iobase[i] = 0;
memset(dev, 0, sizeof(struct net_device));
if (!(bc = dev->priv = kmalloc(sizeof(struct baycom_state), GFP_KERNEL)))
return -ENOMEM;
/*
* initialize part of the baycom_state struct
*/
memset(bc, 0, sizeof(struct baycom_state));
bc->magic = BAYCOM_MAGIC;
sprintf(dev->name, "bce%d", i);
bc->cfg.fclk = 19666600;
bc->cfg.bps = 9600;
/*
* initialize part of the device struct
*/
dev->if_port = 0;
dev->init = baycom_probe;
dev->base_addr = iobase[i];
dev->irq = 0;
dev->dma = 0;
if (register_netdev(dev)) {
printk(KERN_WARNING "%s: cannot register net device %s\n", bc_drvname, dev->name);
kfree(dev->priv);
return -ENXIO;
kfree(dev);
break;
}
if (set_hw && baycom_setmode(bc, mode[i]))
if (set_hw && baycom_setmode(dev->priv, mode[i]))
set_hw = 0;
baycom_device[i] = dev;
found++;
}
if (!found)
return -ENXIO;
return 0;
return found ? 0 : -ENXIO;
}
static void __exit cleanup_baycomepp(void)
{
struct net_device *dev;
struct baycom_state *bc;
int i;
for(i = 0; i < NR_PORTS; i++) {
dev = baycom_device+i;
bc = (struct baycom_state *)dev->priv;
if (bc) {
struct net_device *dev = baycom_device[i];
if (dev) {
struct baycom_state *bc = dev->priv;
if (bc->magic == BAYCOM_MAGIC) {
unregister_netdev(dev);
kfree(dev->priv);
free_netdev(dev);
} else
printk(paranoia_str, "cleanup_module");
}
......
......@@ -107,7 +107,7 @@ KERN_INFO "baycom_par: version 0.9 compiled " __TIME__ " " __DATE__ "\n";
#define NR_PORTS 4
static struct net_device baycom_device[NR_PORTS];
static struct net_device *baycom_device[NR_PORTS];
/* --------------------------------------------------------------------- */
......@@ -352,7 +352,6 @@ static int par96_open(struct net_device *dev)
pp->ops->enable_irq(pp);
printk(KERN_INFO "%s: par96 at iobase 0x%lx irq %u options 0x%x\n",
bc_drvname, dev->base_addr, dev->irq, bc->options);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -374,7 +373,6 @@ static int par96_close(struct net_device *dev)
parport_unregister_device(bc->pdev);
printk(KERN_INFO "%s: close par96 at iobase 0x%lx irq %u\n",
bc_drvname, dev->base_addr, dev->irq);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -389,11 +387,11 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
/* --------------------------------------------------------------------- */
static struct hdlcdrv_ops par96_ops = {
bc_drvname,
bc_drvinfo,
par96_open,
par96_close,
baycom_ioctl
.drvname = bc_drvname,
.drvinfo = bc_drvinfo,
.open = par96_open,
.close = par96_close,
.ioctl = baycom_ioctl
};
/* --------------------------------------------------------------------- */
......@@ -498,35 +496,38 @@ MODULE_LICENSE("GPL");
static int __init init_baycompar(void)
{
int i, j, found = 0;
int i, found = 0;
char set_hw = 1;
struct baycom_state *bc;
printk(bc_drvinfo);
/*
* register net devices
*/
for (i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct net_device *dev;
struct baycom_state *bc;
char ifname[IFNAMSIZ];
sprintf(ifname, "bcp%d", i);
if (!mode[i])
set_hw = 0;
if (!set_hw)
iobase[i] = 0;
j = hdlcdrv_register_hdlcdrv(dev, &par96_ops, sizeof(struct baycom_state),
dev = hdlcdrv_register(&par96_ops,
sizeof(struct baycom_state),
ifname, iobase[i], 0, 0);
if (!j) {
if (IS_ERR(dev))
break;
bc = (struct baycom_state *)dev->priv;
if (set_hw && baycom_setmode(bc, mode[i]))
set_hw = 0;
found++;
} else {
printk(KERN_WARNING "%s: cannot register net device\n",
bc_drvname);
}
baycom_device[i] = dev;
}
if (!found)
return -ENXIO;
return 0;
......@@ -537,16 +538,10 @@ static void __exit cleanup_baycompar(void)
int i;
for(i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct baycom_state *bc = (struct baycom_state *)dev->priv;
struct net_device *dev = baycom_device[i];
if (bc) {
if (bc->hdrv.magic != HDLCDRV_MAGIC)
printk(KERN_ERR "baycom: invalid magic in "
"cleanup_module\n");
else
hdlcdrv_unregister_hdlcdrv(dev);
}
if (dev)
hdlcdrv_unregister(dev);
}
}
......
......@@ -94,7 +94,7 @@ KERN_INFO "baycom_ser_fdx: version 0.10 compiled " __TIME__ " " __DATE__ "\n";
#define NR_PORTS 4
static struct net_device baycom_device[NR_PORTS];
static struct net_device *baycom_device[NR_PORTS];
/* --------------------------------------------------------------------- */
......@@ -459,7 +459,6 @@ static int ser12_open(struct net_device *dev)
hdlcdrv_setdcd(&bc->hdrv, 0);
printk(KERN_INFO "%s: ser_fdx at iobase 0x%lx irq %u baud %u uart %s\n",
bc_drvname, dev->base_addr, dev->irq, bc->baud, uart_str[u]);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -480,7 +479,6 @@ static int ser12_close(struct net_device *dev)
release_region(dev->base_addr, SER12_EXTENT);
printk(KERN_INFO "%s: close ser_fdx at iobase 0x%lx irq %u\n",
bc_drvname, dev->base_addr, dev->irq);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -497,11 +495,11 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
/* --------------------------------------------------------------------- */
static struct hdlcdrv_ops ser12_ops = {
bc_drvname,
bc_drvinfo,
ser12_open,
ser12_close,
baycom_ioctl
.drvname = bc_drvname,
.drvinfo = bc_drvinfo,
.open = ser12_open,
.close = ser12_close,
.ioctl = baycom_ioctl,
};
/* --------------------------------------------------------------------- */
......@@ -621,36 +619,39 @@ MODULE_LICENSE("GPL");
static int __init init_baycomserfdx(void)
{
int i, j, found = 0;
int i, found = 0;
char set_hw = 1;
struct baycom_state *bc;
printk(bc_drvinfo);
/*
* register net devices
*/
for (i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct net_device *dev;
struct baycom_state *bc;
char ifname[IFNAMSIZ];
sprintf(ifname, "bcsf%d", i);
if (!mode[i])
set_hw = 0;
if (!set_hw)
iobase[i] = irq[i] = 0;
j = hdlcdrv_register_hdlcdrv(dev, &ser12_ops, sizeof(struct baycom_state),
dev = hdlcdrv_register(&ser12_ops,
sizeof(struct baycom_state),
ifname, iobase[i], irq[i], 0);
if (!j) {
if (IS_ERR(dev))
break;
bc = (struct baycom_state *)dev->priv;
if (set_hw && baycom_setmode(bc, mode[i]))
set_hw = 0;
bc->baud = baud[i];
found++;
} else {
printk(KERN_WARNING "%s: cannot register net device\n",
bc_drvname);
}
baycom_device[i] = dev;
}
if (!found)
return -ENXIO;
return 0;
......@@ -661,16 +662,9 @@ static void __exit cleanup_baycomserfdx(void)
int i;
for(i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct baycom_state *bc = (struct baycom_state *)dev->priv;
if (bc) {
if (bc->hdrv.magic != HDLCDRV_MAGIC)
printk(KERN_ERR "baycom: invalid magic in "
"cleanup_module\n");
else
hdlcdrv_unregister_hdlcdrv(dev);
}
struct net_device *dev = baycom_device[i];
if (dev)
hdlcdrv_unregister(dev);
}
}
......
......@@ -84,7 +84,7 @@ KERN_INFO "baycom_ser_hdx: version 0.10 compiled " __TIME__ " " __DATE__ "\n";
#define NR_PORTS 4
static struct net_device baycom_device[NR_PORTS];
static struct net_device *baycom_device[NR_PORTS];
/* --------------------------------------------------------------------- */
......@@ -504,7 +504,6 @@ static int ser12_open(struct net_device *dev)
ser12_set_divisor(dev, bc->opt_dcd ? 6 : 4);
printk(KERN_INFO "%s: ser12 at iobase 0x%lx irq %u uart %s\n",
bc_drvname, dev->base_addr, dev->irq, uart_str[u]);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -525,7 +524,6 @@ static int ser12_close(struct net_device *dev)
release_region(dev->base_addr, SER12_EXTENT);
printk(KERN_INFO "%s: close ser12 at iobase 0x%lx irq %u\n",
bc_drvname, dev->base_addr, dev->irq);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -542,11 +540,11 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
/* --------------------------------------------------------------------- */
static struct hdlcdrv_ops ser12_ops = {
bc_drvname,
bc_drvinfo,
ser12_open,
ser12_close,
baycom_ioctl
.drvname = bc_drvname,
.drvinfo = bc_drvinfo,
.open = ser12_open,
.close = ser12_close,
.ioctl = baycom_ioctl,
};
/* --------------------------------------------------------------------- */
......@@ -658,35 +656,38 @@ MODULE_LICENSE("GPL");
static int __init init_baycomserhdx(void)
{
int i, j, found = 0;
int i, found = 0;
char set_hw = 1;
struct baycom_state *bc;
printk(bc_drvinfo);
/*
* register net devices
*/
for (i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct net_device *dev;
struct baycom_state *bc;
char ifname[IFNAMSIZ];
sprintf(ifname, "bcsh%d", i);
if (!mode[i])
set_hw = 0;
if (!set_hw)
iobase[i] = irq[i] = 0;
j = hdlcdrv_register_hdlcdrv(dev, &ser12_ops, sizeof(struct baycom_state),
dev = hdlcdrv_register(&ser12_ops,
sizeof(struct baycom_state),
ifname, iobase[i], irq[i], 0);
if (!j) {
if (IS_ERR(dev))
break;
bc = (struct baycom_state *)dev->priv;
if (set_hw && baycom_setmode(bc, mode[i]))
set_hw = 0;
found++;
} else {
printk(KERN_WARNING "%s: cannot register net device\n",
bc_drvname);
}
baycom_device[i] = dev;
}
if (!found)
return -ENXIO;
return 0;
......@@ -697,16 +698,10 @@ static void __exit cleanup_baycomserhdx(void)
int i;
for(i = 0; i < NR_PORTS; i++) {
struct net_device *dev = baycom_device+i;
struct baycom_state *bc = (struct baycom_state *)dev->priv;
struct net_device *dev = baycom_device[i];
if (bc) {
if (bc->hdrv.magic != HDLCDRV_MAGIC)
printk(KERN_ERR "baycom: invalid magic in "
"cleanup_module\n");
else
hdlcdrv_unregister_hdlcdrv(dev);
}
if (dev)
hdlcdrv_unregister(dev);
}
}
......
......@@ -553,6 +553,7 @@ static int hdlcdrv_open(struct net_device *dev)
/*
* initialise some variables
*/
s->opened = 1;
s->hdlcrx.hbuf.rd = s->hdlcrx.hbuf.wr = 0;
s->hdlcrx.in_hdlc_rx = 0;
s->hdlcrx.rx_state = 0;
......@@ -592,6 +593,7 @@ static int hdlcdrv_close(struct net_device *dev)
if (s->skb)
dev_kfree_skb(s->skb);
s->skb = NULL;
s->opened = 0;
return i;
}
......@@ -728,25 +730,15 @@ static int hdlcdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* --------------------------------------------------------------------- */
/*
* Check for a network adaptor of this type, and return '0' if one exists.
* If dev->base_addr == 0, probe all likely locations.
* If dev->base_addr == 1, always return failure.
* If dev->base_addr == 2, allocate space for the device and return success
* (detachable devices only).
* Initialize fields in hdlcdrv
*/
static int hdlcdrv_probe(struct net_device *dev)
static void hdlcdrv_setup(struct net_device *dev)
{
const struct hdlcdrv_channel_params dflt_ch_params = {
static const struct hdlcdrv_channel_params dflt_ch_params = {
20, 2, 10, 40, 0
};
struct hdlcdrv_state *s;
struct hdlcdrv_state *s = dev->priv;;
if (!dev)
return -ENXIO;
/*
* not a real probe! only initialize data structures
*/
s = (struct hdlcdrv_state *)dev->priv;
/*
* initialize the hdlcdrv_state struct
*/
......@@ -805,72 +797,60 @@ static int hdlcdrv_probe(struct net_device *dev)
memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN);
memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN);
dev->tx_queue_len = 16;
/* New style flags */
dev->flags = 0;
return 0;
}
/* --------------------------------------------------------------------- */
int hdlcdrv_register_hdlcdrv(struct net_device *dev, const struct hdlcdrv_ops *ops,
unsigned int privsize, char *ifname,
struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
unsigned int privsize, const char *ifname,
unsigned int baseaddr, unsigned int irq,
unsigned int dma)
{
struct net_device *dev;
struct hdlcdrv_state *s;
int err;
BUG_ON(ops == NULL);
if (!dev || !ops)
return -EACCES;
if (privsize < sizeof(struct hdlcdrv_state))
privsize = sizeof(struct hdlcdrv_state);
memset(dev, 0, sizeof(struct net_device));
if (!(s = dev->priv = kmalloc(privsize, GFP_KERNEL)))
return -ENOMEM;
dev = alloc_netdev(privsize, ifname, hdlcdrv_setup);
if (!dev)
return ERR_PTR(-ENOMEM);
/*
* initialize part of the hdlcdrv_state struct
*/
memset(s, 0, privsize);
s = dev->priv;
s->magic = HDLCDRV_MAGIC;
strncpy(dev->name, ifname, sizeof(dev->name));
s->ops = ops;
/*
* initialize part of the device struct
*/
dev->if_port = 0;
dev->init = hdlcdrv_probe;
dev->base_addr = baseaddr;
dev->irq = irq;
dev->dma = dma;
if (register_netdev(dev)) {
err = register_netdev(dev);
if (err < 0) {
printk(KERN_WARNING "hdlcdrv: cannot register net "
"device %s\n", dev->name);
kfree(dev->priv);
return -ENXIO;
kfree(dev);
dev = ERR_PTR(err);
}
MOD_INC_USE_COUNT;
return 0;
return dev;
}
/* --------------------------------------------------------------------- */
int hdlcdrv_unregister_hdlcdrv(struct net_device *dev)
void hdlcdrv_unregister(struct net_device *dev)
{
struct hdlcdrv_state *s;
struct hdlcdrv_state *s = dev->priv;
if (!dev)
return -EINVAL;
if (!(s = (struct hdlcdrv_state *)dev->priv))
return -EINVAL;
if (s->magic != HDLCDRV_MAGIC)
return -EINVAL;
if (s->ops->close)
BUG_ON(s->magic != HDLCDRV_MAGIC);
if (s->opened && s->ops->close)
s->ops->close(dev);
unregister_netdev(dev);
kfree(s);
MOD_DEC_USE_COUNT;
return 0;
free_netdev(dev);
}
/* --------------------------------------------------------------------- */
......@@ -878,8 +858,8 @@ int hdlcdrv_unregister_hdlcdrv(struct net_device *dev)
EXPORT_SYMBOL(hdlcdrv_receiver);
EXPORT_SYMBOL(hdlcdrv_transmitter);
EXPORT_SYMBOL(hdlcdrv_arbitrate);
EXPORT_SYMBOL(hdlcdrv_register_hdlcdrv);
EXPORT_SYMBOL(hdlcdrv_unregister_hdlcdrv);
EXPORT_SYMBOL(hdlcdrv_register);
EXPORT_SYMBOL(hdlcdrv_unregister);
/* --------------------------------------------------------------------- */
......
......@@ -457,14 +457,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c hp-plus.c"
* version-control: t
* kept-new-versions: 5
* tab-width: 4
* c-indent-level: 4
* End:
*/
......@@ -429,14 +429,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c hp.c"
* version-control: t
* kept-new-versions: 5
* tab-width: 4
* c-indent-level: 4
* End:
*/
......@@ -798,12 +798,3 @@ void cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -DKERNEL -Wall -O6 -fomit-frame-pointer -I/usr/src/linux/net/tcp -c ne.c"
* version-control: t
* kept-new-versions: 5
* End:
*/
......@@ -790,11 +790,3 @@ void cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -DKERNEL -Wall -O6 -fomit-frame-pointer -I/usr/src/linux/net/tcp -c ne2.c"
* version-control: t
* kept-new-versions: 5
* End:
*/
......@@ -26,8 +26,8 @@
*/
#define DRV_NAME "ne2k-pci"
#define DRV_VERSION "1.02"
#define DRV_RELDATE "10/19/2000"
#define DRV_VERSION "1.03"
#define DRV_RELDATE "9/22/2003"
/* The user-configurable values.
......@@ -380,21 +380,48 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
}
/*
* Magic incantation sequence for full duplex on the supported cards.
*/
static inline int set_realtek_fdx(struct net_device *dev)
{
long ioaddr = dev->base_addr;
outb(0xC0 + E8390_NODMA, ioaddr + NE_CMD); /* Page 3 */
outb(0xC0, ioaddr + 0x01); /* Enable writes to CONFIG3 */
outb(0x40, ioaddr + 0x06); /* Enable full duplex */
outb(0x00, ioaddr + 0x01); /* Disable writes to CONFIG3 */
outb(E8390_PAGE0 + E8390_NODMA, ioaddr + NE_CMD); /* Page 0 */
return 0;
}
static inline int set_holtek_fdx(struct net_device *dev)
{
long ioaddr = dev->base_addr;
outb(inb(ioaddr + 0x20) | 0x80, ioaddr + 0x20);
return 0;
}
static int ne2k_pci_set_fdx(struct net_device *dev)
{
if (ei_status.ne2k_flags & REALTEK_FDX)
return set_realtek_fdx(dev);
else if (ei_status.ne2k_flags & HOLTEK_FDX)
return set_holtek_fdx(dev);
return -EOPNOTSUPP;
}
static int ne2k_pci_open(struct net_device *dev)
{
int ret = request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev);
if (ret)
return ret;
/* Set full duplex for the chips that we know about. */
if (ei_status.ne2k_flags & FORCE_FDX) {
long ioaddr = dev->base_addr;
if (ei_status.ne2k_flags & REALTEK_FDX) {
outb(0xC0 + E8390_NODMA, ioaddr + NE_CMD); /* Page 3 */
outb(inb(ioaddr + 0x20) | 0x80, ioaddr + 0x20);
} else if (ei_status.ne2k_flags & HOLTEK_FDX)
outb(inb(ioaddr + 0x20) | 0x80, ioaddr + 0x20);
}
if (ei_status.ne2k_flags & FORCE_FDX)
ne2k_pci_set_fdx(dev);
ei_open(dev);
return 0;
}
......
/* ne.c: A general non-shared-memory NS8390 ethernet driver for linux. */
/*
Written 1992-94 by Donald Becker.
ne2k_cbus.c: A driver for the NE2000 like ethernet on NEC PC-9800.
This is a copy of the 2.5.66 Linux ISA NE2000 driver "ne.c"
(Donald Becker/Paul Gortmaker) with the NEC PC-9800 specific
changes added by Osamu Tomita.
From ne.c:
-----------
Copyright 1993 United States Government as represented by the
Director, National Security Agency.
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
The author may be reached as becker@scyld.com, or C/O
Scyld Computing Corporation, 410 Severn Ave., Suite 210, Annapolis MD 21403
This driver should work with many programmed-I/O 8390-based ethernet
boards. Currently it supports the NE1000, NE2000, many clones,
and some Cabletron products.
Changelog:
Paul Gortmaker : use ENISR_RDC to monitor Tx PIO uploads, made
sanity checks and bad clone support optional.
Paul Gortmaker : new reset code, reset card after probe at boot.
Paul Gortmaker : multiple card support for module users.
Paul Gortmaker : Support for PCI ne2k clones, similar to lance.c
Paul Gortmaker : Allow users with bad cards to avoid full probe.
Paul Gortmaker : PCI probe changes, more PCI cards supported.
rjohnson@analogic.com : Changed init order so an interrupt will only
occur after memory is allocated for dev->priv. Deallocated memory
last in cleanup_modue()
Richard Guenther : Added support for ISAPnP cards
Paul Gortmaker : Discontinued PCI support - use ne2k-pci.c instead.
Osamu Tomita : Separate driver for NEC PC-9800.
-----------
*/
/* Routines for the NatSemi-based designs (NE[12]000). */
static const char version1[] =
"ne.c:v1.10 9/23/94 Donald Becker (becker@scyld.com)\n";
static const char version2[] =
"Last modified Nov 1, 2000 by Paul Gortmaker\n";
static const char version[] =
"ne2k_cbus.c:v1.0 3/24/03 Osamu Tomita\n";
#include <linux/module.h>
#include <linux/kernel.h>
......@@ -273,7 +254,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
}
if (ei_debug && version_printed++ == 0)
printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2);
printk(KERN_INFO "%s", version);
printk(KERN_INFO "NE*000 ethercard probe at %#3x:", ioaddr);
......@@ -839,9 +820,9 @@ int init_module(void)
return 0;
}
if (io[this_dev] != 0)
printk(KERN_WARNING "ne.c: No NE*000 card found at i/o = %#x\n", io[this_dev]);
printk(KERN_WARNING "ne2k_cbus: No NE*000 card found at i/o = %#x\n", io[this_dev]);
else
printk(KERN_NOTICE "ne.c: You must supply \"io=0xNNN\" value(s) for C-Bus cards.\n");
printk(KERN_NOTICE "ne2k_cbus: You must supply \"io=0xNNN\" value(s) for C-Bus cards.\n");
return -ENXIO;
}
return 0;
......@@ -869,11 +850,3 @@ void cleanup_module(void)
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -DKERNEL -Wall -O6 -fomit-frame-pointer -I/usr/src/linux/net/tcp -c ne.c"
* version-control: t
* kept-new-versions: 5
* End:
*/
......@@ -21,6 +21,11 @@
*
* SAA9730 ethernet driver.
*
* Changes:
* Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver).
* Conversion to spinlocks.
* Error handling fixes.
*
*/
#include <linux/init.h>
......@@ -30,6 +35,7 @@
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <asm/addrspace.h>
#include <asm/mips-boards/prom.h>
......@@ -42,6 +48,15 @@ int lan_saa9730_debug = LAN_SAA9730_DEBUG;
int lan_saa9730_debug;
#endif
#define DRV_MODULE_NAME "saa9730"
static struct pci_device_id saa9730_pci_tbl[] = {
{ PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, saa9730_pci_tbl);
/* Non-zero only if the current card is a PCI with BIOS-set IRQ. */
static unsigned int pci_irq_line;
......@@ -216,6 +231,9 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp)
buffer_start =
(unsigned int) kmalloc(mem_size, GFP_DMA | GFP_KERNEL);
if (!buffer_start)
return -ENOMEM;
/*
* Set DMA buffer to kseg1 (uncached).
* Make sure to flush before using it uncached.
......@@ -887,13 +905,14 @@ static int lan_saa9730_start_xmit(struct sk_buff *skb,
printk("Send packet: skb=%08x\n", (unsigned int) skb);
skblen = skb->len;
save_and_cli(flags);
spin_lock_irqsave(&lp->lock, flags);
len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen;
if (lan_saa9730_write(lp, skb, skblen)) {
restore_flags(flags);
printk
("Error when writing packet to controller: skb=%08x\n",
spin_unlock_irqrestore(&lp->lock, flags);
printk("Error when writing packet to controller: skb=%08x\n",
(unsigned int) skb);
netif_stop_queue(dev);
return -1;
......@@ -906,7 +925,7 @@ static int lan_saa9730_start_xmit(struct sk_buff *skb,
netif_start_queue(dev);
dev_kfree_skb(skb);
restore_flags(flags);
spin_unlock_irqrestore(&lp->lock, flags);
return 0;
}
......@@ -971,16 +990,42 @@ static void lan_saa9730_set_multicast(struct net_device *dev)
lan_saa9730_restart(lp);
}
static void __devexit saa9730_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
if (dev) {
if (dev->priv)
kfree(dev->priv);
unregister_netdev(dev);
free_netdev(dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
}
static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
{
struct lan_saa9730_private *lp;
unsigned char ethernet_addr[6];
int ret = 0;
dev = init_etherdev(dev, 0);
if (!dev)
return -ENOMEM;
dev->open = lan_saa9730_open_fail;
if (get_ethernet_addr(ethernet_addr))
return -1;
if (get_ethernet_addr(ethernet_addr)) {
ret = -ENODEV;
goto out;
}
memcpy(dev->dev_addr, ethernet_addr, 6);
dev->base_addr = ioaddr;
......@@ -995,6 +1040,11 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
GFP_DMA | GFP_KERNEL)
+ 7) & ~7);
if (!lp) {
ret = -ENOMEM;
goto out;
}
dev->priv = lp;
memset(lp, 0, sizeof(*lp));
......@@ -1007,32 +1057,34 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
SAA9730_EVM_REGS_ADDR);
/* Allocate LAN RX/TX frame buffer space. */
if (lan_saa9730_allocate_buffers(lp))
return -1;
if ((ret = lan_saa9730_allocate_buffers(lp)))
goto out;
/* Stop LAN controller. */
if (lan_saa9730_stop(lp))
return -1;
if ((ret = lan_saa9730_stop(lp)))
goto out;
/* Initialize CAM registers. */
if (lan_saa9730_cam_init(dev))
return -1;
if ((ret = lan_saa9730_cam_init(dev)))
goto out;
/* Initialize MII registers. */
if (lan_saa9730_mii_init(lp))
return -1;
if ((ret = lan_saa9730_mii_init(lp)))
goto out;
/* Initialize control registers. */
if (lan_saa9730_control_init(lp))
return -1;
if ((ret = lan_saa9730_control_init(lp)))
goto out;
/* Load CAM registers. */
if (lan_saa9730_cam_load(lp))
return -1;
if ((ret = lan_saa9730_cam_load(lp)))
goto out;
/* Initialize DMA context registers. */
if (lan_saa9730_dma_init(lp))
return -1;
if ((ret = lan_saa9730_dma_init(lp)))
goto out;
spin_lock_init(&lp->lock);
dev->open = lan_saa9730_open;
dev->hard_start_xmit = lan_saa9730_start_xmit;
......@@ -1044,22 +1096,39 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
dev->dma = 0;
return 0;
out:
if (dev) {
if (dev->priv)
kfree(dev->priv);
unregister_netdevice(dev);
free_netdev(dev);
}
return ret;
}
static int __init saa9730_probe(void)
static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev = NULL;
struct pci_dev *pdev = NULL;
unsigned int pci_ioaddr;
int err;
if (lan_saa9730_debug > 1)
printk
("saa9730.c: PCI bios is present, checking for devices...\n");
printk("saa9730.c: PCI bios is present, checking for devices...\n");
while ((pdev = pci_find_device(PCI_VENDOR_ID_PHILIPS,
PCI_DEVICE_ID_PHILIPS_SAA9730,
pdev))) {
unsigned int pci_ioaddr;
err = pci_enable_device(pdev);
if (err) {
printk(KERN_ERR "Cannot enable PCI device, aborting.\n");
goto out;
}
err = pci_request_regions(pdev, DRV_MODULE_NAME);
if (err) {
printk(KERN_ERR "Cannot obtain PCI resources, aborting.\n");
goto out_disable_pdev;
}
pci_irq_line = pdev->irq;
/* LAN base address in located at BAR 1. */
......@@ -1069,15 +1138,45 @@ static int __init saa9730_probe(void)
printk("Found SAA9730 (PCI) at %#x, irq %d.\n",
pci_ioaddr, pci_irq_line);
if (!lan_saa9730_init
(dev, pci_ioaddr, pci_irq_line))
return 0;
else
printk("Lan init failed.\n");
err = lan_saa9730_init(dev, pci_ioaddr, pci_irq_line);
if (err) {
printk("Lan init failed");
goto out_disable_pdev;
}
return -ENODEV;
pci_set_drvdata(pdev, dev);
return 0;
out_disable_pdev:
pci_disable_device(pdev);
out:
pci_set_drvdata(pdev, NULL);
return err;
}
static struct pci_driver saa9730_driver = {
.name = DRV_MODULE_NAME,
.id_table = saa9730_pci_tbl,
.probe = saa9730_init_one,
.remove = __devexit_p(saa9730_remove_one),
};
static int __init saa9730_init(void)
{
return pci_module_init(&saa9730_driver);
}
static void __exit saa9730_cleanup(void)
{
pci_unregister_driver(&saa9730_driver);
}
module_init(saa9730_probe);
module_init(saa9730_init);
module_exit(saa9730_cleanup);
MODULE_LICENSE("GPL");
......@@ -365,6 +365,7 @@ struct lan_saa9730_private {
unsigned char PhysicalAddress[LAN_SAA9730_CAM_ENTRIES][6];
struct net_device_stats stats;
spinlock_t lock;
};
#endif /* _SAA9730_H */
......@@ -2,8 +2,8 @@
*
* Name: skdrv1st.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.15 $
* Date: $Date: 2003/07/17 14:54:09 $
* Version: $Revision: 1.1 $
* Date: $Date: 2003/07/21 07:22:43 $
* Purpose: First header file for driver and all other modules
*
******************************************************************************/
......@@ -26,6 +26,9 @@
* History:
*
* $Log: skdrv1st.h,v $
* Revision 1.1 2003/07/21 07:22:43 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.15 2003/07/17 14:54:09 rroesler
* Fix: Corrected SK_PNMI_READ macros to copy right amount of bytes
*
......
......@@ -2,8 +2,8 @@
*
* Name: skdrv2nd.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.19 $
* Date: $Date: 2003/07/07 09:53:10 $
* Version: $Revision: 1.3 $
* Date: $Date: 2003/08/12 16:51:18 $
* Purpose: Second header file for driver and all other modules
*
******************************************************************************/
......@@ -26,6 +26,16 @@
* History:
*
* $Log: skdrv2nd.h,v $
* Revision 1.3 2003/08/12 16:51:18 mlindner
* Fix: UDP and TCP Proto checks
* Fix: UDP header offset
*
* Revision 1.2 2003/08/07 10:50:54 mlindner
* Add: Speed and HW-Csum support for Yukon Lite chipset
*
* Revision 1.1 2003/07/21 07:25:29 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.19 2003/07/07 09:53:10 rroesler
* Fix: Removed proprietary RxTx defines and used the ones from skgehw.h instead
*
......@@ -315,12 +325,13 @@ struct s_IOCTL {
#define C_OFFSET_IPHEADER C_LEN_ETHERMAC_HEADER
#define C_OFFSET_IPHEADER_IPPROTO 9
#define C_OFFSET_TCPHEADER_TCPCS 16
#define C_OFFSET_UDPHEADER_UDPCS 6
#define C_OFFSET_IPPROTO ( (C_LEN_ETHERMAC_HEADER) + \
(C_OFFSET_IPHEADER_IPPROTO) )
#define C_PROTO_ID_UDP 6 /* refer to RFC 790 or Stevens' */
#define C_PROTO_ID_TCP 17 /* TCP/IP illustrated for details */
#define C_PROTO_ID_UDP 17 /* refer to RFC 790 or Stevens' */
#define C_PROTO_ID_TCP 6 /* TCP/IP illustrated for details */
/* TX and RX descriptors *****************************************************/
......@@ -390,6 +401,7 @@ struct s_TxD {
typedef struct s_DevNet DEV_NET;
struct s_DevNet {
struct proc_dir_entry *proc;
int PortNr;
int NetNr;
int Mtu;
......@@ -550,6 +562,10 @@ struct s_AC {
/* Only for tests */
int PortUp;
int PortDown;
int ChipsetType; /* Chipset family type
* 0 == Genesis family support
* 1 == Yukon family support
*/
};
......
......@@ -722,15 +722,14 @@ typedef struct s_GeInit {
/*
* Error numbers and messages for skxmac2.c and skgeinit.c
*/
#define SKERR_HWI_E001 (SK_ERRBASE_HWINIT)
#define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got invalid parameters"
#define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got illegal parameters"
#define SKERR_HWI_E002 (SKERR_HWI_E001+1)
#define SKERR_HWI_E002MSG "SkGeInit(): Level 1 call missing"
#define SKERR_HWI_E003 (SKERR_HWI_E002+1)
#define SKERR_HWI_E003MSG "SkGeInit() called with invalid init Level"
#define SKERR_HWI_E003MSG "SkGeInit() called with illegal init Level"
#define SKERR_HWI_E004 (SKERR_HWI_E003+1)
#define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size invalid configured"
#define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size illegal configured"
#define SKERR_HWI_E005 (SKERR_HWI_E004+1)
#define SKERR_HWI_E005MSG "SkGeInitPort(): cannot init running ports"
#define SKERR_HWI_E006 (SKERR_HWI_E005+1)
......@@ -752,21 +751,21 @@ typedef struct s_GeInit {
#define SKERR_HWI_E014 (SKERR_HWI_E013+1)
#define SKERR_HWI_E014MSG "SkGeInitPort(): unknown GIPortUsage specified"
#define SKERR_HWI_E015 (SKERR_HWI_E014+1)
#define SKERR_HWI_E015MSG "Invalid Link mode parameter"
#define SKERR_HWI_E015MSG "Illegal Link mode parameter"
#define SKERR_HWI_E016 (SKERR_HWI_E015+1)
#define SKERR_HWI_E016MSG "Invalid Flow control mode parameter"
#define SKERR_HWI_E016MSG "Illegal Flow control mode parameter"
#define SKERR_HWI_E017 (SKERR_HWI_E016+1)
#define SKERR_HWI_E017MSG "Invalid value specified for GIPollTimerVal"
#define SKERR_HWI_E017MSG "Illegal value specified for GIPollTimerVal"
#define SKERR_HWI_E018 (SKERR_HWI_E017+1)
#define SKERR_HWI_E018MSG "FATAL: SkGeStopPort() does not terminate (Tx)"
#define SKERR_HWI_E019 (SKERR_HWI_E018+1)
#define SKERR_HWI_E019MSG "Invalid Speed parameter"
#define SKERR_HWI_E019MSG "Illegal Speed parameter"
#define SKERR_HWI_E020 (SKERR_HWI_E019+1)
#define SKERR_HWI_E020MSG "Invalid Master/Slave parameter"
#define SKERR_HWI_E020MSG "Illegal Master/Slave parameter"
#define SKERR_HWI_E021 (SKERR_HWI_E020+1)
#define SKERR_HWI_E021MSG "MacUpdateStats(): cannot update statistic counter"
#define SKERR_HWI_E022 (SKERR_HWI_E021+1)
#define SKERR_HWI_E022MSG "MacStatistic(): invalid statistic base address"
#define SKERR_HWI_E022MSG "MacStatistic(): illegal statistic base address"
#define SKERR_HWI_E023 (SKERR_HWI_E022+1)
#define SKERR_HWI_E023MSG "SkGeInitPort(): Transmit Queue Size too small"
#define SKERR_HWI_E024 (SKERR_HWI_E023+1)
......
......@@ -2,8 +2,8 @@
*
* Name: sktypes.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.3 $
* Date: $Date: 2003/02/25 14:16:40 $
* Version: $Revision: 1.1 $
* Date: $Date: 2003/07/21 07:26:01 $
* Purpose: Define data types for Linux
*
******************************************************************************/
......@@ -26,6 +26,9 @@
* History:
*
* $Log: sktypes.h,v $
* Revision 1.1 2003/07/21 07:26:01 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.3 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
*
......
......@@ -2,8 +2,8 @@
*
* Name: version.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $
* Date: $Date: 2003/02/25 14:16:40 $
* Version: $Revision: 1.3 $
* Date: $Date: 2003/08/25 13:34:48 $
* Purpose: SK specific Error log support
*
******************************************************************************/
......@@ -25,6 +25,15 @@
*
* History:
* $Log: skversion.h,v $
* Revision 1.3 2003/08/25 13:34:48 mlindner
* Fix: Lint changes
*
* Revision 1.2 2003/08/13 12:01:01 mlindner
* Add: Changes for Lint
*
* Revision 1.1 2003/07/24 09:29:56 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.4 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
*
......@@ -42,13 +51,15 @@
******************************************************************************/
#ifdef lint
static const char SysKonnectFileId[] = "@(#) (C) SysKonnect GmbH.";
static const char SysKonnectBuildNumber[] =
"@(#)SK-BUILD: 6.14 PL: 01";
"@(#)SK-BUILD: 6.18 PL: 01";
#endif /* !defined(lint) */
#define BOOT_STRING "sk98lin: Network Device Driver v6.14\n" \
#define BOOT_STRING "sk98lin: Network Device Driver v6.18\n" \
"(C)Copyright 1999-2003 Marvell(R)."
#define VER_STRING "6.14"
#define VER_STRING "6.18"
......@@ -2,8 +2,8 @@
*
* Name: skdim.c
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $
* Date: $Date: 2003/07/07 09:45:47 $
* Version: $Revision: 1.2 $
* Date: $Date: 2003/08/21 12:35:05 $
* Purpose: All functions to maintain interrupt moderation
*
******************************************************************************/
......@@ -26,6 +26,12 @@
* History:
*
* $Log: skdim.c,v $
* Revision 1.2 2003/08/21 12:35:05 mlindner
* Fix: Corrected CPU detection and compile errors on single CPU machines
*
* Revision 1.1 2003/07/18 13:39:55 rroesler
* Fix: Re-enter after CVS crash
*
* Revision 1.4 2003/07/07 09:45:47 rroesler
* Fix: Compiler warnings corrected
*
......@@ -56,7 +62,7 @@
#ifndef lint
static const char SysKonnectFileId[] =
"@(#) $Id: skdim.c,v 1.4 2003/07/07 09:45:47 rroesler Exp $ (C) SysKonnect.";
"@(#) $Id: skdim.c,v 1.2 2003/08/21 12:35:05 mlindner Exp $ (C) SysKonnect.";
#endif
#define __SKADDR_C
......@@ -312,6 +318,12 @@ GetCurrentSystemLoad(SK_AC *pAC) {
unsigned int TotalTime = 0;
unsigned int UsedTime = 0;
unsigned int SystemLoad = 0;
#ifdef CONFIG_SMP
unsigned int SKNumCpus = smp_num_cpus;
#else
unsigned int SKNumCpus = 1;
#endif
/* unsigned int NbrCpu = 0; */
/*
......
This diff is collapsed.
This diff is collapsed.
......@@ -562,16 +562,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -Wall -O6 -I/usr/src/linux/net/inet -c smc-ultra.c"
* version-control: t
* kept-new-versions: 5
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
......@@ -884,6 +884,8 @@ static int TLan_Init( struct net_device *dev )
}
dev->addr_len = 6;
netif_carrier_off(dev);
/* Device methods */
dev->open = &TLan_Open;
dev->hard_start_xmit = &TLan_StartTx;
......@@ -2205,6 +2207,8 @@ TLan_ResetAdapter( struct net_device *dev )
priv->tlanFullDuplex = FALSE;
priv->phyOnline=0;
netif_carrier_off(dev);
/* 1. Assert reset bit. */
data = inl(dev->base_addr + TLAN_HOST_CMD);
......@@ -2368,6 +2372,7 @@ TLan_FinishReset( struct net_device *dev )
}
outl( priv->rxListDMA, dev->base_addr + TLAN_CH_PARM );
outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD );
netif_carrier_on(dev);
} else {
printk( "TLAN: %s: Link inactive, will retry in 10 secs...\n", dev->name );
TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_FINISH_RESET );
......
......@@ -23,11 +23,9 @@ config DE2104X
will say Y here.) Do read the Ethernet-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called de2104x. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called de2104x.
config TULIP
tristate "DECchip Tulip (dc2114x) PCI support"
......@@ -44,11 +42,9 @@ config TULIP
information is contained in
<file:Documentation/networking/tulip.txt>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called tulip. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called tulip.
config TULIP_MWI
bool "New bus configuration (EXPERIMENTAL)"
......@@ -82,11 +78,9 @@ config DE4X5
information is contained in
<file:Documentation/networking/de4x5.txt>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called de4x5. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called de4x5.
config WINBOND_840
tristate "Winbond W89c840 Ethernet support"
......@@ -106,11 +100,9 @@ config DM9102
(Ethernet) card, say Y. Some information is contained in the file
<file:Documentation/networking/dmfe.txt>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called dmfe. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called dmfe.
config PCMCIA_XIRCOM
tristate "Xircom CardBus support (new driver)"
......@@ -121,11 +113,9 @@ config PCMCIA_XIRCOM
as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
ASIX.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called xircom_cb. If you want to compile
it as a module, say M here and read
<file:Documentation/modules.txt>. If unsure, say N.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called xircom_cb. If unsure, say N.
config PCMCIA_XIRTULIP
tristate "Xircom Tulip-like CardBus support (old driver)"
......@@ -136,11 +126,9 @@ config PCMCIA_XIRTULIP
as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
ASIX.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called xircom_tulip_cb. If you want to compile
it as a module, say M here and read
<file:Documentation/modules.txt>. If unsure, say N.
To compile this driver as a module, choose M here and read
<file:Documentation/networking/net-modules.txt>. The module will
be called xircom_tulip_cb. If unsure, say N.
endmenu
......@@ -511,13 +511,3 @@ cleanup_module(void)
}
}
#endif /* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c wd.c"
* version-control: t
* tab-width: 4
* kept-new-versions: 5
* End:
*/
......@@ -3,7 +3,9 @@
#
obj-$(CONFIG_STRIP) += strip.o
obj-$(CONFIG_ARLAN) += arlan.o arlan-proc.o
obj-$(CONFIG_ARLAN) += arlan.o
arlan-objs := arlan-main.o arlan-proc.o
# Obsolete cards
obj-$(CONFIG_WAVELAN) += wavelan.o
......
......@@ -108,7 +108,7 @@ static const char *arlan_diagnostic_info_string(struct net_device *dev)
default:
return "ERROR unknown Diagnostic info reply code ";
}
};
}
static const char *arlan_hardware_type_string(struct net_device *dev)
{
......@@ -866,7 +866,6 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
CTBLN(32,cardNo,lParameter),\
CTBLN(33,cardNo,_15),\
CTBLN(34,cardNo,headerSize),\
CTBLN(35,cardNo,async),\
CTBLN(36,cardNo,tx_delay_ms),\
CTBLN(37,cardNo,retries),\
CTBLN(38,cardNo,ReTransmitPacketMaxSize),\
......@@ -1233,7 +1232,7 @@ static ctl_table arlan_root_table[] =
static struct ctl_table_header *arlan_device_sysctl_header;
int init_arlan_proc(void)
int __init init_arlan_proc(void)
{
int i = 0;
......@@ -1247,25 +1246,11 @@ int init_arlan_proc(void)
return 0;
};
#ifdef MODULE
int init_module(void)
{
return init_arlan_proc();
};
}
void cleanup_module(void)
void __exit cleanup_arlan_proc(void)
{
unregister_sysctl_table(arlan_device_sysctl_header);
arlan_device_sysctl_header = NULL;
return;
};
#endif // MODULE
MODULE_LICENSE("GPL");
}
......@@ -39,14 +39,16 @@
#define ARLAN_RCV_PROMISC 1
#define ARLAN_RCV_CONTROL 2
#ifdef CONFIG_PROC_FS
extern int init_arlan_proc(void);
extern void cleanup_arlan_proc(void);
#else
#define init_arlan_proc() (0)
#define cleanup_arlan_proc() do { } while (0);
#endif
extern struct net_device *arlan_device[MAX_ARLANS];
extern int arlan_debug;
extern char * siteName;
extern int arlan_entry_debug;
extern int arlan_exit_debug;
extern int testMemory;
......@@ -67,8 +69,6 @@ extern int arlan_command(struct net_device * dev, int command);
#define channelSetUNKNOWN 0
#define systemIdUNKNOWN -1
#define registrationModeUNKNOWN -1
#define siteNameUNKNOWN "LinuxSite"
#define IFDEBUG( L ) if ( (L) & arlan_debug )
......@@ -293,7 +293,6 @@ struct arlan_conf_stru {
int lParameter;
int _15;
int headerSize;
int async;
int retries;
int tx_delay_ms;
int waitReTransmitPacketMaxSize;
......@@ -332,83 +331,56 @@ struct TxParam
volatile unsigned char scrambled;
};
struct TxRingPoint {
struct TxParam txParam;
};
#define TX_RING_SIZE 2
/* Information that need to be kept for each board. */
struct arlan_private {
struct net_device_stats stats;
long open_time; /* Useless example local info. */
struct arlan_shmem * card;
struct arlan_shmem * conf;
struct TxParam txParam;
int multicastLength;
char multicastList[ARLAN_MAX_MULTICAST_ADDRS][6];
int promiscModeEnabled;
struct arlan_conf_stru * Conf;
int bad;
int reset;
long long lastReset;
unsigned long lastReset;
struct timer_list timer;
struct timer_list tx_delay_timer;
struct timer_list tx_retry_timer;
struct timer_list rx_check_timer;
struct semaphore card_lock;
atomic_t card_users;
atomic_t delay_on;
atomic_t retr_on;
int registrationLostCount;
int reRegisterExp;
int nof_tx;
int nof_tx_ack;
int last_nof_tx;
int last_nof_tx_ack;
int irq_test_done;
int last_command_was_rx;
struct TxParam txRing[TX_RING_SIZE];
char reTransmitBuff[0x800];
volatile int txLast;
volatile int txNew;
volatile int txOffset;
volatile char ReTransmitRequested;
volatile unsigned long tx_done_delayed;
volatile long long registrationLastSeen;
volatile char under_command;
volatile char under_toggle;
volatile long long tx_last_sent;
volatile long long tx_last_cleared;
volatile u_char under_tx;
volatile int retransmissions;
volatile int tx_chain_active;
volatile int timer_chain_active;
volatile int interrupt_ack_requested;
volatile long command_lock;
volatile int rx_command_needed;
volatile int tx_command_needed;
volatile int waiting_command_mask;
volatile int card_polling_interval;
volatile int last_command_buff_free_time;
volatile int numResets;
volatile int under_reset;
volatile int under_config;
volatile int rx_command_given;
volatile long tx_command_given;
volatile long interrupt_processing_active;
volatile long long last_tx_time;
volatile long long last_rx_time;
volatile long long last_rx_int_ack_time;
int in_bytes;
int out_bytes;
int in_time;
int out_time;
int in_time10;
int out_time10;
int in_bytes10;
int out_bytes10;
int txLast;
unsigned ReTransmitRequested;
unsigned long tx_done_delayed;
unsigned long registrationLastSeen;
unsigned long tx_last_sent;
unsigned long tx_last_cleared;
unsigned long retransmissions;
unsigned long interrupt_ack_requested;
spinlock_t lock;
unsigned long waiting_command_mask;
unsigned long card_polling_interval;
unsigned long last_command_buff_free_time;
int under_reset;
int under_config;
int rx_command_given;
int tx_command_given;
unsigned long interrupt_processing_active;
unsigned long last_rx_int_ack_time;
unsigned long in_bytes;
unsigned long out_bytes;
unsigned long in_time;
unsigned long out_time;
unsigned long in_time10;
unsigned long out_time10;
unsigned long in_bytes10;
unsigned long out_bytes10;
int init_etherdev_alloc;
};
......@@ -497,13 +469,11 @@ struct arlan_private {
#define arlan_interrupt_lancpu(dev) {\
int cr; \
\
priv->under_toggle++; \
cr = readControlRegister(dev);\
if (cr & ARLAN_CHANNEL_ATTENTION){ \
writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\
}else \
writeControlRegister(dev, (cr | ARLAN_CHANNEL_ATTENTION));\
priv->under_toggle=0; \
}
#define clearChannelAttention(dev){ \
......
......@@ -521,7 +521,6 @@ struct atmel_private {
int operating_mode, power_mode;
time_t last_qual;
int beacons_this_sec;
u64 last_beacon_timestamp;
int channel;
int reg_domain;
int tx_rate;
......@@ -559,6 +558,7 @@ struct atmel_private {
int SSID_size, new_SSID_size;
u8 CurrentBSSID[6], BSSID[6];
u8 SSID[MAX_SSID_LENGTH], new_SSID[MAX_SSID_LENGTH];
u64 last_beacon_timestamp;
u8 rx_buf[MAX_WIRELESS_BODY];
};
......
......@@ -341,7 +341,9 @@ static struct {
{ 0, 0, "SMC/2632W", "atmel_at76c502d.bin", "SMC 2632W-V3" },
{ 0xd601, 0x0007, NULL, "atmel_at76c502.bin", "Sitecom WLAN-011"}, /* suspect - from a usenet posting. */
{ 0x01bf, 0x3302, NULL, "atmel_at76c502d.bin", "Belkin F5D6060u"}, /* " " " " " */
{ 0, 0, "BT/Voyager 1020 Laptop Adapter", "atmel_at76c502.bin", "BT Voyager 1020"}
{ 0, 0, "BT/Voyager 1020 Laptop Adapter", "atmel_at76c502.bin", "BT Voyager 1020"},
{ 0, 0, "IEEE 802.11b/Wireless LAN PC Card", "atmel_at76c502.bin", "Siemens Gigaset PC Card II" },
{ 0, 0, "CNet/CNWLC 11Mbps Wireless PC Card V-5", "atmel_at76c502e.bin", "CNet CNWLC-811ARL" }
};
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
......
......@@ -180,6 +180,7 @@ struct hdlcdrv_ops {
struct hdlcdrv_state {
int magic;
int opened;
const struct hdlcdrv_ops *ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment