Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ee4351da
Commit
ee4351da
authored
Nov 05, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
d472b9dc
25fbb358
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
700 additions
and
746 deletions
+700
-746
CREDITS
CREDITS
+1
-1
MAINTAINERS
MAINTAINERS
+1
-1
drivers/char/ChangeLog
drivers/char/ChangeLog
+1
-1
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/ide-cs.c
+60
-50
drivers/mtd/ftl.c
drivers/mtd/ftl.c
+2
-2
drivers/net/pcmcia/ax8390.h
drivers/net/pcmcia/ax8390.h
+0
-187
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/axnet_cs.c
+143
-152
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
+136
-50
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/nmclan_cs.c
+70
-2
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/pcnet_cs.c
+9
-5
drivers/net/pcmcia/ray_cs.c
drivers/net/pcmcia/ray_cs.c
+1
-1
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/smc91c92_cs.c
+191
-170
drivers/net/wireless/airo_cs.c
drivers/net/wireless/airo_cs.c
+1
-1
drivers/net/wireless/wavelan.p.h
drivers/net/wireless/wavelan.p.h
+1
-1
drivers/parport/parport_cs.c
drivers/parport/parport_cs.c
+32
-84
drivers/pcmcia/cardbus.c
drivers/pcmcia/cardbus.c
+7
-7
drivers/pcmcia/cirrus.h
drivers/pcmcia/cirrus.h
+1
-1
drivers/pcmcia/cistpl.c
drivers/pcmcia/cistpl.c
+10
-9
drivers/pcmcia/cs_internal.h
drivers/pcmcia/cs_internal.h
+5
-5
drivers/pcmcia/i82365.c
drivers/pcmcia/i82365.c
+1
-1
drivers/pcmcia/i82365.h
drivers/pcmcia/i82365.h
+1
-1
drivers/pcmcia/o2micro.h
drivers/pcmcia/o2micro.h
+1
-1
drivers/pcmcia/ricoh.h
drivers/pcmcia/ricoh.h
+1
-1
drivers/pcmcia/tcic.c
drivers/pcmcia/tcic.c
+2
-2
drivers/pcmcia/tcic.h
drivers/pcmcia/tcic.h
+1
-1
drivers/pcmcia/ti113x.h
drivers/pcmcia/ti113x.h
+1
-1
drivers/pcmcia/topic.h
drivers/pcmcia/topic.h
+1
-1
drivers/pcmcia/vg468.h
drivers/pcmcia/vg468.h
+1
-1
include/linux/mtd/ftl.h
include/linux/mtd/ftl.h
+1
-1
include/linux/pnpbios.h
include/linux/pnpbios.h
+1
-1
include/pcmcia/ciscode.h
include/pcmcia/ciscode.h
+15
-3
net/core/dev.c
net/core/dev.c
+1
-1
No files found.
CREDITS
View file @
ee4351da
...
...
@@ -1284,7 +1284,7 @@ S: 14059 Berlin
S: Germany
N: David Hinds
E: d
hinds@zen.stanford.edu
E: d
ahinds@users.sourceforge.net
W: http://tao.stanford.edu/~dhinds
D: PCMCIA and CardBus stuff, PCMCIA-HOWTO, PCMCIA client drivers
S: 2019 W. Middlefield Rd #1
...
...
MAINTAINERS
View file @
ee4351da
...
...
@@ -1315,7 +1315,7 @@ S: Maintained
PCMCIA SUBSYSTEM
P: David Hinds
M: d
hinds@zen.stanford.edu
M: d
ahinds@users.sourceforge.net
L: linux-kernel@vger.kernel.org
W: http://pcmcia-cs.sourceforge.net
S: Maintained
...
...
drivers/char/ChangeLog
View file @
ee4351da
...
...
@@ -550,7 +550,7 @@ Thu Jan 17 01:17:20 1995 Theodore Y. Ts'o (tytso@rt-11)
the StarTech 16650 chip. Treat it as a 16450 for now,
because of its FIFO bugs.
Thu Jan 5 21:21:57 1995 <d
hinds@allegro.stanford.edu
>
Thu Jan 5 21:21:57 1995 <d
ahinds@users.sourceforge.net
>
* serial.c: (receive_char): Added counter to prevent infinite loop
when a PCMCIA serial device is ejected.
...
...
drivers/ide/legacy/ide-cs.c
View file @
ee4351da
...
...
@@ -2,7 +2,7 @@
A driver for PCMCIA IDE/ATA disk cards
ide
_cs.c 1.26 1999/11/16 02:10:49
ide
-cs.c 1.3 2002/10/26 05:45:31
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
...
...
@@ -15,12 +15,12 @@
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License version 2 (the "GPL"), in
which
case the provisions of the GPL are applicable instead of the
terms of the GNU General Public License version 2 (the "GPL"), in
which
case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this file
only under the terms of the GPL and not to allow others to use
your version of this file under the MPL, indicate your decision
...
...
@@ -40,10 +40,9 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/ide.h>
#include <linux/hdreg.h>
#include <linux/major.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/system.h>
...
...
@@ -53,38 +52,37 @@
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#ifdef PCMCIA_DEBUG
static
int
pc_debug
=
PCMCIA_DEBUG
;
MODULE_PARM
(
pc_debug
,
"i"
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"ide_cs.c 1.26 1999/11/16 02:10:49 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
#include <pcmcia/ciscode.h>
/*====================================================================*/
/* Parameters that can be set with 'insmod' */
/* Module parameters */
MODULE_AUTHOR
(
"David Hinds <dahinds@users.sourceforge.net>"
);
MODULE_DESCRIPTION
(
"PCMCIA ATA/IDE card driver"
);
MODULE_LICENSE
(
"Dual MPL/GPL"
);
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
/* Bit map of interrupts to choose from */
static
u_int
irq_mask
=
0xdeb8
;
INT_MODULE_PARM
(
irq_mask
,
0xdeb8
)
;
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
MODULE_LICENSE
(
"GPL"
);
#ifdef PCMCIA_DEBUG
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"ide-cs.c 1.3 2002/10/26 05:45:31 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
/*====================================================================*/
static
const
char
ide_major
[]
=
{
IDE0_MAJOR
,
IDE1_MAJOR
,
IDE2_MAJOR
,
IDE3_MAJOR
,
#ifdef IDE4_MAJOR
IDE4_MAJOR
,
IDE5_MAJOR
#endif
};
typedef
struct
ide_info_t
{
...
...
@@ -94,7 +92,6 @@ typedef struct ide_info_t {
int
hd
;
}
ide_info_t
;
static
void
ide_config
(
dev_link_t
*
link
);
static
void
ide_release
(
u_long
arg
);
static
int
ide_event
(
event_t
event
,
int
priority
,
event_callback_args_t
*
args
);
...
...
@@ -227,12 +224,12 @@ while ((last_ret=CardServices(last_fn=(fn), args))!=0) goto cs_failed
#define CFG_CHECK(fn, args...) \
if (CardServices(fn, args) != 0) goto next_entry
int
idecs_register
(
int
arg1
,
int
arg2
,
int
irq
)
static
int
idecs_register
(
int
io
,
int
ctl
,
int
irq
)
{
hw_regs_t
hw
;
ide_init_hwif_ports
(
&
hw
,
(
ide_ioreg_t
)
arg1
,
(
ide_ioreg_t
)
arg2
,
NULL
);
ide_init_hwif_ports
(
&
hw
,
(
ide_ioreg_t
)
io
,
(
ide_ioreg_t
)
ctl
,
NULL
);
hw
.
irq
=
irq
;
hw
.
chipset
=
ide_pci
;
/* this enables IRQ sharing w/ PCI irqs */
hw
.
chipset
=
ide_pci
;
return
ide_register_hw
(
&
hw
,
NULL
);
}
...
...
@@ -246,7 +243,7 @@ void ide_config(dev_link_t *link)
config_info_t
conf
;
cistpl_cftable_entry_t
*
cfg
=
&
parse
.
cftable_entry
;
cistpl_cftable_entry_t
dflt
=
{
0
};
int
i
,
pass
,
last_ret
,
last_fn
,
hd
=-
1
,
io_base
,
ctl_base
;
int
i
,
pass
,
last_ret
,
last_fn
,
hd
,
io_base
,
ctl_base
,
is_kme
=
0
;
DEBUG
(
0
,
"ide_config(0x%p)
\n
"
,
link
);
...
...
@@ -260,6 +257,14 @@ void ide_config(dev_link_t *link)
link
->
conf
.
ConfigBase
=
parse
.
config
.
base
;
link
->
conf
.
Present
=
parse
.
config
.
rmask
[
0
];
tuple
.
DesiredTuple
=
CISTPL_MANFID
;
if
(
!
CardServices
(
GetFirstTuple
,
handle
,
&
tuple
)
&&
!
CardServices
(
GetTupleData
,
handle
,
&
tuple
)
&&
!
CardServices
(
ParseTuple
,
handle
,
&
tuple
,
&
parse
))
is_kme
=
((
parse
.
manfid
.
manf
==
MANFID_KME
)
&&
((
parse
.
manfid
.
card
==
PRODID_KME_KXLC005_A
)
||
(
parse
.
manfid
.
card
==
PRODID_KME_KXLC005_B
)));
/* Configure card */
link
->
state
|=
DEV_CONFIG
;
...
...
@@ -303,7 +308,7 @@ void ide_config(dev_link_t *link)
if
(
io
->
nwin
==
2
)
{
link
->
io
.
NumPorts1
=
8
;
link
->
io
.
BasePort2
=
io
->
win
[
1
].
base
;
link
->
io
.
NumPorts2
=
1
;
link
->
io
.
NumPorts2
=
(
is_kme
)
?
2
:
1
;
CFG_CHECK
(
RequestIO
,
link
->
handle
,
&
link
->
io
);
io_base
=
link
->
io
.
BasePort1
;
ctl_base
=
link
->
io
.
BasePort2
;
...
...
@@ -337,14 +342,17 @@ void ide_config(dev_link_t *link)
if
(
link
->
io
.
NumPorts2
)
release_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
);
/* disable drive interrupts during IDE probe */
outb
(
0x02
,
ctl_base
);
/* special setup for KXLC005 card */
if
(
is_kme
)
outb
(
0x81
,
ctl_base
+
1
);
/* retry registration in case device is still spinning up */
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
ctl_base
)
outb
(
0x02
,
ctl_base
);
/* Set nIEN = disable device interrupts */
for
(
hd
=
-
1
,
i
=
0
;
i
<
10
;
i
++
)
{
hd
=
idecs_register
(
io_base
,
ctl_base
,
link
->
irq
.
AssignedIRQ
);
if
(
hd
>=
0
)
break
;
if
(
link
->
io
.
NumPorts1
==
0x20
)
{
if
(
ctl_base
)
outb
(
0x02
,
ctl_base
+
0x10
);
hd
=
idecs_register
(
io_base
+
0x10
,
ctl_base
+
0x10
,
link
->
irq
.
AssignedIRQ
);
...
...
@@ -358,7 +366,7 @@ void ide_config(dev_link_t *link)
}
if
(
hd
<
0
)
{
printk
(
KERN_NOTICE
"ide
_cs: ide_register() at 0x%03x & 0x%0
3x"
printk
(
KERN_NOTICE
"ide
-cs: ide_register() at 0x%3x & 0x%
3x"
", irq %u failed
\n
"
,
io_base
,
ctl_base
,
link
->
irq
.
AssignedIRQ
);
goto
failed
;
...
...
@@ -371,7 +379,7 @@ void ide_config(dev_link_t *link)
info
->
node
.
minor
=
0
;
info
->
hd
=
hd
;
link
->
dev
=
&
info
->
node
;
printk
(
KERN_INFO
"ide
_
cs: %s: Vcc = %d.%d, Vpp = %d.%d
\n
"
,
printk
(
KERN_INFO
"ide
-
cs: %s: Vcc = %d.%d, Vpp = %d.%d
\n
"
,
info
->
node
.
dev_name
,
link
->
conf
.
Vcc
/
10
,
link
->
conf
.
Vcc
%
10
,
link
->
conf
.
Vpp1
/
10
,
link
->
conf
.
Vpp1
%
10
);
...
...
@@ -382,6 +390,7 @@ void ide_config(dev_link_t *link)
cs_error
(
link
->
handle
,
last_fn
,
last_ret
);
failed:
ide_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
}
/* ide_config */
...
...
@@ -402,13 +411,14 @@ void ide_release(u_long arg)
if
(
info
->
ndev
)
{
ide_unregister
(
info
->
hd
);
/* deal with brain dead IDE resource management */
request_region
(
link
->
io
.
BasePort1
,
link
->
io
.
NumPorts1
,
info
->
node
.
dev_name
);
if
(
link
->
io
.
NumPorts2
)
request_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
,
info
->
node
.
dev_name
);
MOD_DEC_USE_COUNT
;
}
request_region
(
link
->
io
.
BasePort1
,
link
->
io
.
NumPorts1
,
"ide-cs"
);
if
(
link
->
io
.
NumPorts2
)
request_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
,
"ide-cs"
);
info
->
ndev
=
0
;
link
->
dev
=
NULL
;
...
...
@@ -472,9 +482,9 @@ static int __init init_ide_cs(void)
DEBUG
(
0
,
"%s
\n
"
,
version
);
CardServices
(
GetCardServicesInfo
,
&
serv
);
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"ide
_
cs: Card Services release "
printk
(
KERN_NOTICE
"ide
-
cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
ide_attach
,
&
ide_detach
);
return
0
;
...
...
@@ -482,7 +492,7 @@ static int __init init_ide_cs(void)
static
void
__exit
exit_ide_cs
(
void
)
{
DEBUG
(
0
,
"ide
_
cs: unloading
\n
"
);
DEBUG
(
0
,
"ide
-
cs: unloading
\n
"
);
unregister_pccard_driver
(
&
dev_info
);
while
(
dev_list
!=
NULL
)
ide_detach
(
dev_list
);
...
...
drivers/mtd/ftl.c
View file @
ee4351da
...
...
@@ -26,7 +26,7 @@
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
...
...
@@ -1302,5 +1302,5 @@ module_init(init_ftl);
module_exit
(
cleanup_ftl
);
MODULE_LICENSE
(
"Dual MPL/GPL"
);
MODULE_AUTHOR
(
"David Hinds <d
hinds@sonic
.net>"
);
MODULE_AUTHOR
(
"David Hinds <d
ahinds@users.sourceforge
.net>"
);
MODULE_DESCRIPTION
(
"Support code for Flash Translation Layer, used on PCMCIA devices and M-Systems DiskOnChip 1000"
);
drivers/net/pcmcia/ax8390.h
deleted
100644 → 0
View file @
d472b9dc
/* Generic NS8390 register definitions. */
/* This file is part of Donald Becker's 8390 drivers, and is distributed
under the same license. Auto-loading of 8390.o only in v2.2 - Paul G.
Some of these names and comments originated from the Crynwr
packet drivers, which are distributed under the GPL. */
#ifndef _8390_h
#define _8390_h
#include <linux/config.h>
#include <linux/if_ether.h>
#include <linux/ioport.h>
#include <linux/skbuff.h>
#define TX_2X_PAGES 12
#define TX_1X_PAGES 6
/* Should always use two Tx slots to get back-to-back transmits. */
#define EI_PINGPONG
#ifdef EI_PINGPONG
#define TX_PAGES TX_2X_PAGES
#else
#define TX_PAGES TX_1X_PAGES
#endif
#define ETHER_ADDR_LEN 6
/* The 8390 specific per-packet-header format. */
struct
e8390_pkt_hdr
{
unsigned
char
status
;
/* status */
unsigned
char
next
;
/* pointer to next packet. */
unsigned
short
count
;
/* header + packet length in bytes */
};
#ifdef notdef
extern
int
ei_debug
;
#else
#define ei_debug 1
#endif
static
int
ethdev_init
(
struct
net_device
*
dev
);
static
void
NS8390_init
(
struct
net_device
*
dev
,
int
startp
);
static
int
ei_open
(
struct
net_device
*
dev
);
static
int
ei_close
(
struct
net_device
*
dev
);
static
void
ei_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
/* Most of these entries should be in 'struct net_device' (or most of the
things in there should be here!) */
/* You have one of these per-board */
struct
ei_device
{
const
char
*
name
;
void
(
*
reset_8390
)(
struct
net_device
*
);
void
(
*
get_8390_hdr
)(
struct
net_device
*
,
struct
e8390_pkt_hdr
*
,
int
);
void
(
*
block_output
)(
struct
net_device
*
,
int
,
const
unsigned
char
*
,
int
);
void
(
*
block_input
)(
struct
net_device
*
,
int
,
struct
sk_buff
*
,
int
);
unsigned
char
mcfilter
[
8
];
unsigned
open
:
1
;
unsigned
word16
:
1
;
/* We have the 16-bit (vs 8-bit) version of the card. */
unsigned
txing
:
1
;
/* Transmit Active */
unsigned
irqlock
:
1
;
/* 8390's intrs disabled when '1'. */
unsigned
dmaing
:
1
;
/* Remote DMA Active */
unsigned
char
tx_start_page
,
rx_start_page
,
stop_page
;
unsigned
char
current_page
;
/* Read pointer in buffer */
unsigned
char
interface_num
;
/* Net port (AUI, 10bT.) to use. */
unsigned
char
txqueue
;
/* Tx Packet buffer queue length. */
short
tx1
,
tx2
;
/* Packet lengths for ping-pong tx. */
short
lasttx
;
/* Alpha version consistency check. */
unsigned
char
reg0
;
/* Register '0' in a WD8013 */
unsigned
char
reg5
;
/* Register '5' in a WD8013 */
unsigned
char
saved_irq
;
/* Original dev->irq value. */
struct
net_device_stats
stat
;
/* The new statistics table. */
u32
*
reg_offset
;
/* Register mapping table */
spinlock_t
page_lock
;
/* Page register locks */
unsigned
long
priv
;
/* Private field to store bus IDs etc. */
};
/* The maximum number of 8390 interrupt service routines called per IRQ. */
#define MAX_SERVICE 12
/* The maximum time waited (in jiffies) before assuming a Tx failed. (20ms) */
#define TX_TIMEOUT (20*HZ/100)
#define ei_status (*(struct ei_device *)(dev->priv))
/* Some generic ethernet register configurations. */
#define E8390_TX_IRQ_MASK 0xa
/* For register EN0_ISR */
#define E8390_RX_IRQ_MASK 0x5
#define E8390_RXCONFIG 0x44
/* EN0_RXCR: broadcasts, no multicast,errors */
#define E8390_RXOFF 0x20
/* EN0_RXCR: Accept no packets */
#define E8390_TXCONFIG 0x00
/* EN0_TXCR: Normal transmit mode */
#define E8390_TXOFF 0x02
/* EN0_TXCR: Transmitter off */
/* Register accessed at EN_CMD, the 8390 base addr. */
#define E8390_STOP 0x01
/* Stop and reset the chip */
#define E8390_START 0x02
/* Start the chip, clear reset */
#define E8390_TRANS 0x04
/* Transmit a frame */
#define E8390_RREAD 0x08
/* Remote read */
#define E8390_RWRITE 0x10
/* Remote write */
#define E8390_NODMA 0x20
/* Remote DMA */
#define E8390_PAGE0 0x00
/* Select page chip registers */
#define E8390_PAGE1 0x40
/* using the two high-order bits */
#define E8390_PAGE2 0x80
/* Page 3 is invalid. */
/*
* Only generate indirect loads given a machine that needs them.
*/
#if defined(CONFIG_MAC) || defined(CONFIG_AMIGA_PCMCIA) || \
defined(CONFIG_ARIADNE2) || defined(CONFIG_ARIADNE2_MODULE) || \
defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE)
#define EI_SHIFT(x) (ei_local->reg_offset[x])
#else
#define EI_SHIFT(x) (x)
#endif
#define E8390_CMD EI_SHIFT(0x00)
/* The command register (for all pages) */
/* Page 0 register offsets. */
#define EN0_CLDALO EI_SHIFT(0x01)
/* Low byte of current local dma addr RD */
#define EN0_STARTPG EI_SHIFT(0x01)
/* Starting page of ring bfr WR */
#define EN0_CLDAHI EI_SHIFT(0x02)
/* High byte of current local dma addr RD */
#define EN0_STOPPG EI_SHIFT(0x02)
/* Ending page +1 of ring bfr WR */
#define EN0_BOUNDARY EI_SHIFT(0x03)
/* Boundary page of ring bfr RD WR */
#define EN0_TSR EI_SHIFT(0x04)
/* Transmit status reg RD */
#define EN0_TPSR EI_SHIFT(0x04)
/* Transmit starting page WR */
#define EN0_NCR EI_SHIFT(0x05)
/* Number of collision reg RD */
#define EN0_TCNTLO EI_SHIFT(0x05)
/* Low byte of tx byte count WR */
#define EN0_FIFO EI_SHIFT(0x06)
/* FIFO RD */
#define EN0_TCNTHI EI_SHIFT(0x06)
/* High byte of tx byte count WR */
#define EN0_ISR EI_SHIFT(0x07)
/* Interrupt status reg RD WR */
#define EN0_CRDALO EI_SHIFT(0x08)
/* low byte of current remote dma address RD */
#define EN0_RSARLO EI_SHIFT(0x08)
/* Remote start address reg 0 */
#define EN0_CRDAHI EI_SHIFT(0x09)
/* high byte, current remote dma address RD */
#define EN0_RSARHI EI_SHIFT(0x09)
/* Remote start address reg 1 */
#define EN0_RCNTLO EI_SHIFT(0x0a)
/* Remote byte count reg WR */
#define EN0_RCNTHI EI_SHIFT(0x0b)
/* Remote byte count reg WR */
#define EN0_RSR EI_SHIFT(0x0c)
/* rx status reg RD */
#define EN0_RXCR EI_SHIFT(0x0c)
/* RX configuration reg WR */
#define EN0_TXCR EI_SHIFT(0x0d)
/* TX configuration reg WR */
#define EN0_COUNTER0 EI_SHIFT(0x0d)
/* Rcv alignment error counter RD */
#define EN0_DCFG EI_SHIFT(0x0e)
/* Data configuration reg WR */
#define EN0_COUNTER1 EI_SHIFT(0x0e)
/* Rcv CRC error counter RD */
#define EN0_IMR EI_SHIFT(0x0f)
/* Interrupt mask reg WR */
#define EN0_COUNTER2 EI_SHIFT(0x0f)
/* Rcv missed frame error counter RD */
/* Bits in EN0_ISR - Interrupt status register */
#define ENISR_RX 0x01
/* Receiver, no error */
#define ENISR_TX 0x02
/* Transmitter, no error */
#define ENISR_RX_ERR 0x04
/* Receiver, with error */
#define ENISR_TX_ERR 0x08
/* Transmitter, with error */
#define ENISR_OVER 0x10
/* Receiver overwrote the ring */
#define ENISR_COUNTERS 0x20
/* Counters need emptying */
#define ENISR_RDC 0x40
/* remote dma complete */
#define ENISR_RESET 0x80
/* Reset completed */
#define ENISR_ALL 0x3f
/* Interrupts we will enable */
/* Bits in EN0_DCFG - Data config register */
#define ENDCFG_WTS 0x01
/* word transfer mode selection */
/* Page 1 register offsets. */
#define EN1_PHYS EI_SHIFT(0x01)
/* This board's physical enet addr RD WR */
#define EN1_PHYS_SHIFT(i) EI_SHIFT(i+1)
/* Get and set mac address */
#define EN1_CURPAG EI_SHIFT(0x07)
/* Current memory page RD WR */
#define EN1_MULT EI_SHIFT(0x08)
/* Multicast filter mask array (8 bytes) RD WR */
#define EN1_MULT_SHIFT(i) EI_SHIFT(8+i)
/* Get and set multicast filter */
/* Bits in received packet status byte and EN0_RSR*/
#define ENRSR_RXOK 0x01
/* Received a good packet */
#define ENRSR_CRC 0x02
/* CRC error */
#define ENRSR_FAE 0x04
/* frame alignment error */
#define ENRSR_FO 0x08
/* FIFO overrun */
#define ENRSR_MPA 0x10
/* missed pkt */
#define ENRSR_PHY 0x20
/* physical/multicast address */
#define ENRSR_DIS 0x40
/* receiver disable. set in monitor mode */
#define ENRSR_DEF 0x80
/* deferring */
/* Transmitted packet status, EN0_TSR. */
#define ENTSR_PTX 0x01
/* Packet transmitted without error */
#define ENTSR_ND 0x02
/* The transmit wasn't deferred. */
#define ENTSR_COL 0x04
/* The transmit collided at least once. */
#define ENTSR_ABT 0x08
/* The transmit collided 16 times, and was deferred. */
#define ENTSR_CRS 0x10
/* The carrier sense was lost. */
#define ENTSR_FU 0x20
/* A "FIFO underrun" occurred during transmit. */
#define ENTSR_CDH 0x40
/* The collision detect "heartbeat" signal was lost. */
#define ENTSR_OWC 0x80
/* There was an out-of-window collision. */
#endif
/* _8390_h */
drivers/net/pcmcia/axnet_cs.c
View file @
ee4351da
...
...
@@ -11,7 +11,7 @@
Copyright (C) 2001 David A. Hinds -- dahinds@users.sourceforge.net
axnet_cs.c 1.
11 2001/06/12 12:42:40
axnet_cs.c 1.
28 2002/06/29 06:27:37
The network driver code is based on Donald Becker's NE2000 code:
...
...
@@ -20,7 +20,7 @@
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.
Donald Becker may be reached at becker@
cesdis1.gsfc.nasa.gov
Donald Becker may be reached at becker@
scyld.com
======================================================================*/
...
...
@@ -33,14 +33,15 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include <linux/netdevice.h>
#include "
ax
8390.h"
#include "
../
8390.h"
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
...
...
@@ -53,34 +54,25 @@
#define AXNET_CMD 0x00
#define AXNET_DATAPORT 0x10
/* NatSemi-defined port window offset. */
#define AXNET_RESET 0x1f
/* Issue a read to reset, a write to clear. */
#define AXNET_MISC 0x18
/* For IBM CCAE and Socket EA cards */
#define AXNET_MII_EEP 0x14
/* Offset of MII access port */
#define AXNET_TEST 0x15
/* Offset of TEST Register port */
#define AXNET_GPIO 0x17
/* Offset of General Purpose Register Port */
#define AXNET_START_PG 0x40
/* First page of TX buffer */
#define AXNET_STOP_PG 0x80
/* Last page +1 of RX ring */
#define AXNET_RDC_TIMEOUT 0x02
/* Max wait in jiffies for Tx RDC */
#ifdef PCMCIA_DEBUG
static
int
pc_debug
=
PCMCIA_DEBUG
;
MODULE_PARM
(
pc_debug
,
"i"
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"axnet_cs.c 1.11 2001/06/12 12:42:40 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
#define DEV_KFREE_SKB(skb) dev_kfree_skb(skb);
#define skb_tx_check(dev, skb)
#define add_rx_bytes(stats, n) (stats)->rx_bytes += n;
#define add_tx_bytes(stats, n) (stats)->tx_bytes += n;
#define netif_mark_up(dev) do { } while (0)
#define netif_mark_down(dev) do { } while (0)
#define IS_AX88190 0x0001
#define IS_AX88790 0x0002
/*====================================================================*/
/* Parameters that can be set with 'insmod' */
/* Module parameters */
MODULE_AUTHOR
(
"David Hinds <dahinds@users.sourceforge.net>"
);
MODULE_DESCRIPTION
(
"Asix AX88190 PCMCIA ethernet driver"
);
MODULE_LICENSE
(
"GPL"
);
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
...
...
@@ -89,9 +81,14 @@ INT_MODULE_PARM(irq_mask, 0xdeb8);
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_list
,
"1-4i"
);
/* Ugh! Let the user hardwire the hardware address for queer cards */
static
int
hw_addr
[
6
]
=
{
0
,
/* ... */
};
MODULE_PARM
(
hw_addr
,
"6i"
);
#ifdef PCMCIA_DEBUG
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"axnet_cs.c 1.28 2002/06/29 06:27:37 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
/*====================================================================*/
...
...
@@ -122,6 +119,12 @@ static void axnet_detach(dev_link_t *);
static
dev_info_t
dev_info
=
"axnet_cs"
;
static
dev_link_t
*
dev_list
;
static
int
axdev_init
(
struct
net_device
*
dev
);
static
void
AX88190_init
(
struct
net_device
*
dev
,
int
startp
);
static
int
ax_open
(
struct
net_device
*
dev
);
static
int
ax_close
(
struct
net_device
*
dev
);
static
void
ax_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
/*====================================================================*/
typedef
struct
axnet_dev_t
{
...
...
@@ -134,6 +137,7 @@ typedef struct axnet_dev_t {
u_short
link_status
;
u_char
duplex_flag
;
int
phy_id
;
int
flags
;
}
axnet_dev_t
;
/*======================================================================
...
...
@@ -212,7 +216,7 @@ static dev_link_t *axnet_attach(void)
link
->
conf
.
Attributes
=
CONF_ENABLE_IRQ
;
link
->
conf
.
IntType
=
INT_MEMORY_AND_IO
;
eth
dev_init
(
dev
);
ax
dev_init
(
dev
);
dev
->
init
=
&
axnet_init
;
dev
->
open
=
&
axnet_open
;
dev
->
stop
=
&
axnet_close
;
...
...
@@ -304,7 +308,7 @@ static int get_prom(dev_link_t *link)
{
0x00
,
EN0_RCNTHI
},
{
0x00
,
EN0_IMR
},
/* Mask completion irq. */
{
0xFF
,
EN0_ISR
},
{
E8390_RXOFF
,
EN0_RXCR
},
/* 0x2
0 Set to monitor */
{
E8390_RXOFF
|
0x40
,
EN0_RXCR
},
/* 0x6
0 Set to monitor */
{
E8390_TXOFF
,
EN0_TXCR
},
/* 0x02 and loopback mode. */
{
0x10
,
EN0_RCNTLO
},
{
0x00
,
EN0_RCNTHI
},
...
...
@@ -331,30 +335,6 @@ static int get_prom(dev_link_t *link)
return
1
;
}
/* get_prom */
/*======================================================================
This should be totally unnecessary... but when we can't figure
out the hardware address any other way, we'll let the user hard
wire it when the module is initialized.
======================================================================*/
static
int
get_hwired
(
dev_link_t
*
link
)
{
struct
net_device
*
dev
=
link
->
priv
;
int
i
;
for
(
i
=
0
;
i
<
6
;
i
++
)
if
(
hw_addr
[
i
]
!=
0
)
break
;
if
(
i
==
6
)
return
0
;
for
(
i
=
0
;
i
<
6
;
i
++
)
dev
->
dev_addr
[
i
]
=
hw_addr
[
i
];
return
1
;
}
/* get_hwired */
/*======================================================================
axnet_config() is scheduled to run after a CARD_INSERTION event
...
...
@@ -421,7 +401,8 @@ static void axnet_config(dev_link_t *link)
CS_CHECK
(
GetTupleData
,
handle
,
&
tuple
);
CS_CHECK
(
ParseTuple
,
handle
,
&
tuple
,
&
parse
);
link
->
conf
.
ConfigBase
=
parse
.
config
.
base
;
link
->
conf
.
Present
=
parse
.
config
.
rmask
[
0
];
/* don't trust the CIS on this; Linksys got it wrong */
link
->
conf
.
Present
=
0x63
;
/* Configure card */
link
->
state
|=
DEV_CONFIG
;
...
...
@@ -442,7 +423,7 @@ static void axnet_config(dev_link_t *link)
if
((
cfg
->
index
==
0
)
||
(
cfg
->
io
.
nwin
==
0
))
goto
next_entry
;
link
->
conf
.
ConfigIndex
=
cfg
->
index
;
link
->
conf
.
ConfigIndex
=
0x05
;
/* For multifunction cards, by convention, we configure the
network function with window 0, and serial with window 1 */
if
(
io
->
nwin
>
1
)
{
...
...
@@ -482,9 +463,9 @@ static void axnet_config(dev_link_t *link)
goto
failed
;
}
if
(
!
get_prom
(
link
)
&&
!
get_hwired
(
link
)
)
{
printk
(
KERN_NOTICE
"axnet_cs:
unable to read hardware net"
" address for io base %#3lx
\n
"
,
dev
->
base_addr
);
if
(
!
get_prom
(
link
))
{
printk
(
KERN_NOTICE
"axnet_cs:
this is not an AX88190 card!
\n
"
);
printk
(
KERN_NOTICE
"axnet_cs: use pcnet_cs instead.
\n
"
);
unregister_netdev
(
dev
);
goto
failed
;
}
...
...
@@ -501,17 +482,37 @@ static void axnet_config(dev_link_t *link)
strcpy
(
info
->
node
.
dev_name
,
dev
->
name
);
link
->
dev
=
&
info
->
node
;
link
->
state
&=
~
DEV_CONFIG_PENDING
;
printk
(
KERN_INFO
"%s: Asix AX88190: io %#3lx, irq %d, hw_addr "
,
dev
->
name
,
dev
->
base_addr
,
dev
->
irq
);
if
(
inb
(
dev
->
base_addr
+
AXNET_TEST
)
!=
0
)
info
->
flags
|=
IS_AX88790
;
else
info
->
flags
|=
IS_AX88190
;
printk
(
KERN_INFO
"%s: Asix AX88%d90: io %#3lx, irq %d, hw_addr "
,
dev
->
name
,
((
info
->
flags
&
IS_AX88790
)
?
7
:
1
),
dev
->
base_addr
,
dev
->
irq
);
for
(
i
=
0
;
i
<
6
;
i
++
)
printk
(
"%02X%s"
,
dev
->
dev_addr
[
i
],
((
i
<
5
)
?
":"
:
"
\n
"
));
if
(
info
->
flags
&
IS_AX88790
)
outb
(
0x10
,
dev
->
base_addr
+
AXNET_GPIO
);
/* select Internal PHY */
for
(
i
=
0
;
i
<
32
;
i
++
)
{
j
=
mdio_read
(
dev
->
base_addr
+
AXNET_MII_EEP
,
i
,
1
);
if
((
j
!=
0
)
&&
(
j
!=
0xffff
))
break
;
}
/* Maybe PHY is in power down mode. (PPD_SET = 1)
Bit 2 of CCSR is active low. */
if
(
i
==
32
)
{
conf_reg_t
reg
=
{
0
,
CS_WRITE
,
CISREG_CCSR
,
0x04
};
CardServices
(
AccessConfigurationRegister
,
link
->
handle
,
&
reg
);
for
(
i
=
0
;
i
<
32
;
i
++
)
{
j
=
mdio_read
(
dev
->
base_addr
+
AXNET_MII_EEP
,
i
,
1
);
if
((
j
!=
0
)
&&
(
j
!=
0xffff
))
break
;
}
}
info
->
phy_id
=
(
i
<
32
)
?
i
:
-
1
;
if
(
i
<
32
)
{
DEBUG
(
0
,
" MII transceiver at index %d, status %x.
\n
"
,
i
,
j
);
...
...
@@ -519,12 +520,14 @@ static void axnet_config(dev_link_t *link)
printk
(
KERN_NOTICE
" No MII transceivers found!
\n
"
);
}
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
cs_failed:
cs_error
(
link
->
handle
,
last_fn
,
last_ret
);
failed:
axnet_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
}
/* axnet_config */
...
...
@@ -544,7 +547,7 @@ static void axnet_release(u_long arg)
if
(
link
->
open
)
{
DEBUG
(
1
,
"axnet_cs: release postponed, '%s' still open
\n
"
,
info
->
node
.
dev_name
);
((
axnet_dev_t
*
)(
link
->
priv
))
->
node
.
dev_name
);
link
->
state
|=
DEV_STALE_CONFIG
;
return
;
}
...
...
@@ -583,7 +586,7 @@ static int axnet_event(event_t event, int priority,
}
break
;
case
CS_EVENT_CARD_INSERTION
:
link
->
state
|=
DEV_PRESENT
;
link
->
state
|=
DEV_PRESENT
|
DEV_CONFIG_PENDING
;
axnet_config
(
link
);
break
;
case
CS_EVENT_PM_SUSPEND
:
...
...
@@ -604,7 +607,7 @@ static int axnet_event(event_t event, int priority,
CardServices
(
RequestConfiguration
,
link
->
handle
,
&
link
->
conf
);
if
(
link
->
open
)
{
axnet_reset_8390
(
&
info
->
dev
);
NS83
90_init
(
&
info
->
dev
,
1
);
AX881
90_init
(
&
info
->
dev
,
1
);
netif_device_attach
(
&
info
->
dev
);
}
}
...
...
@@ -695,7 +698,7 @@ static int axnet_open(struct net_device *dev)
info
->
watchdog
.
expires
=
jiffies
+
HZ
;
add_timer
(
&
info
->
watchdog
);
return
ei
_open
(
dev
);
return
ax
_open
(
dev
);
}
/* axnet_open */
/*====================================================================*/
...
...
@@ -707,11 +710,11 @@ static int axnet_close(struct net_device *dev)
DEBUG
(
2
,
"axnet_close('%s')
\n
"
,
dev
->
name
);
ax_close
(
dev
);
free_irq
(
dev
->
irq
,
dev
);
link
->
open
--
;
netif_stop_queue
(
dev
);
netif_mark_down
(
dev
);
del_timer
(
&
info
->
watchdog
);
if
(
link
->
state
&
DEV_STALE_CONFIG
)
mod_timer
(
&
link
->
release
,
jiffies
+
HZ
/
20
);
...
...
@@ -758,7 +761,7 @@ static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs)
{
axnet_dev_t
*
info
=
dev_id
;
info
->
stale
=
0
;
ei
_interrupt
(
irq
,
dev_id
,
regs
);
ax
_interrupt
(
irq
,
dev_id
,
regs
);
}
static
void
ei_watchdog
(
u_long
arg
)
...
...
@@ -810,7 +813,7 @@ static void ei_watchdog(u_long arg)
else
printk
(
KERN_INFO
"%s: link partner did not autonegotiate
\n
"
,
dev
->
name
);
NS83
90_init
(
dev
,
1
);
AX881
90_init
(
dev
,
1
);
}
info
->
link_status
=
link
;
}
...
...
@@ -830,7 +833,6 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
switch
(
ethcmd
)
{
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strncpy
(
info
.
driver
,
"axnet_cs"
,
sizeof
(
info
.
driver
)
-
1
);
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
...
...
@@ -941,7 +943,7 @@ static int __init init_axnet_cs(void)
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"axnet_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
axnet_attach
,
&
axnet_detach
);
return
0
;
...
...
@@ -970,9 +972,10 @@ module_exit(exit_axnet_cs);
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@CESDIS.gsfc.nasa.gov, or C/O
Center of Excellence in Space Data and Information Sciences
Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
The author may be reached as becker@scyld.com, or C/O
Scyld Computing Corporation
410 Severn Ave., Suite 210
Annapolis MD 21403
This is the chip-specific code for many 8390-based ethernet adaptors.
This is not a complete driver, it must be combined with board-specific
...
...
@@ -983,7 +986,6 @@ module_exit(exit_axnet_cs);
a simple innocent change. Please contact me or Donald if you think
you have found something that needs changing. -- PG
Changelog:
Paul Gortmaker : remove set_bit lock, other cleanups.
...
...
@@ -1007,8 +1009,8 @@ module_exit(exit_axnet_cs);
*/
static
const
char
*
version
=
"8390.c:v1.10cvs 9/23/94 Donald Becker (becker@
cesdis.gsfc.nasa.gov
)
\n
"
;
static
const
char
*
version
_8390
=
"8390.c:v1.10cvs 9/23/94 Donald Becker (becker@
scyld.com
)
\n
"
;
#include <asm/uaccess.h>
#include <asm/bitops.h>
...
...
@@ -1088,25 +1090,23 @@ static void do_set_multicast_list(struct net_device *dev);
* them.
*/
/**
*
ei
_open - Open/initialize the board.
*
ax
_open - Open/initialize the board.
* @dev: network device to initialize
*
* This routine goes all-out, setting everything
* up anew at each open, even though many of these registers should only
* need to be set once at boot.
*/
static
int
ei
_open
(
struct
net_device
*
dev
)
static
int
ax
_open
(
struct
net_device
*
dev
)
{
unsigned
long
flags
;
struct
ei_device
*
ei_local
=
(
struct
ei_device
*
)
dev
->
priv
;
/* This can't happen unless somebody forgot to call
eth
dev_init(). */
/* This can't happen unless somebody forgot to call
ax
dev_init(). */
if
(
ei_local
==
NULL
)
{
printk
(
KERN_EMERG
"%s:
ei
_open passed a non-existent device!
\n
"
,
dev
->
name
);
printk
(
KERN_EMERG
"%s:
ax
_open passed a non-existent device!
\n
"
,
dev
->
name
);
return
-
ENXIO
;
}
...
...
@@ -1125,16 +1125,38 @@ static int ei_open(struct net_device *dev)
*/
spin_lock_irqsave
(
&
ei_local
->
page_lock
,
flags
);
NS83
90_init
(
dev
,
1
);
AX881
90_init
(
dev
,
1
);
/* Set the flag before we drop the lock, That way the IRQ arrives
after its set and we get no silly warnings */
netif_mark_up
(
dev
);
netif_start_queue
(
dev
);
spin_unlock_irqrestore
(
&
ei_local
->
page_lock
,
flags
);
ei_local
->
irqlock
=
0
;
return
0
;
}
#define dev_lock(dev) (((struct ei_device *)(dev)->priv)->page_lock)
/**
* ax_close - shut down network device
* @dev: network device to close
*
* Opposite of ax_open(). Only used when "ifconfig <devname> down" is done.
*/
int
ax_close
(
struct
net_device
*
dev
)
{
unsigned
long
flags
;
/*
* Hold the page lock during close
*/
spin_lock_irqsave
(
&
dev_lock
(
dev
),
flags
);
AX88190_init
(
dev
,
0
);
spin_unlock_irqrestore
(
&
dev_lock
(
dev
),
flags
);
netif_stop_queue
(
dev
);
return
0
;
}
/**
* ei_tx_timeout - handle transmit time out condition
* @dev: network device which has apparently fallen asleep
...
...
@@ -1174,7 +1196,7 @@ void ei_tx_timeout(struct net_device *dev)
/* Try to restart the card. Perhaps the user has fixed something. */
ei_reset_8390
(
dev
);
NS83
90_init
(
dev
,
1
);
AX881
90_init
(
dev
,
1
);
spin_unlock
(
&
ei_local
->
page_lock
);
enable_irq
(
dev
->
irq
);
...
...
@@ -1197,7 +1219,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned
long
flags
;
netif_stop_queue
(
dev
);
skb_tx_check
(
dev
,
skb
);
length
=
skb
->
len
;
...
...
@@ -1210,7 +1231,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
outb_p
(
0x00
,
e8390_base
+
EN0_IMR
);
spin_unlock_irqrestore
(
&
ei_local
->
page_lock
,
flags
);
/*
* Slow phase with lock held.
*/
...
...
@@ -1223,8 +1243,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
send_length
=
ETH_ZLEN
<
length
?
length
:
ETH_ZLEN
;
#ifdef EI_PINGPONG
/*
* We have two Tx slots available for use. Find the first free
* slot, and then perform some sanity checks. With two Tx bufs,
...
...
@@ -1293,22 +1311,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
else
netif_start_queue
(
dev
);
#else
/* EI_PINGPONG */
/*
* Only one Tx buffer in use. You need two Tx bufs to come close to
* back-to-back transmits. Expect a 20 -> 25% performance hit on
* reasonable hardware if you only use one Tx buffer.
*/
ei_block_output
(
dev
,
length
,
skb
->
data
,
ei_local
->
tx_start_page
);
ei_local
->
txing
=
1
;
NS8390_trigger_send
(
dev
,
send_length
,
ei_local
->
tx_start_page
);
dev
->
trans_start
=
jiffies
;
netif_stop_queue
(
dev
);
#endif
/* EI_PINGPONG */
/* Turn 8390 interrupts back on. */
ei_local
->
irqlock
=
0
;
outb_p
(
ENISR_ALL
,
e8390_base
+
EN0_IMR
);
...
...
@@ -1316,14 +1318,14 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
spin_unlock
(
&
ei_local
->
page_lock
);
enable_irq
(
dev
->
irq
);
DEV_KFREE_SKB
(
skb
);
add_tx_bytes
(
&
ei_local
->
stat
,
send_length
)
;
dev_kfree_skb
(
skb
);
ei_local
->
stat
.
tx_bytes
+=
send_length
;
return
0
;
}
/**
*
ei
_interrupt - handle the interrupts from an 8390
*
ax
_interrupt - handle the interrupts from an 8390
* @irq: interrupt number
* @dev_id: a pointer to the net_device
* @regs: unused
...
...
@@ -1335,7 +1337,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
* needed.
*/
static
void
ei
_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
ax
_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
dev_id
;
long
e8390_base
;
...
...
@@ -1502,8 +1504,6 @@ static void ei_tx_intr(struct net_device *dev)
struct
ei_device
*
ei_local
=
(
struct
ei_device
*
)
dev
->
priv
;
int
status
=
inb
(
e8390_base
+
EN0_TSR
);
#ifdef EI_PINGPONG
/*
* There are two Tx buffers, see which one finished, and trigger
* the send of another one if it exists.
...
...
@@ -1546,13 +1546,6 @@ static void ei_tx_intr(struct net_device *dev)
// else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n",
// dev->name, ei_local->lasttx);
#else
/* EI_PINGPONG */
/*
* Single Tx buffer: mark it free so another packet can be loaded.
*/
ei_local
->
txing
=
0
;
#endif
/* Minimize Tx latency: update the statistics after we restart TXing. */
if
(
status
&
ENTSR_COL
)
ei_local
->
stat
.
collisions
++
;
...
...
@@ -1660,7 +1653,7 @@ static void ei_receive(struct net_device *dev)
netif_rx
(
skb
);
dev
->
last_rx
=
jiffies
;
ei_local
->
stat
.
rx_packets
++
;
add_rx_bytes
(
&
ei_local
->
stat
,
pkt_len
)
;
ei_local
->
stat
.
rx_bytes
+=
pkt_len
;
if
(
pkt_stat
&
ENRSR_PHY
)
ei_local
->
stat
.
multicast
++
;
}
...
...
@@ -1806,11 +1799,11 @@ static void do_set_multicast_list(struct net_device *dev)
long
e8390_base
=
dev
->
base_addr
;
if
(
dev
->
flags
&
IFF_PROMISC
)
outb_p
(
E8390_RXCONFIG
|
0x
1
8
,
e8390_base
+
EN0_RXCR
);
outb_p
(
E8390_RXCONFIG
|
0x
5
8
,
e8390_base
+
EN0_RXCR
);
else
if
(
dev
->
flags
&
IFF_ALLMULTI
||
dev
->
mc_list
)
outb_p
(
E8390_RXCONFIG
|
0x
0
8
,
e8390_base
+
EN0_RXCR
);
outb_p
(
E8390_RXCONFIG
|
0x
4
8
,
e8390_base
+
EN0_RXCR
);
else
outb_p
(
E8390_RXCONFIG
,
e8390_base
+
EN0_RXCR
);
outb_p
(
E8390_RXCONFIG
|
0x40
,
e8390_base
+
EN0_RXCR
);
}
/*
...
...
@@ -1823,23 +1816,23 @@ static void set_multicast_list(struct net_device *dev)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
((
struct
ei_device
*
)
dev
->
priv
)
->
page_lock
,
flags
);
spin_lock_irqsave
(
&
dev_lock
(
dev
)
,
flags
);
do_set_multicast_list
(
dev
);
spin_unlock_irqrestore
(
&
((
struct
ei_device
*
)
dev
->
priv
)
->
page_lock
,
flags
);
spin_unlock_irqrestore
(
&
dev_lock
(
dev
)
,
flags
);
}
/**
*
eth
dev_init - init rest of 8390 device struct
*
ax
dev_init - init rest of 8390 device struct
* @dev: network device structure to init
*
* Initialize the rest of the 8390 device structure. Do NOT __init
* this, as it is used by 8390 based modular drivers too.
*/
static
int
eth
dev_init
(
struct
net_device
*
dev
)
static
int
ax
dev_init
(
struct
net_device
*
dev
)
{
if
(
ei_debug
>
1
)
printk
(
version
);
printk
(
version
_8390
);
if
(
dev
->
priv
==
NULL
)
{
...
...
@@ -1861,21 +1854,19 @@ static int ethdev_init(struct net_device *dev)
return
0
;
}
/* This page of functions should be 8390 generic */
/* Follow National Semi's recommendations for initializing the "NIC". */
/**
*
NS83
90_init - initialize 8390 hardware
*
AX881
90_init - initialize 8390 hardware
* @dev: network device to initialize
* @startp: boolean. non-zero value to initiate chip processing
*
* Must be called with lock held.
*/
static
void
NS83
90_init
(
struct
net_device
*
dev
,
int
startp
)
static
void
AX881
90_init
(
struct
net_device
*
dev
,
int
startp
)
{
axnet_dev_t
*
info
=
(
axnet_dev_t
*
)
dev
;
long
e8390_base
=
dev
->
base_addr
;
...
...
@@ -1892,7 +1883,7 @@ static void NS8390_init(struct net_device *dev, int startp)
outb_p
(
0x00
,
e8390_base
+
EN0_RCNTLO
);
outb_p
(
0x00
,
e8390_base
+
EN0_RCNTHI
);
/* Set to monitor and loopback mode -- this is vital!. */
outb_p
(
E8390_RXOFF
,
e8390_base
+
EN0_RXCR
);
/* 0x2
0 */
outb_p
(
E8390_RXOFF
|
0x40
,
e8390_base
+
EN0_RXCR
);
/* 0x6
0 */
outb_p
(
E8390_TXOFF
,
e8390_base
+
EN0_TXCR
);
/* 0x02 */
/* Set the transmit page and receive ring. */
outb_p
(
ei_local
->
tx_start_page
,
e8390_base
+
EN0_TPSR
);
...
...
@@ -1936,7 +1927,7 @@ static void NS8390_init(struct net_device *dev, int startp)
outb_p
(
E8390_TXCONFIG
|
info
->
duplex_flag
,
e8390_base
+
EN0_TXCR
);
/* xmit on. */
/* 3c503 TechMan says rxconfig only after the NIC is started. */
outb_p
(
E8390_RXCONFIG
,
e8390_base
+
EN0_RXCR
);
/* rx on,
*/
outb_p
(
E8390_RXCONFIG
|
0x40
,
e8390_base
+
EN0_RXCR
);
/* rx on,
*/
do_set_multicast_list
(
dev
);
/* (re)load the mcast table */
}
}
...
...
drivers/net/pcmcia/fmvj18x_cs.c
View file @
ee4351da
/*======================================================================
fmvj18x_cs.c 2.
6 2001/09/17
fmvj18x_cs.c 2.
8 2002/03/23
A fmvj18x (and its compatibles) PCMCIA client driver
...
...
@@ -29,7 +29,7 @@
======================================================================*/
#define DRV_NAME "fmvj18x_cs"
#define DRV_VERSION "2.
6
"
#define DRV_VERSION "2.
8
"
#include <linux/module.h>
#include <linux/kernel.h>
...
...
@@ -65,6 +65,10 @@
/*====================================================================*/
/* Module parameters */
MODULE_DESCRIPTION
(
"fmvj18x and compatible PCMCIA ethernet driver"
);
MODULE_LICENSE
(
"GPL"
);
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
/* Bit map of interrupts to choose from */
...
...
@@ -80,7 +84,7 @@ INT_MODULE_PARM(sram_config, 0);
#ifdef PCMCIA_DEBUG
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
DRV_NAME
".c "
DRV_VERSION
" 200
1/09/17
"
;
static
char
*
version
=
DRV_NAME
".c "
DRV_VERSION
" 200
2/03/23
"
;
#else
#define DEBUG(n, args...)
#endif
...
...
@@ -91,6 +95,7 @@ static char *version = DRV_NAME ".c " DRV_VERSION " 2001/09/17";
*/
static
void
fmvj18x_config
(
dev_link_t
*
link
);
static
int
fmvj18x_get_hwinfo
(
dev_link_t
*
link
,
u_char
*
node_id
);
static
int
fmvj18x_setup_mfc
(
dev_link_t
*
link
);
static
void
fmvj18x_release
(
u_long
arg
);
static
int
fmvj18x_event
(
event_t
event
,
int
priority
,
event_callback_args_t
*
args
);
...
...
@@ -122,8 +127,6 @@ typedef enum { MBH10302, MBH10304, TDK, CONTEC, LA501, UNGERMANN,
XXX10304
}
cardtype_t
;
#define MANFID_UNGERMANN 0x02c0
/*
driver specific data structure
*/
...
...
@@ -388,6 +391,45 @@ static void fmvj18x_detach(dev_link_t *link)
#define CS_CHECK(fn, args...) \
while ((last_ret=CardServices(last_fn=(fn), args))!=0) goto cs_failed
static
int
mfc_try_io_port
(
dev_link_t
*
link
)
{
int
i
,
ret
;
static
ioaddr_t
serial_base
[
5
]
=
{
0x3f8
,
0x2f8
,
0x3e8
,
0x2e8
,
0x0
};
for
(
i
=
0
;
i
<
5
;
i
++
)
{
link
->
io
.
BasePort2
=
serial_base
[
i
];
link
->
io
.
Attributes2
=
IO_DATA_PATH_WIDTH_8
;
if
(
link
->
io
.
BasePort2
==
0
)
{
link
->
io
.
NumPorts2
=
0
;
printk
(
KERN_NOTICE
"fmvj18x_cs: out of resource for serial
\n
"
);
}
ret
=
CardServices
(
RequestIO
,
link
->
handle
,
&
link
->
io
);
if
(
ret
==
CS_SUCCESS
)
return
ret
;
}
return
ret
;
}
static
int
ungermann_try_io_port
(
dev_link_t
*
link
)
{
int
ret
;
ioaddr_t
ioaddr
;
/*
Ungermann-Bass Access/CARD accepts 0x300,0x320,0x340,0x360
0x380,0x3c0 only for ioport.
*/
for
(
ioaddr
=
0x300
;
ioaddr
<
0x3e0
;
ioaddr
+=
0x20
)
{
link
->
io
.
BasePort1
=
ioaddr
;
ret
=
CardServices
(
RequestIO
,
link
->
handle
,
&
link
->
io
);
if
(
ret
==
CS_SUCCESS
)
{
/* calculate ConfigIndex value */
link
->
conf
.
ConfigIndex
=
((
link
->
io
.
BasePort1
&
0x0f0
)
>>
3
)
|
0x22
;
return
ret
;
}
}
return
ret
;
/* RequestIO failed */
}
static
void
fmvj18x_config
(
dev_link_t
*
link
)
{
client_handle_t
handle
=
link
->
handle
;
...
...
@@ -444,6 +486,11 @@ static void fmvj18x_config(dev_link_t *link)
CardServices
(
GetStatus
,
handle
,
&
status
);
if
(
status
.
CardState
&
CS_EVENT_3VCARD
)
link
->
conf
.
Vcc
=
33
;
/* inserted in 3.3V slot */
}
else
if
(
le16_to_cpu
(
buf
[
1
])
==
PRODID_TDK_GN3410
)
{
/* MultiFunction Card */
link
->
conf
.
ConfigBase
=
0x800
;
link
->
conf
.
ConfigIndex
=
0x47
;
link
->
io
.
NumPorts2
=
8
;
}
break
;
case
MANFID_CONTEC
:
...
...
@@ -481,31 +528,22 @@ static void fmvj18x_config(dev_link_t *link)
break
;
case
MANFID_UNGERMANN
:
cardtype
=
UNGERMANN
;
/*
Ungermann-Bass Access/CARD accepts 0x300,0x320,0x340,0x360
0x380,0x3c0 only for ioport.
*/
for
(
link
->
io
.
BasePort1
=
0x300
;
link
->
io
.
BasePort1
<
0x3e0
;
link
->
io
.
BasePort1
+=
0x20
)
{
ret
=
CardServices
(
RequestIO
,
link
->
handle
,
&
link
->
io
);
if
(
ret
==
CS_SUCCESS
)
{
/* calculate ConfigIndex value */
link
->
conf
.
ConfigIndex
=
((
link
->
io
.
BasePort1
&
0x0f0
)
>>
3
)
|
0x22
;
goto
req_irq
;
}
}
/* if ioport allocation is failed, goto failed */
printk
(
KERN_NOTICE
"fmvj18x_cs: register_netdev() failed
\n
"
);
goto
failed
;
break
;
default:
cardtype
=
MBH10302
;
link
->
conf
.
ConfigIndex
=
1
;
}
}
if
(
link
->
io
.
NumPorts2
!=
0
)
{
ret
=
mfc_try_io_port
(
link
);
if
(
ret
!=
CS_SUCCESS
)
goto
cs_failed
;
}
else
if
(
cardtype
==
UNGERMANN
)
{
ret
=
ungermann_try_io_port
(
link
);
if
(
ret
!=
CS_SUCCESS
)
goto
cs_failed
;
}
else
{
CS_CHECK
(
RequestIO
,
link
->
handle
,
&
link
->
io
);
req_irq:
}
CS_CHECK
(
RequestIRQ
,
link
->
handle
,
&
link
->
irq
);
CS_CHECK
(
RequestConfiguration
,
link
->
handle
,
&
link
->
conf
);
dev
->
irq
=
link
->
irq
.
AssignedIRQ
;
...
...
@@ -515,19 +553,22 @@ static void fmvj18x_config(dev_link_t *link)
goto
failed
;
}
if
(
link
->
io
.
BasePort2
!=
0
)
fmvj18x_setup_mfc
(
link
);
ioaddr
=
dev
->
base_addr
;
/* Reset controller */
if
(
sram_config
==
0
)
if
(
sram_config
==
0
)
outb
(
CONFIG0_RST
,
ioaddr
+
CONFIG_0
);
else
outb
(
CONFIG0_RST_1
,
ioaddr
+
CONFIG_0
);
/* Power On chip and select bank 0 */
if
(
cardtype
==
UNGERMANN
)
outb
(
BANK_0U
,
ioaddr
+
CONFIG_1
);
else
if
(
cardtype
==
MBH10302
)
outb
(
BANK_0
,
ioaddr
+
CONFIG_1
);
else
outb
(
BANK_0U
,
ioaddr
+
CONFIG_1
);
/* Set hardware address */
switch
(
cardtype
)
{
...
...
@@ -591,7 +632,6 @@ static void fmvj18x_config(dev_link_t *link)
strcpy
(
lp
->
node
.
dev_name
,
dev
->
name
);
link
->
dev
=
&
lp
->
node
;
link
->
state
&=
~
DEV_CONFIG_PENDING
;
lp
->
cardtype
=
cardtype
;
/* print current configuration */
...
...
@@ -601,6 +641,7 @@ static void fmvj18x_config(dev_link_t *link)
for
(
i
=
0
;
i
<
6
;
i
++
)
printk
(
"%02X%s"
,
dev
->
dev_addr
[
i
],
((
i
<
5
)
?
":"
:
"
\n
"
));
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
cs_failed:
...
...
@@ -608,6 +649,7 @@ static void fmvj18x_config(dev_link_t *link)
cs_error
(
link
->
handle
,
last_fn
,
last_ret
);
failed:
fmvj18x_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
}
/* fmvj18x_config */
/*====================================================================*/
...
...
@@ -666,6 +708,51 @@ static int fmvj18x_get_hwinfo(dev_link_t *link, u_char *node_id)
}
/* fmvj18x_get_hwinfo */
/*====================================================================*/
static
int
fmvj18x_setup_mfc
(
dev_link_t
*
link
)
{
win_req_t
req
;
memreq_t
mem
;
u_char
*
base
;
int
i
,
j
;
local_info_t
*
lp
=
link
->
priv
;
struct
net_device
*
dev
=
&
lp
->
dev
;
ioaddr_t
ioaddr
;
/* Allocate a small memory window */
req
.
Attributes
=
WIN_DATA_WIDTH_8
|
WIN_MEMORY_TYPE_AM
|
WIN_ENABLE
;
req
.
Base
=
0
;
req
.
Size
=
0
;
req
.
AccessSpeed
=
0
;
link
->
win
=
(
window_handle_t
)
link
->
handle
;
i
=
CardServices
(
RequestWindow
,
&
link
->
win
,
&
req
);
if
(
i
!=
CS_SUCCESS
)
{
cs_error
(
link
->
handle
,
RequestWindow
,
i
);
return
-
1
;
}
base
=
ioremap
(
req
.
Base
,
req
.
Size
);
mem
.
Page
=
0
;
mem
.
CardOffset
=
0
;
CardServices
(
MapMemPage
,
link
->
win
,
&
mem
);
ioaddr
=
dev
->
base_addr
;
writeb
(
0x47
,
base
+
0x800
);
/* Config Option Register of LAN */
writeb
(
0x0
,
base
+
0x802
);
/* Config and Status Register */
writeb
(
ioaddr
&
0xff
,
base
+
0x80a
);
/* I/O Base(Low) of LAN */
writeb
((
ioaddr
>>
8
)
&
0xff
,
base
+
0x80c
);
/* I/O Base(High) of LAN */
writeb
(
0x45
,
base
+
0x820
);
/* Config Option Register of Modem */
writeb
(
0x8
,
base
+
0x822
);
/* Config and Status Register */
iounmap
(
base
);
j
=
CardServices
(
ReleaseWindow
,
link
->
win
);
if
(
j
!=
CS_SUCCESS
)
cs_error
(
link
->
handle
,
ReleaseWindow
,
j
);
return
0
;
}
/*====================================================================*/
static
void
fmvj18x_release
(
u_long
arg
)
{
dev_link_t
*
link
=
(
dev_link_t
*
)
arg
;
...
...
@@ -752,7 +839,7 @@ static int __init init_fmvj18x_cs(void)
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"fmvj18x: Card Services release "
"does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
fmvj18x_attach
,
&
fmvj18x_detach
);
return
0
;
...
...
@@ -942,10 +1029,10 @@ static void fjn_reset(struct net_device *dev)
outb
(
CONFIG0_RST_1
,
ioaddr
+
CONFIG_0
);
/* Power On chip and select bank 0 */
if
(
lp
->
cardtype
==
UNGERMANN
)
outb
(
BANK_0U
,
ioaddr
+
CONFIG_1
);
else
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
BANK_0
,
ioaddr
+
CONFIG_1
);
else
outb
(
BANK_0U
,
ioaddr
+
CONFIG_1
);
/* Set Tx modes */
outb
(
D_TX_MODE
,
ioaddr
+
TX_MODE
);
...
...
@@ -957,20 +1044,20 @@ static void fjn_reset(struct net_device *dev)
outb
(
dev
->
dev_addr
[
i
],
ioaddr
+
NODE_ID
+
i
);
/* Switch to bank 1 */
if
(
lp
->
cardtype
==
UNGERMANN
)
outb
(
BANK_1U
,
ioaddr
+
CONFIG_1
);
else
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
BANK_1
,
ioaddr
+
CONFIG_1
);
else
outb
(
BANK_1U
,
ioaddr
+
CONFIG_1
);
/* set the multicast table to accept none. */
for
(
i
=
0
;
i
<
6
;
i
++
)
outb
(
0x00
,
ioaddr
+
MAR_ADR
+
i
);
/* Switch to bank 2 (runtime mode) */
if
(
lp
->
cardtype
==
UNGERMANN
)
outb
(
BANK_2U
,
ioaddr
+
CONFIG_1
);
else
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
BANK_2
,
ioaddr
+
CONFIG_1
);
else
outb
(
BANK_2U
,
ioaddr
+
CONFIG_1
);
/* set 16col ctrl bits */
if
(
lp
->
cardtype
==
TDK
||
lp
->
cardtype
==
CONTEC
)
...
...
@@ -999,7 +1086,7 @@ static void fjn_reset(struct net_device *dev)
outb
(
0xff
,
ioaddr
+
TX_STATUS
);
outb
(
0xff
,
ioaddr
+
RX_STATUS
);
if
(
lp
->
cardtype
!=
TDK
)
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
INTR_OFF
,
ioaddr
+
LAN_CTRL
);
/* Turn on Rx interrupts */
...
...
@@ -1007,7 +1094,7 @@ static void fjn_reset(struct net_device *dev)
outb
(
D_RX_INTR
,
ioaddr
+
RX_INTR
);
/* Turn on interrupts from LAN card controller */
if
(
lp
->
cardtype
!=
TDK
)
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
INTR_ON
,
ioaddr
+
LAN_CTRL
);
}
/* fjn_reset */
...
...
@@ -1090,7 +1177,7 @@ static void fjn_rx(struct net_device *dev)
has done a netif_wake_queue() for us and will work on them
when we get to the bottom-half routine. */
/*
if
( lp->cardtype != TDK
) {
if
(lp->cardtype != TDK
) {
int i;
for (i = 0; i < 20; i++) {
if ((inb(ioaddr + RX_MODE) & F_BUF_EMP) == F_BUF_EMP)
...
...
@@ -1223,7 +1310,7 @@ static int fjn_close(struct net_device *dev)
outb
(
CHIP_OFF
,
ioaddr
+
CONFIG_1
);
/* Set the ethernet adaptor disable IRQ */
if
(
lp
->
cardtype
!=
TDK
)
if
(
lp
->
cardtype
==
MBH10302
)
outb
(
INTR_OFF
,
ioaddr
+
LAN_CTRL
);
link
->
open
--
;
...
...
@@ -1252,8 +1339,8 @@ static void set_rx_mode(struct net_device *dev)
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
u
nsigned
char
mc_filter
[
8
];
/* Multicast hash filter */
u
nsigned
long
flags
;
u
_
char
mc_filter
[
8
];
/* Multicast hash filter */
u
_
long
flags
;
int
i
;
if
(
dev
->
flags
&
IFF_PROMISC
)
{
...
...
@@ -1293,4 +1380,3 @@ static void set_rx_mode(struct net_device *dev)
}
restore_flags
(
flags
);
}
MODULE_LICENSE
(
"GPL"
);
drivers/net/pcmcia/nmclan_cs.c
View file @
ee4351da
...
...
@@ -106,6 +106,10 @@ Log: nmclan_cs.c,v
---------------------------------------------------------------------------- */
#define DRV_NAME "nmclan_cs"
#define DRV_VERSION "0.16"
/* ----------------------------------------------------------------------------
Conditional Compilation Options
---------------------------------------------------------------------------- */
...
...
@@ -130,6 +134,9 @@ Include Files
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/bitops.h>
...
...
@@ -375,7 +382,7 @@ Private Global Variables
static
char
rcsid
[]
=
"nmclan_cs.c,v 0.16 1995/07/01 06:42:17 rpao Exp rpao"
;
static
char
*
version
=
"nmclan_cs 0.16
(Roger C. Pao)"
;
DRV_NAME
" "
DRV_VERSION
"
(Roger C. Pao)"
;
#endif
static
dev_info_t
dev_info
=
"nmclan_cs"
;
...
...
@@ -430,8 +437,8 @@ static void mace_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static
struct
net_device_stats
*
mace_get_stats
(
struct
net_device
*
dev
);
static
int
mace_rx
(
struct
net_device
*
dev
,
unsigned
char
RxCnt
);
static
void
restore_multicast_list
(
struct
net_device
*
dev
);
static
void
set_multicast_list
(
struct
net_device
*
dev
);
static
int
mace_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
dev_link_t
*
nmclan_attach
(
void
);
static
void
nmclan_detach
(
dev_link_t
*
);
...
...
@@ -513,6 +520,7 @@ static dev_link_t *nmclan_attach(void)
dev
->
set_config
=
&
mace_config
;
dev
->
get_stats
=
&
mace_get_stats
;
dev
->
set_multicast_list
=
&
set_multicast_list
;
dev
->
do_ioctl
=
&
mace_ioctl
;
ether_setup
(
dev
);
dev
->
open
=
&
mace_open
;
dev
->
stop
=
&
mace_close
;
...
...
@@ -1002,6 +1010,66 @@ static int mace_close(struct net_device *dev)
return
0
;
}
/* mace_close */
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
{
u32
ethcmd
;
/* dev_ioctl() in ../../net/core/dev.c has already checked
capable(CAP_NET_ADMIN), so don't bother with that here. */
if
(
get_user
(
ethcmd
,
(
u32
*
)
useraddr
))
return
-
EFAULT
;
switch
(
ethcmd
)
{
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strcpy
(
info
.
driver
,
DRV_NAME
);
strcpy
(
info
.
version
,
DRV_VERSION
);
sprintf
(
info
.
bus_info
,
"PCMCIA 0x%lx"
,
dev
->
base_addr
);
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
0
;
}
#ifdef PCMCIA_DEBUG
/* get message-level */
case
ETHTOOL_GMSGLVL
:
{
struct
ethtool_value
edata
=
{
ETHTOOL_GMSGLVL
};
edata
.
data
=
pc_debug
;
if
(
copy_to_user
(
useraddr
,
&
edata
,
sizeof
(
edata
)))
return
-
EFAULT
;
return
0
;
}
/* set message-level */
case
ETHTOOL_SMSGLVL
:
{
struct
ethtool_value
edata
;
if
(
copy_from_user
(
&
edata
,
useraddr
,
sizeof
(
edata
)))
return
-
EFAULT
;
pc_debug
=
edata
.
data
;
return
0
;
}
#endif
default:
break
;
}
return
-
EOPNOTSUPP
;
}
static
int
mace_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
switch
(
cmd
)
{
case
SIOCETHTOOL
:
return
netdev_ethtool_ioctl
(
dev
,
(
void
*
)
rq
->
ifr_data
);
default:
return
-
EOPNOTSUPP
;
}
return
0
;
}
/* ----------------------------------------------------------------------------
mace_start_xmit
This routine begins the packet transmit function. When completed,
...
...
drivers/net/pcmcia/pcnet_cs.c
View file @
ee4351da
...
...
@@ -11,7 +11,7 @@
Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net
pcnet_cs.c 1.14
4 2001/11/07 04:06:56
pcnet_cs.c 1.14
9 2002/06/29 06:27:37
The network driver code is based on Donald Becker's NE2000 code:
...
...
@@ -75,7 +75,7 @@ static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM
(
pc_debug
,
"i"
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"pcnet_cs.c 1.14
4 2001/11/07 04:06:56
(David Hinds)"
;
"pcnet_cs.c 1.14
9 2002/06/29 06:27:37
(David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
...
...
@@ -765,12 +765,13 @@ static void pcnet_config(dev_link_t *link)
strcpy
(
info
->
node
.
dev_name
,
dev
->
name
);
link
->
dev
=
&
info
->
node
;
link
->
state
&=
~
DEV_CONFIG_PENDING
;
if
(
info
->
flags
&
(
IS_DL10019
|
IS_DL10022
))
{
u_char
id
=
inb
(
dev
->
base_addr
+
0x1a
);
dev
->
do_ioctl
=
&
ei_ioctl
;
mii_phy_probe
(
dev
);
if
((
id
==
0x30
)
&&
!
info
->
pna_phy
&&
(
info
->
eth_phy
==
4
))
info
->
eth_phy
=
0
;
printk
(
KERN_INFO
"%s: NE2000 (DL100%d rev %02x): "
,
dev
->
name
,
((
info
->
flags
&
IS_DL10022
)
?
22
:
19
),
id
);
if
(
info
->
pna_phy
)
...
...
@@ -787,12 +788,14 @@ static void pcnet_config(dev_link_t *link)
printk
(
" hw_addr "
);
for
(
i
=
0
;
i
<
6
;
i
++
)
printk
(
"%02X%s"
,
dev
->
dev_addr
[
i
],
((
i
<
5
)
?
":"
:
"
\n
"
));
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
cs_failed:
cs_error
(
link
->
handle
,
last_fn
,
last_ret
);
failed:
pcnet_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
}
/* pcnet_config */
...
...
@@ -856,7 +859,7 @@ static int pcnet_event(event_t event, int priority,
}
break
;
case
CS_EVENT_CARD_INSERTION
:
link
->
state
|=
DEV_PRESENT
;
link
->
state
|=
DEV_PRESENT
|
DEV_CONFIG_PENDING
;
pcnet_config
(
link
);
break
;
case
CS_EVENT_PM_SUSPEND
:
...
...
@@ -1052,6 +1055,7 @@ static int pcnet_close(struct net_device *dev)
DEBUG
(
2
,
"pcnet_close('%s')
\n
"
,
dev
->
name
);
ei_close
(
dev
);
free_irq
(
dev
->
irq
,
dev
);
link
->
open
--
;
...
...
@@ -1621,7 +1625,7 @@ static int __init init_pcnet_cs(void)
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"pcnet_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
pcnet_attach
,
&
pcnet_detach
);
return
0
;
...
...
drivers/net/pcmcia/ray_cs.c
View file @
ee4351da
...
...
@@ -2,7 +2,7 @@
*
* A PCMCIA client driver for the Raylink wireless LAN card.
* The starting point for this module was the skeleton.c in the
* PCMCIA 2.9.12 package written by David Hinds, d
hinds@allegro.stanford.edu
* PCMCIA 2.9.12 package written by David Hinds, d
ahinds@users.sourceforge.net
*
*
* Copyright (c) 1998 Corey Thomas (corey@world.std.com)
...
...
drivers/net/pcmcia/smc91c92_cs.c
View file @
ee4351da
...
...
@@ -8,7 +8,7 @@
Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net
smc91c92_cs.c 1.
2 2002/09/28 15:00:00
smc91c92_cs.c 1.
122 2002/10/25 06:26:39
This driver contains code written by Donald Becker
(becker@scyld.com), Rowan Hughes (x-csrdh@jcu.edu.au),
...
...
@@ -92,7 +92,7 @@ static const char *version =
#endif
#define DRV_NAME "smc91c92_cs"
#define DRV_VERSION "1.2"
#define DRV_VERSION "1.
12
2"
/*====================================================================*/
...
...
@@ -130,6 +130,8 @@ struct smc_private {
u_short
fast_poll
;
u_short
link_status
;
struct
mii_if_info
mii_if
;
int
duplex
;
int
rx_ovrn
;
};
/* Special definitions for Megahertz multifunction cards */
...
...
@@ -287,22 +289,22 @@ static void smc91c92_release(u_long arg);
static
int
smc91c92_event
(
event_t
event
,
int
priority
,
event_callback_args_t
*
args
);
static
int
smc91c92_open
(
struct
net_device
*
dev
);
static
int
smc91c92_close
(
struct
net_device
*
dev
);
static
int
smc_open
(
struct
net_device
*
dev
);
static
int
smc_close
(
struct
net_device
*
dev
);
static
int
smc_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
void
smc_tx_timeout
(
struct
net_device
*
dev
);
static
int
smc_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
);
static
void
smc_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
void
smc_rx
(
struct
net_device
*
dev
);
static
struct
net_device_stats
*
smc
91c92
_get_stats
(
struct
net_device
*
dev
);
static
struct
net_device_stats
*
smc_get_stats
(
struct
net_device
*
dev
);
static
void
set_rx_mode
(
struct
net_device
*
dev
);
static
int
s9k_config
(
struct
net_device
*
dev
,
struct
ifmap
*
map
);
static
void
smc_set_xcvr
(
struct
net_device
*
dev
,
int
if_port
);
static
void
smc_reset
(
struct
net_device
*
dev
);
static
void
media_check
(
u_long
arg
);
static
void
smc_mdio_sync
(
ioaddr_t
addr
);
static
int
smc_mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
);
static
void
smc_mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
,
int
value
);
static
int
smc_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
void
mdio_sync
(
ioaddr_t
addr
);
static
int
mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
);
static
void
mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
,
int
value
);
static
int
smc_link_ok
(
struct
net_device
*
dev
);
/*======================================================================
...
...
@@ -375,13 +377,13 @@ static dev_link_t *smc91c92_attach(void)
/* The SMC91c92-specific entries in the device structure. */
dev
->
hard_start_xmit
=
&
smc_start_xmit
;
dev
->
get_stats
=
&
smc
91c92
_get_stats
;
dev
->
get_stats
=
&
smc_get_stats
;
dev
->
set_config
=
&
s9k_config
;
dev
->
set_multicast_list
=
&
set_rx_mode
;
dev
->
do_ioctl
=
&
smc_ioctl
;
ether_setup
(
dev
);
dev
->
open
=
&
smc91c92_open
;
dev
->
stop
=
&
smc91c92_close
;
dev
->
open
=
&
smc_open
;
dev
->
stop
=
&
smc_close
;
dev
->
do_ioctl
=
&
smc_ioctl
;
#ifdef HAVE_TX_TIMEOUT
dev
->
tx_timeout
=
smc_tx_timeout
;
dev
->
watchdog_timeo
=
TX_TIMEOUT
;
...
...
@@ -389,8 +391,8 @@ static dev_link_t *smc91c92_attach(void)
dev
->
priv
=
link
->
priv
=
link
->
irq
.
Instance
=
smc
;
smc
->
mii_if
.
dev
=
dev
;
smc
->
mii_if
.
mdio_read
=
smc_
mdio_read
;
smc
->
mii_if
.
mdio_write
=
smc_
mdio_write
;
smc
->
mii_if
.
mdio_read
=
mdio_read
;
smc
->
mii_if
.
mdio_write
=
mdio_write
;
smc
->
mii_if
.
phy_id_mask
=
0x1f
;
smc
->
mii_if
.
reg_num_mask
=
0x1f
;
...
...
@@ -1007,13 +1009,13 @@ static void smc91c92_config(dev_link_t *link)
if
(
i
!=
0
)
{
printk
(
KERN_NOTICE
"smc91c92_cs: Unable to find hardware address.
\n
"
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
goto
config_undo
;
}
strcpy
(
smc
->
node
.
dev_name
,
dev
->
name
);
link
->
dev
=
&
smc
->
node
;
link
->
state
&=
~
DEV_CONFIG_PENDING
;
smc
->
duplex
=
0
;
smc
->
rx_ovrn
=
0
;
rev
=
check_sig
(
link
);
name
=
"???"
;
...
...
@@ -1060,7 +1062,7 @@ static void smc91c92_config(dev_link_t *link)
SMC_SELECT_BANK
(
3
);
for
(
i
=
0
;
i
<
32
;
i
++
)
{
j
=
smc_
mdio_read
(
dev
,
i
,
1
);
j
=
mdio_read
(
dev
,
i
,
1
);
if
((
j
!=
0
)
&&
(
j
!=
0xffff
))
break
;
}
smc
->
mii_if
.
phy_id
=
(
i
<
32
)
?
i
:
-
1
;
...
...
@@ -1073,12 +1075,14 @@ static void smc91c92_config(dev_link_t *link)
SMC_SELECT_BANK
(
0
);
}
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
config_undo:
unregister_netdev
(
dev
);
config_failed:
/* CS_EXIT_TEST() calls jump to here... */
smc91c92_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
}
/* smc91c92_config */
...
...
@@ -1144,7 +1148,7 @@ static int smc91c92_event(event_t event, int priority,
}
break
;
case
CS_EVENT_CARD_INSERTION
:
link
->
state
|=
DEV_PRESENT
;
link
->
state
|=
DEV_PRESENT
|
DEV_CONFIG_PENDING
;
smc91c92_config
(
link
);
break
;
case
CS_EVENT_PM_SUSPEND
:
...
...
@@ -1206,7 +1210,7 @@ static int smc91c92_event(event_t event, int priority,
#define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT)
#define MDIO_DATA_READ 0x02
static
void
smc_
mdio_sync
(
ioaddr_t
addr
)
static
void
mdio_sync
(
ioaddr_t
addr
)
{
int
bits
;
for
(
bits
=
0
;
bits
<
32
;
bits
++
)
{
...
...
@@ -1215,13 +1219,13 @@ static void smc_mdio_sync(ioaddr_t addr)
}
}
static
int
smc_
mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
)
static
int
mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
)
{
ioaddr_t
addr
=
dev
->
base_addr
+
MGMT
;
u_int
cmd
=
(
0x06
<<
10
)
|
(
phy_id
<<
5
)
|
loc
;
int
i
,
retval
=
0
;
smc_
mdio_sync
(
addr
);
mdio_sync
(
addr
);
for
(
i
=
13
;
i
>=
0
;
i
--
)
{
int
dat
=
(
cmd
&
(
1
<<
i
))
?
MDIO_DATA_WRITE1
:
MDIO_DATA_WRITE0
;
outb
(
dat
,
addr
);
...
...
@@ -1235,13 +1239,13 @@ static int smc_mdio_read(struct net_device *dev, int phy_id, int loc)
return
(
retval
>>
1
)
&
0xffff
;
}
static
void
smc_
mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
,
int
value
)
static
void
mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
loc
,
int
value
)
{
ioaddr_t
addr
=
dev
->
base_addr
+
MGMT
;
u_int
cmd
=
(
0x05
<<
28
)
|
(
phy_id
<<
23
)
|
(
loc
<<
18
)
|
(
1
<<
17
)
|
value
;
int
i
;
smc_
mdio_sync
(
addr
);
mdio_sync
(
addr
);
for
(
i
=
31
;
i
>=
0
;
i
--
)
{
int
dat
=
(
cmd
&
(
1
<<
i
))
?
MDIO_DATA_WRITE1
:
MDIO_DATA_WRITE0
;
outb
(
dat
,
addr
);
...
...
@@ -1277,13 +1281,13 @@ static void smc_dump(struct net_device *dev)
}
#endif
static
int
smc
91c92
_open
(
struct
net_device
*
dev
)
static
int
smc_open
(
struct
net_device
*
dev
)
{
struct
smc_private
*
smc
=
dev
->
priv
;
dev_link_t
*
link
=
&
smc
->
link
;
#ifdef PCMCIA_DEBUG
DEBUG
(
0
,
"%s: smc
91c92
_open(%p), ID/Window %4.4x.
\n
"
,
DEBUG
(
0
,
"%s: smc_open(%p), ID/Window %4.4x.
\n
"
,
dev
->
name
,
dev
,
inw
(
dev
->
base_addr
+
BANK_SELECT
));
if
(
pc_debug
>
1
)
smc_dump
(
dev
);
#endif
...
...
@@ -1311,17 +1315,17 @@ static int smc91c92_open(struct net_device *dev)
add_timer
(
&
smc
->
media
);
return
0
;
}
/* smc
91c92
_open */
}
/* smc_open */
/*====================================================================*/
static
int
smc
91c92
_close
(
struct
net_device
*
dev
)
static
int
smc_close
(
struct
net_device
*
dev
)
{
struct
smc_private
*
smc
=
dev
->
priv
;
dev_link_t
*
link
=
&
smc
->
link
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
DEBUG
(
0
,
"%s: smc
91c92
_close(), status %4.4x.
\n
"
,
DEBUG
(
0
,
"%s: smc_close(), status %4.4x.
\n
"
,
dev
->
name
,
inw
(
ioaddr
+
BANK_SELECT
));
netif_stop_queue
(
dev
);
...
...
@@ -1346,7 +1350,7 @@ static int smc91c92_close(struct net_device *dev)
MOD_DEC_USE_COUNT
;
return
0
;
}
/* smc
91c92
_close */
}
/* smc_close */
/*======================================================================
...
...
@@ -1445,7 +1449,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue
(
dev
);
DEBUG
(
2
,
"%s: smc
91c92
_start_xmit(length = %d) called,"
DEBUG
(
2
,
"%s: smc_start_xmit(length = %d) called,"
" status %4.4x.
\n
"
,
dev
->
name
,
skb
->
len
,
inw
(
ioaddr
+
2
));
if
(
smc
->
saved_skb
)
{
...
...
@@ -1471,6 +1475,12 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
SMC_SELECT_BANK
(
2
);
/* Paranoia, we should always be in window 2 */
/* need MC_RESET to keep the memory consistent. errata? */
if
(
smc
->
rx_ovrn
)
{
outw
(
MC_RESET
,
ioaddr
+
MMU_CMD
);
smc
->
rx_ovrn
=
0
;
}
/* Allocate the memory; send the packet now if we win. */
outw
(
MC_ALLOC
|
num_pages
,
ioaddr
+
MMU_CMD
);
for
(
time_out
=
MEMORY_WAIT_TIME
;
time_out
>=
0
;
time_out
--
)
{
...
...
@@ -1526,7 +1536,7 @@ static void smc_tx_err(struct net_device * dev)
}
/* re-enable transmit */
SMC_SELECT_BANK
(
0
);
outw
(
inw
(
ioaddr
+
TCR
)
|
TCR_ENABLE
,
ioaddr
+
TCR
);
outw
(
inw
(
ioaddr
+
TCR
)
|
TCR_ENABLE
|
smc
->
duplex
,
ioaddr
+
TCR
);
SMC_SELECT_BANK
(
2
);
outw
(
MC_FREEPKT
,
ioaddr
+
MMU_CMD
);
/* Free the packet memory. */
...
...
@@ -1562,7 +1572,7 @@ static void smc_eph_irq(struct net_device *dev)
card_stats >>= 4; /* excess deferred */
#endif
/* If we had a transmit error we must re-enable the transmitter. */
outw
(
inw
(
ioaddr
+
TCR
)
|
TCR_ENABLE
,
ioaddr
+
TCR
);
outw
(
inw
(
ioaddr
+
TCR
)
|
TCR_ENABLE
|
smc
->
duplex
,
ioaddr
+
TCR
);
/* Clear a link error interrupt. */
SMC_SELECT_BANK
(
1
);
...
...
@@ -1642,6 +1652,8 @@ static void smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if
(
status
&
IM_RX_OVRN_INT
)
{
smc
->
stats
.
rx_errors
++
;
smc
->
stats
.
rx_fifo_errors
++
;
if
(
smc
->
duplex
)
smc
->
rx_ovrn
=
1
;
/* need MC_RESET outside smc_interrupt */
outw
(
IM_RX_OVRN_INT
,
ioaddr
+
INTERRUPT
);
}
if
(
status
&
IM_EPH_INT
)
...
...
@@ -1753,14 +1765,13 @@ static void smc_rx(struct net_device *dev)
/*====================================================================*/
static
struct
net_device_stats
*
smc
91c92
_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
smc_get_stats
(
struct
net_device
*
dev
)
{
struct
smc_private
*
smc
=
(
struct
smc_private
*
)
dev
->
priv
;
/* Nothing to update - the 91c92 is a pretty primative chip. */
return
&
smc
->
stats
;
}
/*======================================================================
Calculate values for the hardware multicast filter hash table.
...
...
@@ -1929,18 +1940,21 @@ static void smc_reset(struct net_device *dev)
/* Re-enable the chip. */
SMC_SELECT_BANK
(
0
);
outw
(((
smc
->
cfg
&
CFG_MII_SELECT
)
?
0
:
TCR_MONCSN
)
|
TCR_ENABLE
|
TCR_PAD_EN
,
ioaddr
+
TCR
);
TCR_ENABLE
|
TCR_PAD_EN
|
smc
->
duplex
,
ioaddr
+
TCR
);
set_rx_mode
(
dev
);
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
{
SMC_SELECT_BANK
(
3
);
/* Reset MII */
smc_mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x8000
);
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x8000
);
/* Advertise 100F, 100H, 10F, 10H */
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
4
,
0x01e1
);
/* Restart MII autonegotiation */
smc_
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x0000
);
smc_
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x1200
);
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x0000
);
mdio_write
(
dev
,
smc
->
mii_if
.
phy_id
,
0
,
0x1200
);
}
/* Enable interrupts. */
...
...
@@ -1969,6 +1983,12 @@ static void media_check(u_long arg)
goto
reschedule
;
SMC_SELECT_BANK
(
2
);
/* need MC_RESET to keep the memory consistent. errata? */
if
(
smc
->
rx_ovrn
)
{
outw
(
MC_RESET
,
ioaddr
+
MMU_CMD
);
smc
->
rx_ovrn
=
0
;
}
i
=
inw
(
ioaddr
+
INTERRUPT
);
SMC_SELECT_BANK
(
0
);
media
=
inw
(
ioaddr
+
EPH
)
&
EPH_LINK_OK
;
...
...
@@ -1996,7 +2016,7 @@ static void media_check(u_long arg)
goto
reschedule
;
SMC_SELECT_BANK
(
3
);
link
=
smc_
mdio_read
(
dev
,
smc
->
mii_if
.
phy_id
,
1
);
link
=
mdio_read
(
dev
,
smc
->
mii_if
.
phy_id
,
1
);
if
(
!
link
||
(
link
==
0xffff
))
{
printk
(
KERN_INFO
"%s: MII is missing!
\n
"
,
dev
->
name
);
smc
->
mii_if
.
phy_id
=
-
1
;
...
...
@@ -2005,21 +2025,23 @@ static void media_check(u_long arg)
link
&=
0x0004
;
if
(
link
!=
smc
->
link_status
)
{
u_short
p
=
smc_
mdio_read
(
dev
,
smc
->
mii_if
.
phy_id
,
5
);
u_short
p
=
mdio_read
(
dev
,
smc
->
mii_if
.
phy_id
,
5
);
printk
(
KERN_INFO
"%s: %s link beat
\n
"
,
dev
->
name
,
(
link
)
?
"found"
:
"lost"
);
smc
->
duplex
=
(((
p
&
0x0100
)
||
((
p
&
0x1c0
)
==
0x40
))
?
TCR_FDUPLX
:
0
);
if
(
link
)
{
printk
(
KERN_INFO
"%s: autonegotiation complete: "
"%sbaseT-%cD selected
\n
"
,
dev
->
name
,
((
p
&
0x0180
)
?
"100"
:
"10"
),
(((
p
&
0x0100
)
||
((
p
&
0x1c0
)
==
0x40
))
?
'F'
:
'H'
));
(
smc
->
duplex
?
'F'
:
'H'
));
}
SMC_SELECT_BANK
(
0
);
outw
(
inw
(
ioaddr
+
TCR
)
|
smc
->
duplex
,
ioaddr
+
TCR
);
smc
->
link_status
=
link
;
}
}
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
goto
reschedule
;
}
/* Ignore collisions unless we've had no rx's recently */
if
(
jiffies
-
dev
->
last_rx
>
HZ
)
{
...
...
@@ -2256,7 +2278,7 @@ static int __init init_smc91c92_cs(void)
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_ERR
"smc91c92_cs: Card Services release does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
smc91c92_attach
,
&
smc91c92_detach
);
return
0
;
...
...
@@ -2272,4 +2294,3 @@ static void __exit exit_smc91c92_cs(void)
module_init
(
init_smc91c92_cs
);
module_exit
(
exit_smc91c92_cs
);
drivers/net/wireless/airo_cs.c
View file @
ee4351da
...
...
@@ -15,7 +15,7 @@
In addition this module was derived from dummy_cs.
The initial developer of dummy_cs is David A. Hinds
<d
hinds@hyper.stanford.edu
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
======================================================================*/
...
...
drivers/net/wireless/wavelan.p.h
View file @
ee4351da
...
...
@@ -143,7 +143,7 @@
* Yunzhou Li <yunzhou@strat.iol.unh.edu> finished this work.
* Joe Finney <joe@comp.lancs.ac.uk> patched the driver to start
* 2.00 cards correctly (2.4 GHz with frequency selection).
* David Hinds <d
hinds@hyper.stanford.edu
> integrated the whole in his
* David Hinds <d
ahinds@users.sourceforge.net
> integrated the whole in his
* PCMCIA package (and bug corrections).
*
* I (Jean Tourrilhes - jt@hplb.hpl.hp.com) then started to make some
...
...
drivers/parport/parport_cs.c
View file @
ee4351da
...
...
@@ -5,7 +5,7 @@
(specifically, for the Quatech SPP-100 EPP card: other cards will
probably require driver tweaks)
parport_cs.c 1.2
0 2000/11/02 23:15:05
parport_cs.c 1.2
9 2002/10/11 06:57:41
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
...
...
@@ -34,9 +34,7 @@
======================================================================*/
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
...
...
@@ -45,7 +43,6 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/major.h>
#include <linux/parport.h>
#include <linux/parport_pc.h>
...
...
@@ -58,32 +55,31 @@
#include <pcmcia/cisreg.h>
#include <pcmcia/ciscode.h>
#ifdef PCMCIA_DEBUG
static
int
pc_debug
=
PCMCIA_DEBUG
;
MODULE_PARM
(
pc_debug
,
"i"
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"parport_cs.c 1.20 2000/11/02 23:15:05 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
/*====================================================================*/
#ifndef VERSION
#define VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
/* Module parameters */
/*====================================================================*/
MODULE_AUTHOR
(
"David Hinds <dahinds@users.sourceforge.net>"
);
MODULE_DESCRIPTION
(
"PCMCIA parallel port card driver"
);
MODULE_LICENSE
(
"Dual MPL/GPL"
);
/* Parameters that can be set with 'insmod' */
#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
/* Bit map of interrupts to choose from */
static
u_int
irq_mask
=
0xdeb8
;
INT_MODULE_PARM
(
irq_mask
,
0xdeb8
)
;
static
int
irq_list
[
4
]
=
{
-
1
};
static
int
epp_mode
=
1
;
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
MODULE_PARM
(
epp_mode
,
"i"
);
INT_MODULE_PARM
(
epp_mode
,
1
);
#ifdef PCMCIA_DEBUG
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
char
*
version
=
"parport_cs.c 1.29 2002/10/11 06:57:41 (David Hinds)"
;
#else
#define DEBUG(n, args...)
#endif
/*====================================================================*/
...
...
@@ -106,8 +102,6 @@ static int parport_event(event_t event, int priority,
static
dev_info_t
dev_info
=
"parport_cs"
;
static
dev_link_t
*
dev_list
=
NULL
;
extern
struct
parport_operations
parport_pc_ops
;
/*====================================================================*/
static
void
cs_error
(
client_handle_t
handle
,
int
func
,
int
ret
)
...
...
@@ -228,12 +222,6 @@ while ((last_ret=CardServices(last_fn=(fn), args))!=0) goto cs_failed
#define CFG_CHECK(fn, args...) \
if (CardServices(fn, args) != 0) goto next_entry
static
struct
{
u_int
flag
;
char
*
name
;
}
mode
[]
=
{
{
PARPORT_MODE_TRISTATE
,
"PS2"
},
{
PARPORT_MODE_EPP
,
"EPP"
},
{
PARPORT_MODE_ECP
,
"ECP"
},
};
void
parport_config
(
dev_link_t
*
link
)
{
client_handle_t
handle
=
link
->
handle
;
...
...
@@ -245,7 +233,7 @@ void parport_config(dev_link_t *link)
cistpl_cftable_entry_t
*
cfg
=
&
parse
.
cftable_entry
;
cistpl_cftable_entry_t
dflt
=
{
0
};
struct
parport
*
p
;
int
i
,
last_ret
,
last_fn
;
int
last_ret
,
last_fn
;
DEBUG
(
0
,
"parport_config(0x%p)
\n
"
,
link
);
...
...
@@ -297,6 +285,9 @@ void parport_config(dev_link_t *link)
CS_CHECK
(
RequestIRQ
,
handle
,
&
link
->
irq
);
CS_CHECK
(
RequestConfiguration
,
handle
,
&
link
->
conf
);
release_region
(
link
->
io
.
BasePort1
,
link
->
io
.
NumPorts1
);
if
(
link
->
io
.
NumPorts2
)
release_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
);
p
=
parport_pc_probe_port
(
link
->
io
.
BasePort1
,
link
->
io
.
BasePort2
,
link
->
irq
.
AssignedIRQ
,
PARPORT_DMA_NONE
,
NULL
);
...
...
@@ -307,19 +298,6 @@ void parport_config(dev_link_t *link)
goto
failed
;
}
#if (LINUX_VERSION_CODE < VERSION(2,3,6))
#if (LINUX_VERSION_CODE >= VERSION(2,2,8))
p
->
private_data
=
kmalloc
(
sizeof
(
struct
parport_pc_private
),
GFP_KERNEL
);
((
struct
parport_pc_private
*
)(
p
->
private_data
))
->
ctr
=
0x0c
;
#endif
parport_proc_register
(
p
);
p
->
flags
|=
PARPORT_FLAG_COMA
;
parport_pc_write_econtrol
(
p
,
0x00
);
parport_pc_write_control
(
p
,
0x0c
);
parport_pc_write_data
(
p
,
0x00
);
#endif
p
->
modes
|=
PARPORT_MODE_PCSPP
;
if
(
epp_mode
)
p
->
modes
|=
PARPORT_MODE_TRISTATE
|
PARPORT_MODE_EPP
;
...
...
@@ -329,14 +307,6 @@ void parport_config(dev_link_t *link)
info
->
port
=
p
;
strcpy
(
info
->
node
.
dev_name
,
p
->
name
);
link
->
dev
=
&
info
->
node
;
printk
(
KERN_INFO
"%s: PC-style PCMCIA at %#x"
,
p
->
name
,
link
->
io
.
BasePort1
);
if
(
link
->
io
.
NumPorts2
)
printk
(
" & %#x"
,
link
->
io
.
BasePort2
);
printk
(
", irq %u [SPP"
,
link
->
irq
.
AssignedIRQ
);
for
(
i
=
0
;
i
<
5
;
i
++
)
if
(
p
->
modes
&
mode
[
i
].
flag
)
printk
(
",%s"
,
mode
[
i
].
name
);
printk
(
"]
\n
"
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
return
;
...
...
@@ -345,6 +315,7 @@ void parport_config(dev_link_t *link)
cs_error
(
link
->
handle
,
last_fn
,
last_ret
);
failed:
parport_cs_release
((
u_long
)
link
);
link
->
state
&=
~
DEV_CONFIG_PENDING
;
}
/* parport_config */
...
...
@@ -365,15 +336,12 @@ void parport_cs_release(u_long arg)
if
(
info
->
ndev
)
{
struct
parport
*
p
=
info
->
port
;
#if (LINUX_VERSION_CODE < VERSION(2,3,6))
if
(
!
(
p
->
flags
&
PARPORT_FLAG_COMA
))
parport_quiesce
(
p
);
#endif
parport_proc_unregister
(
p
);
#if (LINUX_VERSION_CODE >= VERSION(2,2,8))
kfree
(
p
->
private_data
);
#endif
parport_unregister_port
(
p
);
parport_pc_unregister_port
(
p
);
request_region
(
link
->
io
.
BasePort1
,
link
->
io
.
NumPorts1
,
info
->
node
.
dev_name
);
if
(
link
->
io
.
NumPorts2
)
request_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
,
info
->
node
.
dev_name
);
}
info
->
ndev
=
0
;
link
->
dev
=
NULL
;
...
...
@@ -430,24 +398,6 @@ int parport_event(event_t event, int priority,
/*====================================================================*/
#if (LINUX_VERSION_CODE < VERSION(2,3,6))
static
void
inc_use_count
(
void
)
{
MOD_INC_USE_COUNT
;
parport_pc_ops
.
inc_use_count
();
}
static
void
dec_use_count
(
void
)
{
MOD_DEC_USE_COUNT
;
parport_pc_ops
.
dec_use_count
();
}
#endif
/*====================================================================*/
static
int
__init
init_parport_cs
(
void
)
{
servinfo_t
serv
;
...
...
@@ -456,9 +406,8 @@ static int __init init_parport_cs(void)
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"parport_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
return
-
EINVAL
;
}
register_pccard_driver
(
&
dev_info
,
&
parport_attach
,
&
parport_detach
);
return
0
;
}
...
...
@@ -473,4 +422,3 @@ static void __exit exit_parport_cs(void)
module_init
(
init_parport_cs
);
module_exit
(
exit_parport_cs
);
MODULE_LICENSE
(
"Dual MPL/GPL"
);
drivers/pcmcia/cardbus.c
View file @
ee4351da
...
...
@@ -2,7 +2,7 @@
Cardbus device configuration
cardbus.c 1.
63 1999/11/08 20:47:02
cardbus.c 1.
87 2002/10/24 06:11:41
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
...
...
@@ -15,7 +15,7 @@
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
...
...
@@ -175,7 +175,7 @@ static int cb_setup_cis_mem(socket_info_t * s, struct pci_dev *dev, struct resou
=====================================================================*/
void
read_cb_mem
(
socket_info_t
*
s
,
u_char
fn
,
int
space
,
int
read_cb_mem
(
socket_info_t
*
s
,
u_char
fn
,
int
space
,
u_int
addr
,
u_int
len
,
void
*
ptr
)
{
struct
pci_dev
*
dev
;
...
...
@@ -194,7 +194,7 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space,
goto
fail
;
for
(;
len
;
addr
++
,
ptr
++
,
len
--
)
pci_readb
(
dev
,
addr
,
(
u_char
*
)
ptr
);
return
;
return
0
;
}
res
=
dev
->
resource
+
space
-
1
;
...
...
@@ -214,11 +214,11 @@ void read_cb_mem(socket_info_t * s, u_char fn, int space,
goto
fail
;
memcpy_fromio
(
ptr
,
s
->
cb_cis_virt
+
addr
,
len
);
return
;
return
0
;
fail:
memset
(
ptr
,
0xff
,
len
);
return
;
return
-
1
;
}
/*=====================================================================
...
...
drivers/pcmcia/cirrus.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/cistpl.c
View file @
ee4351da
...
...
@@ -2,7 +2,7 @@
PCMCIA Card Information Structure parser
cistpl.c 1.9
7 2001/10/04 03:33:49
cistpl.c 1.9
9 2002/10/24 06:11:48
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
...
...
@@ -109,7 +109,7 @@ static void set_cis_map(socket_info_t *s, pccard_mem_map *mem)
}
}
void
read_cis_mem
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
int
read_cis_mem
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
u_int
len
,
void
*
ptr
)
{
pccard_mem_map
*
mem
=
&
s
->
cis_mem
;
...
...
@@ -118,7 +118,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr,
DEBUG
(
3
,
"cs: read_cis_mem(%d, %#x, %u)
\n
"
,
attr
,
addr
,
len
);
if
(
setup_cis_mem
(
s
)
!=
0
)
{
memset
(
ptr
,
0xff
,
len
);
return
;
return
-
1
;
}
mem
->
flags
=
MAP_ACTIVE
|
((
cis_width
)
?
MAP_16BIT
:
0
);
...
...
@@ -156,6 +156,7 @@ void read_cis_mem(socket_info_t *s, int attr, u_int addr,
DEBUG
(
3
,
"cs: %#2.2x %#2.2x %#2.2x %#2.2x ...
\n
"
,
*
(
u_char
*
)(
ptr
+
0
),
*
(
u_char
*
)(
ptr
+
1
),
*
(
u_char
*
)(
ptr
+
2
),
*
(
u_char
*
)(
ptr
+
3
));
return
0
;
}
void
write_cis_mem
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
...
...
@@ -270,7 +271,7 @@ static int setup_cis_mem(socket_info_t *s)
if
(
find_mem_region
(
&
s
->
cis_mem
.
sys_start
,
s
->
cap
.
map_size
,
s
->
cap
.
map_size
,
low
,
"card services"
,
s
))
{
printk
(
KERN_NOTICE
"cs: unable to map card memory!
\n
"
);
return
CS_OUT_OF_RESOURCE
;
return
-
1
;
}
s
->
cis_mem
.
sys_stop
=
s
->
cis_mem
.
sys_start
+
s
->
cap
.
map_size
-
1
;
s
->
cis_virt
=
bus_ioremap
(
s
->
cap
.
bus
,
s
->
cis_mem
.
sys_start
,
...
...
@@ -303,7 +304,7 @@ void release_cis_mem(socket_info_t *s)
static
void
read_cis_cache
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
u_int
len
,
void
*
ptr
)
{
int
i
;
int
i
,
ret
;
char
*
caddr
;
if
(
s
->
fake_cis
)
{
...
...
@@ -326,12 +327,12 @@ static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
}
#ifdef CONFIG_CARDBUS
if
(
s
->
state
&
SOCKET_CARDBUS
)
read_cb_mem
(
s
,
0
,
attr
,
addr
,
len
,
ptr
);
re
t
=
re
ad_cb_mem
(
s
,
0
,
attr
,
addr
,
len
,
ptr
);
else
#endif
read_cis_mem
(
s
,
attr
,
addr
,
len
,
ptr
);
re
t
=
re
ad_cis_mem
(
s
,
attr
,
addr
,
len
,
ptr
);
/* Copy data into the cache, if there is room */
if
((
i
<
MAX_CIS_TABLE
)
&&
if
((
ret
==
0
)
&&
(
i
<
MAX_CIS_TABLE
)
&&
(
caddr
+
len
<
s
->
cis_cache
+
MAX_CIS_DATA
))
{
s
->
cis_table
[
i
].
addr
=
addr
;
s
->
cis_table
[
i
].
len
=
len
;
...
...
drivers/pcmcia/cs_internal.h
View file @
ee4351da
/*
* cs_internal.h 1.5
4 2000/10/26 20:10:55
* cs_internal.h 1.5
7 2002/10/24 06:11:43
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
...
...
@@ -202,12 +202,12 @@ int cb_config(socket_info_t *s);
void
cb_release
(
socket_info_t
*
s
);
void
cb_enable
(
socket_info_t
*
s
);
void
cb_disable
(
socket_info_t
*
s
);
void
read_cb_mem
(
socket_info_t
*
s
,
u_char
fn
,
int
space
,
int
read_cb_mem
(
socket_info_t
*
s
,
u_char
fn
,
int
space
,
u_int
addr
,
u_int
len
,
void
*
ptr
);
void
cb_release_cis_mem
(
socket_info_t
*
s
);
/* In cistpl.c */
void
read_cis_mem
(
socket_info_t
*
s
,
int
attr
,
int
read_cis_mem
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
u_int
len
,
void
*
ptr
);
void
write_cis_mem
(
socket_info_t
*
s
,
int
attr
,
u_int
addr
,
u_int
len
,
void
*
ptr
);
...
...
drivers/pcmcia/i82365.c
View file @
ee4351da
...
...
@@ -15,7 +15,7 @@
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/i82365.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/o2micro.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/ricoh.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/tcic.c
View file @
ee4351da
...
...
@@ -15,7 +15,7 @@
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
<d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
...
...
@@ -67,7 +67,7 @@ static const char *version =
#define DEBUG(n, args...)
#endif
MODULE_AUTHOR
(
"David Hinds <d
hinds@pcmcia.sourceforge.org
>"
);
MODULE_AUTHOR
(
"David Hinds <d
ahinds@users.sourceforge.net
>"
);
MODULE_DESCRIPTION
(
"Databook TCIC-2 PCMCIA socket driver"
);
MODULE_LICENSE
(
"Dual MPL/GPL"
);
...
...
drivers/pcmcia/tcic.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/ti113x.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/topic.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@hyper.stanford.edu
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
drivers/pcmcia/vg468.h
View file @
ee4351da
...
...
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
include/linux/mtd/ftl.h
View file @
ee4351da
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <d
hinds@pcmcia.sourceforge.org
>. Portions created by David A. Hinds
* <d
ahinds@users.sourceforge.net
>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
...
...
include/linux/pnpbios.h
View file @
ee4351da
...
...
@@ -3,7 +3,7 @@
*
* Original BIOS code (C) 1998 Christian Schmidt (chr.schmidt@tu-bs.de)
* PnP handler parts (c) 1998 Tom Lees <tom@lpsg.demon.co.uk>
* Minor reorganizations by David Hinds <d
hinds@zen.stanford.edu
>
* Minor reorganizations by David Hinds <d
ahinds@users.sourceforge.net
>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
...
...
include/pcmcia/ciscode.h
View file @
ee4351da
/*
* ciscode.h 1.
45 2000/08/12 02:08:23
* ciscode.h 1.
56 2002/10/25 06:37:30
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
...
...
@@ -16,8 +16,8 @@
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License version 2 (the "GPL"), in
which
* case the provisions of the GPL are applicable instead of the
* terms of the GNU General Public License version 2 (the "GPL"), in
*
which
case the provisions of the GPL are applicable instead of the
* above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use
* your version of this file under the MPL, indicate your decision by
...
...
@@ -60,6 +60,10 @@
#define PRODID_INTEL_DUAL_RS232 0x0301
#define PRODID_INTEL_2PLUS 0x8422
#define MANFID_KME 0x0032
#define PRODID_KME_KXLC005_A 0x0704
#define PRODID_KME_KXLC005_B 0x2904
#define MANFID_LINKSYS 0x0143
#define PRODID_LINKSYS_PCMLM28 0xc0ab
#define PRODID_LINKSYS_3400 0x3341
...
...
@@ -94,6 +98,8 @@
#define PRODID_OSITECH_JACK_336 0x0007
#define PRODID_OSITECH_SEVEN 0x0008
#define MANFID_OXSEMI 0x0279
#define MANFID_PIONEER 0x000b
#define MANFID_PSION 0x016c
...
...
@@ -103,7 +109,10 @@
#define PRODID_QUATECH_SPP100 0x0003
#define PRODID_QUATECH_DUAL_RS232 0x0012
#define PRODID_QUATECH_DUAL_RS232_D1 0x0007
#define PRODID_QUATECH_DUAL_RS232_D2 0x0052
#define PRODID_QUATECH_QUAD_RS232 0x001b
#define PRODID_QUATECH_DUAL_RS422 0x000e
#define PRODID_QUATECH_QUAD_RS422 0x0045
#define MANFID_SMC 0x0108
#define PRODID_SMC_ETHER 0x0105
...
...
@@ -118,9 +127,12 @@
#define MANFID_TDK 0x0105
#define PRODID_TDK_CF010 0x0900
#define PRODID_TDK_GN3410 0x4815
#define MANFID_TOSHIBA 0x0098
#define MANFID_UNGERMANN 0x02c0
#define MANFID_XIRCOM 0x0105
#endif
/* _LINUX_CISCODE_H */
net/core/dev.c
View file @
ee4351da
...
...
@@ -14,7 +14,7 @@
* Additional Authors:
* Florian la Roche <rzsfl@rz.uni-sb.de>
* Alan Cox <gw4pts@gw4pts.ampr.org>
* David Hinds <d
hinds@allegro.stanford.edu
>
* David Hinds <d
ahinds@users.sourceforge.net
>
* Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
* Adam Sulmicki <adam@cfar.umd.edu>
* Pekka Riikonen <priikone@poesidon.pspt.fi>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment