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
Kirill Smelkov
linux
Commits
096cbcc6
Commit
096cbcc6
authored
May 17, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://gkernel.bkbits.net/net-drivers-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
760a916d
6b537219
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
231 additions
and
70 deletions
+231
-70
Documentation/networking/8139too.txt
Documentation/networking/8139too.txt
+1
-0
Documentation/networking/cs89x0.txt
Documentation/networking/cs89x0.txt
+12
-2
MAINTAINERS
MAINTAINERS
+8
-2
drivers/net/3c509.c
drivers/net/3c509.c
+52
-10
drivers/net/8139too.c
drivers/net/8139too.c
+1
-1
drivers/net/cs89x0.c
drivers/net/cs89x0.c
+77
-5
drivers/net/cs89x0.h
drivers/net/cs89x0.h
+4
-0
drivers/net/mii.c
drivers/net/mii.c
+2
-0
drivers/net/tulip/21142.c
drivers/net/tulip/21142.c
+2
-1
drivers/net/tulip/ChangeLog
drivers/net/tulip/ChangeLog
+10
-0
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+3
-2
drivers/net/via-rhine.c
drivers/net/via-rhine.c
+48
-39
drivers/net/wan/pc300_drv.c
drivers/net/wan/pc300_drv.c
+1
-1
drivers/net/wan/pc300_tty.c
drivers/net/wan/pc300_tty.c
+1
-1
include/net/iw_handler.h
include/net/iw_handler.h
+2
-1
net/core/wireless.c
net/core/wireless.c
+7
-5
No files found.
Documentation/networking/8139too.txt
View file @
096cbcc6
...
@@ -98,6 +98,7 @@ KTI KF-230TX/2
...
@@ -98,6 +98,7 @@ KTI KF-230TX/2
Lantech FastNet TX
Lantech FastNet TX
Ovislink Fast Ethernet
Ovislink Fast Ethernet
Planet ENW-9504 (V.4) 10/100
Planet ENW-9504 (V.4) 10/100
SDT Jeoun Fast PCI-TX
SMC EZNET 10/100
SMC EZNET 10/100
UNEX NexNIC ND012C
UNEX NexNIC ND012C
...
...
Documentation/networking/cs89x0.txt
View file @
096cbcc6
...
@@ -51,7 +51,7 @@ TABLE OF CONTENTS
...
@@ -51,7 +51,7 @@ TABLE OF CONTENTS
6.2 Information Required Before Contacting Technical Support
6.2 Information Required Before Contacting Technical Support
6.3 Obtaining the Latest Driver Version
6.3 Obtaining the Latest Driver Version
6.4 Current maintainer
6.4 Current maintainer
6.5 Kernel boot parameters
1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
...
@@ -690,4 +690,14 @@ the latest drivers and technical publications.
...
@@ -690,4 +690,14 @@ the latest drivers and technical publications.
6.4 Current maintainer
6.4 Current maintainer
In February 2000 the maintenance of this driver was assumed by Andrew
In February 2000 the maintenance of this driver was assumed by Andrew
Morton <andrewm@uow.edu.au>
Morton <akpm@zip.com.au>
6.5 Kernel module parameters
For use in embedded environments with no cs89x0 EEPROM, the kernel boot
parameter `cs89x0_media=' has been implemented. Usage is:
cs89x0_media=rj45 or
cs89x0_media=aui or
cs89x0_media=bnc
MAINTAINERS
View file @
096cbcc6
...
@@ -389,8 +389,14 @@ L: cycsyn-devel@bazar.conectiva.com.br
...
@@ -389,8 +389,14 @@ L: cycsyn-devel@bazar.conectiva.com.br
S: Maintained
S: Maintained
CYCLADES ASYNC MUX DRIVER
CYCLADES ASYNC MUX DRIVER
P: Ivan Passos
P: Henrique Gobbi
M: ivan@cyclades.com
M: henrique@cyclades.com
W: http://www.cyclades.com/
S: Supported
CYCLADES PC300 DRIVER
P: Henrique Gobbi
M: henrique@cyclades.com
W: http://www.cyclades.com/
W: http://www.cyclades.com/
S: Supported
S: Supported
...
...
drivers/net/3c509.c
View file @
096cbcc6
...
@@ -47,10 +47,12 @@
...
@@ -47,10 +47,12 @@
- ethtool support
- ethtool support
v1.18b 1Mar2002 Zwane Mwaikambo <zwane@commfireservices.com>
v1.18b 1Mar2002 Zwane Mwaikambo <zwane@commfireservices.com>
- Power Management support
- Power Management support
v1.18c 1Mar2002 David Ruggiero <jdr@farfalle.com>
- Full duplex support
*/
*/
#define DRV_NAME "3c509"
#define DRV_NAME "3c509"
#define DRV_VERSION "1.18
b
"
#define DRV_VERSION "1.18
c
"
#define DRV_RELDATE "1Mar2002"
#define DRV_RELDATE "1Mar2002"
/* A few values that may be tweaked. */
/* A few values that may be tweaked. */
...
@@ -141,6 +143,8 @@ enum RxFilter {
...
@@ -141,6 +143,8 @@ enum RxFilter {
#define WN0_IRQ 0x08
/* Window 0: Set IRQ line in bits 12-15. */
#define WN0_IRQ 0x08
/* Window 0: Set IRQ line in bits 12-15. */
#define WN4_MEDIA 0x0A
/* Window 4: Various transcvr/media bits. */
#define WN4_MEDIA 0x0A
/* Window 4: Various transcvr/media bits. */
#define MEDIA_TP 0x00C0
/* Enable link beat and jabber for 10baseT. */
#define MEDIA_TP 0x00C0
/* Enable link beat and jabber for 10baseT. */
#define WN4_NETDIAG 0x06
/* Window 4: Net diagnostic */
#define FD_ENABLE 0x8000
/* Enable full-duplex ("external loopback") */
/*
/*
* Must be a power of two (we use a binary and in the
* Must be a power of two (we use a binary and in the
...
@@ -500,12 +504,18 @@ int __init el3_probe(struct net_device *dev, int card_idx)
...
@@ -500,12 +504,18 @@ int __init el3_probe(struct net_device *dev, int card_idx)
memcpy
(
dev
->
dev_addr
,
phys_addr
,
sizeof
(
phys_addr
));
memcpy
(
dev
->
dev_addr
,
phys_addr
,
sizeof
(
phys_addr
));
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
dev
->
irq
=
irq
;
dev
->
irq
=
irq
;
dev
->
if_port
=
(
dev
->
mem_start
&
0x1f
)
?
dev
->
mem_start
&
3
:
if_port
;
if
(
dev
->
mem_start
&
0x05
)
{
/* xcvr codes 1/3/4/12 */
dev
->
if_port
=
(
dev
->
mem_start
&
0x0f
);
}
else
{
/* xcvr codes 0/8 */
/* use eeprom value, but save user's full-duplex selection */
dev
->
if_port
=
(
if_port
|
(
dev
->
mem_start
&
0x08
)
);
}
{
{
const
char
*
if_names
[]
=
{
"10baseT"
,
"AUI"
,
"undefined"
,
"BNC"
};
const
char
*
if_names
[]
=
{
"10baseT"
,
"AUI"
,
"undefined"
,
"BNC"
};
printk
(
"%s: 3c5x9 at %#3.3lx, %s port, address "
,
printk
(
"%s: 3c5x9 at %#3.3lx, %s port, address "
,
dev
->
name
,
dev
->
base_addr
,
if_names
[
dev
->
if_port
]);
dev
->
name
,
dev
->
base_addr
,
if_names
[(
dev
->
if_port
&
0x03
)
]);
}
}
/* Read in the station address. */
/* Read in the station address. */
...
@@ -557,7 +567,7 @@ int __init el3_probe(struct net_device *dev, int card_idx)
...
@@ -557,7 +567,7 @@ int __init el3_probe(struct net_device *dev, int card_idx)
/* Read a word from the EEPROM using the regular EEPROM access register.
/* Read a word from the EEPROM using the regular EEPROM access register.
Assume that we are in register window zero.
Assume that we are in register window zero.
*/
*/
static
ushort
__init
read_eeprom
(
int
ioaddr
,
int
index
)
static
ushort
read_eeprom
(
int
ioaddr
,
int
index
)
{
{
outw
(
EEPROM_READ
+
index
,
ioaddr
+
10
);
outw
(
EEPROM_READ
+
index
,
ioaddr
+
10
);
/* Pause for at least 162 us. for the read to take place. */
/* Pause for at least 162 us. for the read to take place. */
...
@@ -1083,7 +1093,7 @@ static void el3_down(struct net_device *dev)
...
@@ -1083,7 +1093,7 @@ static void el3_down(struct net_device *dev)
static
void
el3_up
(
struct
net_device
*
dev
)
static
void
el3_up
(
struct
net_device
*
dev
)
{
{
int
i
;
int
i
,
sw_info
,
net_diag
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
/* Activating the board required and does no harm otherwise */
/* Activating the board required and does no harm otherwise */
...
@@ -1098,12 +1108,44 @@ static void el3_up(struct net_device *dev)
...
@@ -1098,12 +1108,44 @@ static void el3_up(struct net_device *dev)
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
outb
(
dev
->
dev_addr
[
i
],
ioaddr
+
i
);
outb
(
dev
->
dev_addr
[
i
],
ioaddr
+
i
);
if
(
dev
->
if_port
==
3
)
if
(
(
dev
->
if_port
&
0x03
)
==
3
)
/* BNC interface */
/* Start the thinnet transceiver. We should really wait 50ms...*/
/* Start the thinnet transceiver. We should really wait 50ms...*/
outw
(
StartCoax
,
ioaddr
+
EL3_CMD
);
outw
(
StartCoax
,
ioaddr
+
EL3_CMD
);
else
if
(
dev
->
if_port
==
0
)
{
else
if
((
dev
->
if_port
&
0x03
)
==
0
)
{
/* 10baseT interface */
/* 10baseT interface, enabled link beat and jabber check. */
/* Combine secondary sw_info word (the adapter level) and primary
sw_info word (duplex setting plus other useless bits) */
EL3WINDOW
(
0
);
sw_info
=
(
read_eeprom
(
ioaddr
,
0x14
)
&
0x400f
)
|
(
read_eeprom
(
ioaddr
,
0x0d
)
&
0xBff0
);
EL3WINDOW
(
4
);
EL3WINDOW
(
4
);
net_diag
=
inw
(
ioaddr
+
WN4_NETDIAG
);
net_diag
=
(
net_diag
|
FD_ENABLE
);
/* temporarily assume full-duplex will be set */
printk
(
"%s: "
,
dev
->
name
);
switch
(
dev
->
if_port
&
0x0c
)
{
case
12
:
/* force full-duplex mode if 3c5x9b */
if
(
sw_info
&
0x000f
)
{
printk
(
"Forcing 3c5x9b full-duplex mode"
);
break
;
}
case
8
:
/* set full-duplex mode based on eeprom config setting */
if
((
sw_info
&
0x000f
)
&&
(
sw_info
&
0x8000
))
{
printk
(
"Setting 3c5x9b full-duplex mode (from EEPROM configuration bit)"
);
break
;
}
default:
/* xcvr=(0 || 4) OR user has an old 3c5x9 non "B" model */
printk
(
"Setting 3c5x9/3c5x9B half-duplex mode"
);
net_diag
=
(
net_diag
&
~
FD_ENABLE
);
/* disable full duplex */
}
outw
(
net_diag
,
ioaddr
+
WN4_NETDIAG
);
printk
(
" if_port: %d, sw_info: %4.4x
\n
"
,
dev
->
if_port
,
sw_info
);
if
(
el3_debug
>
3
)
printk
(
"%s: 3c5x9 net diag word is now: %4.4x.
\n
"
,
dev
->
name
,
net_diag
);
/* Enable link beat and jabber check. */
outw
(
inw
(
ioaddr
+
WN4_MEDIA
)
|
MEDIA_TP
,
ioaddr
+
WN4_MEDIA
);
outw
(
inw
(
ioaddr
+
WN4_MEDIA
)
|
MEDIA_TP
,
ioaddr
+
WN4_MEDIA
);
}
}
...
@@ -1208,11 +1250,11 @@ static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
...
@@ -1208,11 +1250,11 @@ static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
/* Parameters that may be passed into the module. */
/* Parameters that may be passed into the module. */
static
int
debug
=
-
1
;
static
int
debug
=
-
1
;
static
int
irq
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
static
int
irq
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
static
int
xcvr
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
static
int
xcvr
[]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
MODULE_PARM
(
debug
,
"i"
);
MODULE_PARM
(
debug
,
"i"
);
MODULE_PARM
(
irq
,
"1-8i"
);
MODULE_PARM
(
irq
,
"1-8i"
);
MODULE_PARM
(
xcvr
,
"1-
8
i"
);
MODULE_PARM
(
xcvr
,
"1-
12
i"
);
MODULE_PARM
(
max_interrupt_work
,
"i"
);
MODULE_PARM
(
max_interrupt_work
,
"i"
);
MODULE_PARM_DESC
(
debug
,
"debug level (0-6)"
);
MODULE_PARM_DESC
(
debug
,
"debug level (0-6)"
);
MODULE_PARM_DESC
(
irq
,
"IRQ number(s) (assigned)"
);
MODULE_PARM_DESC
(
irq
,
"IRQ number(s) (assigned)"
);
...
...
drivers/net/8139too.c
View file @
096cbcc6
...
@@ -2329,7 +2329,7 @@ static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
...
@@ -2329,7 +2329,7 @@ static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
if
(
cmd
!=
SIOCETHTOOL
)
{
if
(
cmd
!=
SIOCETHTOOL
)
{
/* With SIOCETHTOOL, this would corrupt the pointer. */
/* With SIOCETHTOOL, this would corrupt the pointer. */
data
->
phy_id
&=
0x
1
f
;
data
->
phy_id
&=
0x
3
f
;
data
->
reg_num
&=
0x1f
;
data
->
reg_num
&=
0x1f
;
}
}
...
...
drivers/net/cs89x0.c
View file @
096cbcc6
...
@@ -81,6 +81,9 @@
...
@@ -81,6 +81,9 @@
: Make `version[]' __initdata
: Make `version[]' __initdata
: Uninlined the read/write reg/word functions.
: Uninlined the read/write reg/word functions.
Oskar Schirmer : oskar@scara.com
: HiCO.SH4 (superh) support added (irq#1, cs89x0_media=)
*/
*/
/* Always include 'config.h' first in case the user wants to turn on
/* Always include 'config.h' first in case the user wants to turn on
...
@@ -156,6 +159,10 @@ static char version[] __initdata =
...
@@ -156,6 +159,10 @@ static char version[] __initdata =
static
unsigned
int
netcard_portlist
[]
__initdata
=
static
unsigned
int
netcard_portlist
[]
__initdata
=
{
0x80090303
,
0x300
,
0x320
,
0x340
,
0x360
,
0x200
,
0x220
,
0x240
,
0x260
,
0x280
,
0x2a0
,
0x2c0
,
0x2e0
,
0
};
{
0x80090303
,
0x300
,
0x320
,
0x340
,
0x360
,
0x200
,
0x220
,
0x240
,
0x260
,
0x280
,
0x2a0
,
0x2c0
,
0x2e0
,
0
};
static
unsigned
int
cs8900_irq_map
[]
=
{
12
,
0
,
0
,
0
};
static
unsigned
int
cs8900_irq_map
[]
=
{
12
,
0
,
0
,
0
};
#elif defined(CONFIG_SH_HICOSH4)
static
unsigned
int
netcard_portlist
[]
__initdata
=
{
0x0300
,
0
};
static
unsigned
int
cs8900_irq_map
[]
=
{
1
,
0
,
0
,
0
};
#else
#else
static
unsigned
int
netcard_portlist
[]
__initdata
=
static
unsigned
int
netcard_portlist
[]
__initdata
=
{
0x300
,
0x320
,
0x340
,
0x360
,
0x200
,
0x220
,
0x240
,
0x260
,
0x280
,
0x2a0
,
0x2c0
,
0x2e0
,
0
};
{
0x300
,
0x320
,
0x340
,
0x360
,
0x200
,
0x220
,
0x240
,
0x260
,
0x280
,
0x2a0
,
0x2c0
,
0x2e0
,
0
};
...
@@ -247,6 +254,20 @@ static int __init dma_fn(char *str)
...
@@ -247,6 +254,20 @@ static int __init dma_fn(char *str)
__setup
(
"cs89x0_dma="
,
dma_fn
);
__setup
(
"cs89x0_dma="
,
dma_fn
);
#endif
/* !defined(MODULE) && (ALLOW_DMA != 0) */
#endif
/* !defined(MODULE) && (ALLOW_DMA != 0) */
#ifndef MODULE
static
int
g_cs89x0_media__force
;
static
int
__init
media_fn
(
char
*
str
)
{
if
(
!
strcmp
(
str
,
"rj45"
))
g_cs89x0_media__force
=
FORCE_RJ45
;
else
if
(
!
strcmp
(
str
,
"aui"
))
g_cs89x0_media__force
=
FORCE_AUI
;
else
if
(
!
strcmp
(
str
,
"bnc"
))
g_cs89x0_media__force
=
FORCE_BNC
;
return
1
;
}
__setup
(
"cs89x0_media="
,
media_fn
);
#endif
/* Check for a network adaptor of this type, and return '0' iff one exists.
/* Check for a network adaptor of this type, and return '0' iff one exists.
If dev->base_addr == 0, probe all likely locations.
If dev->base_addr == 0, probe all likely locations.
...
@@ -382,6 +403,9 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
...
@@ -382,6 +403,9 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
lp
->
dma
=
g_cs89x0_dma
;
lp
->
dma
=
g_cs89x0_dma
;
lp
->
dmasize
=
16
;
/* Could make this an option... */
lp
->
dmasize
=
16
;
/* Could make this an option... */
}
}
#endif
#ifndef MODULE
lp
->
force
=
g_cs89x0_media__force
;
#endif
#endif
}
}
lp
=
(
struct
net_local
*
)
dev
->
priv
;
lp
=
(
struct
net_local
*
)
dev
->
priv
;
...
@@ -394,6 +418,12 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
...
@@ -394,6 +418,12 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
goto
out1
;
goto
out1
;
}
}
#ifdef CONFIG_SH_HICOSH4
/* truely reset the chip */
outw
(
0x0114
,
ioaddr
+
ADD_PORT
);
outw
(
0x0040
,
ioaddr
+
DATA_PORT
);
#endif
/* if they give us an odd I/O address, then do ONE write to
/* if they give us an odd I/O address, then do ONE write to
the address port, to get it back to address zero, where we
the address port, to get it back to address zero, where we
expect to find the EISA signature word. An IO with a base of 0x3
expect to find the EISA signature word. An IO with a base of 0x3
...
@@ -413,7 +443,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
...
@@ -413,7 +443,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr)
}
}
printk
(
"PP_addr=0x%x
\n
"
,
inw
(
ioaddr
+
ADD_PORT
));
printk
(
"PP_addr=0x%x
\n
"
,
inw
(
ioaddr
+
ADD_PORT
));
if
(
inw
(
ioaddr
+
DATA_PORT
)
!=
CHIP_EISA_ID_SIG
)
{
if
(
inw
(
ioaddr
+
DATA_PORT
)
!=
CHIP_EISA_ID_SIG
)
{
printk
(
KERN_ERR
"%s: incorrect signature 0x%x
\n
"
,
printk
(
KERN_ERR
"%s: incorrect signature 0x%x
\n
"
,
dev
->
name
,
inw
(
ioaddr
+
DATA_PORT
));
dev
->
name
,
inw
(
ioaddr
+
DATA_PORT
));
retval
=
-
ENODEV
;
retval
=
-
ENODEV
;
...
@@ -454,6 +484,39 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
...
@@ -454,6 +484,39 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
EEPROM read on reset. So, if the chip says it read the EEPROM
EEPROM read on reset. So, if the chip says it read the EEPROM
the driver will always do *something* instead of complain that
the driver will always do *something* instead of complain that
adapter_cnf is 0. */
adapter_cnf is 0. */
#ifdef CONFIG_SH_HICOSH4
if
(
1
)
{
/* For the HiCO.SH4 board, things are different: we don't
have EEPROM, but there is some data in flash, so we go
get it there directly (MAC). */
__u16
*
confd
;
short
cnt
;
if
(((
*
(
volatile
__u32
*
)
0xa0013ff0
)
&
0x00ffffff
)
==
0x006c3000
)
{
confd
=
(
__u16
*
)
0xa0013fc0
;
}
else
{
confd
=
(
__u16
*
)
0xa001ffc0
;
}
cnt
=
(
*
confd
++
&
0x00ff
)
>>
1
;
while
(
--
cnt
>
0
)
{
__u16
j
=
*
confd
++
;
switch
(
j
&
0x0fff
)
{
case
PP_IA
:
for
(
i
=
0
;
i
<
ETH_ALEN
/
2
;
i
++
)
{
dev
->
dev_addr
[
i
*
2
]
=
confd
[
i
]
&
0xFF
;
dev
->
dev_addr
[
i
*
2
+
1
]
=
confd
[
i
]
>>
8
;
}
break
;
}
j
=
(
j
>>
12
)
+
1
;
confd
+=
j
;
cnt
-=
j
;
}
}
else
#endif
if
((
readreg
(
dev
,
PP_SelfST
)
&
(
EEPROM_OK
|
EEPROM_PRESENT
))
==
if
((
readreg
(
dev
,
PP_SelfST
)
&
(
EEPROM_OK
|
EEPROM_PRESENT
))
==
(
EEPROM_OK
|
EEPROM_PRESENT
))
{
(
EEPROM_OK
|
EEPROM_PRESENT
))
{
/* Load the MAC. */
/* Load the MAC. */
...
@@ -507,6 +570,11 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
...
@@ -507,6 +570,11 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
printk
(
"
\n
"
);
printk
(
"
\n
"
);
/* First check to see if an EEPROM is attached. */
/* First check to see if an EEPROM is attached. */
#ifdef CONFIG_SH_HICOSH4
/* no EEPROM on HiCO, don't hazzle with it here */
if
(
1
)
{
printk
(
KERN_NOTICE
"cs89x0: No EEPROM on HiCO.SH4
\n
"
);
}
else
#endif
if
((
readreg
(
dev
,
PP_SelfST
)
&
EEPROM_PRESENT
)
==
0
)
if
((
readreg
(
dev
,
PP_SelfST
)
&
EEPROM_PRESENT
)
==
0
)
printk
(
KERN_WARNING
"cs89x0: No EEPROM, relying on command line....
\n
"
);
printk
(
KERN_WARNING
"cs89x0: No EEPROM, relying on command line....
\n
"
);
else
if
(
get_eeprom_data
(
dev
,
START_EEPROM_DATA
,
CHKSUM_LEN
,
eeprom_buff
)
<
0
)
{
else
if
(
get_eeprom_data
(
dev
,
START_EEPROM_DATA
,
CHKSUM_LEN
,
eeprom_buff
)
<
0
)
{
...
@@ -616,10 +684,10 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
...
@@ -616,10 +684,10 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
}
}
/* print the ethernet address. */
/* print the ethernet address. */
printk
(
", MAC
"
);
printk
(
", MAC"
);
for
(
i
=
0
;
i
<
ETH_ALEN
;
i
++
)
for
(
i
=
0
;
i
<
ETH_ALEN
;
i
++
)
{
{
printk
(
"%
s%02x"
,
i
?
":"
:
""
,
dev
->
dev_addr
[
i
]);
printk
(
"%
c%02x"
,
i
?
':'
:
' '
,
dev
->
dev_addr
[
i
]);
}
}
dev
->
open
=
net_open
;
dev
->
open
=
net_open
;
...
@@ -1046,6 +1114,7 @@ net_open(struct net_device *dev)
...
@@ -1046,6 +1114,7 @@ net_open(struct net_device *dev)
int
i
;
int
i
;
int
ret
;
int
ret
;
#ifndef CONFIG_SH_HICOSH4
/* uses irq#1, so this wont work */
if
(
dev
->
irq
<
2
)
{
if
(
dev
->
irq
<
2
)
{
/* Allow interrupts to be generated by the chip */
/* Allow interrupts to be generated by the chip */
/* Cirrus' release had this: */
/* Cirrus' release had this: */
...
@@ -1056,7 +1125,7 @@ net_open(struct net_device *dev)
...
@@ -1056,7 +1125,7 @@ net_open(struct net_device *dev)
writereg
(
dev
,
PP_BusCTL
,
ENABLE_IRQ
|
MEMORY_ON
);
writereg
(
dev
,
PP_BusCTL
,
ENABLE_IRQ
|
MEMORY_ON
);
for
(
i
=
2
;
i
<
CS8920_NO_INTS
;
i
++
)
{
for
(
i
=
2
;
i
<
CS8920_NO_INTS
;
i
++
)
{
if
((
1
<<
dev
->
irq
)
&
lp
->
irq_map
)
{
if
((
1
<<
i
)
&
lp
->
irq_map
)
{
if
(
request_irq
(
i
,
net_interrupt
,
0
,
dev
->
name
,
dev
)
==
0
)
{
if
(
request_irq
(
i
,
net_interrupt
,
0
,
dev
->
name
,
dev
)
==
0
)
{
dev
->
irq
=
i
;
dev
->
irq
=
i
;
write_irq
(
dev
,
lp
->
chip_type
,
i
);
write_irq
(
dev
,
lp
->
chip_type
,
i
);
...
@@ -1072,7 +1141,10 @@ net_open(struct net_device *dev)
...
@@ -1072,7 +1141,10 @@ net_open(struct net_device *dev)
ret
=
-
EAGAIN
;
ret
=
-
EAGAIN
;
goto
bad_out
;
goto
bad_out
;
}
}
}
else
{
}
else
#endif
{
if
(((
1
<<
dev
->
irq
)
&
lp
->
irq_map
)
==
0
)
{
if
(((
1
<<
dev
->
irq
)
&
lp
->
irq_map
)
==
0
)
{
printk
(
KERN_ERR
"%s: IRQ %d is not in our map of allowable IRQs, which is %x
\n
"
,
printk
(
KERN_ERR
"%s: IRQ %d is not in our map of allowable IRQs, which is %x
\n
"
,
dev
->
name
,
dev
->
irq
,
lp
->
irq_map
);
dev
->
name
,
dev
->
irq
,
lp
->
irq_map
);
...
...
drivers/net/cs89x0.h
View file @
096cbcc6
...
@@ -437,7 +437,11 @@
...
@@ -437,7 +437,11 @@
#define IRQ_MAP_EEPROM_DATA 0x0046
/* Offset into eeprom for the IRQ map */
#define IRQ_MAP_EEPROM_DATA 0x0046
/* Offset into eeprom for the IRQ map */
#define IRQ_MAP_LEN 0x0004
/* No of bytes to read for the IRQ map */
#define IRQ_MAP_LEN 0x0004
/* No of bytes to read for the IRQ map */
#define PNP_IRQ_FRMT 0x0022
/* PNP small item IRQ format */
#define PNP_IRQ_FRMT 0x0022
/* PNP small item IRQ format */
#ifdef CONFIG_SH_HICOSH4
#define CS8900_IRQ_MAP 0x0002
/* HiCO-SH4 board has its IRQ on #1 */
#else
#define CS8900_IRQ_MAP 0x1c20
/* This IRQ map is fixed */
#define CS8900_IRQ_MAP 0x1c20
/* This IRQ map is fixed */
#endif
#define CS8920_NO_INTS 0x0F
/* Max CS8920 interrupt select # */
#define CS8920_NO_INTS 0x0F
/* Max CS8920 interrupt select # */
...
...
drivers/net/mii.c
View file @
096cbcc6
...
@@ -146,6 +146,8 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
...
@@ -146,6 +146,8 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
int
mii_link_ok
(
struct
mii_if_info
*
mii
)
int
mii_link_ok
(
struct
mii_if_info
*
mii
)
{
{
/* first, a dummy read, needed to latch some MII phys */
mii
->
mdio_read
(
mii
->
dev
,
mii
->
phy_id
,
MII_BMSR
);
if
(
mii
->
mdio_read
(
mii
->
dev
,
mii
->
phy_id
,
MII_BMSR
)
&
BMSR_LSTATUS
)
if
(
mii
->
mdio_read
(
mii
->
dev
,
mii
->
phy_id
,
MII_BMSR
)
&
BMSR_LSTATUS
)
return
1
;
return
1
;
return
0
;
return
0
;
...
...
drivers/net/tulip/21142.c
View file @
096cbcc6
...
@@ -172,8 +172,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
...
@@ -172,8 +172,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
tp
->
mtable
->
leafcount
;
i
++
)
for
(
i
=
0
;
i
<
tp
->
mtable
->
leafcount
;
i
++
)
if
(
tp
->
mtable
->
mleaf
[
i
].
media
==
dev
->
if_port
)
{
if
(
tp
->
mtable
->
mleaf
[
i
].
media
==
dev
->
if_port
)
{
int
startup
=
!
((
tp
->
chip_id
==
DC21143
&&
tp
->
revision
==
65
));
tp
->
cur_index
=
i
;
tp
->
cur_index
=
i
;
tulip_select_media
(
dev
,
1
);
tulip_select_media
(
dev
,
startup
);
setup_done
=
1
;
setup_done
=
1
;
break
;
break
;
}
}
...
...
drivers/net/tulip/ChangeLog
View file @
096cbcc6
2002-05-11 Juan Quintela <quintela@mandrakesoft.com>
* 21142.c (t21142_lnk_change): Revert earlier patch
to always reset phy; only conditionally do so now.
2002-05-03 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core (tulip_pci_tbl): Add new "comet"
pci id. Contributed by Ohta Kyuma.
2002-03-07 Jeff Garzik <jgarzik@mandrakesoft.com>
2002-03-07 Jeff Garzik <jgarzik@mandrakesoft.com>
* tulip_core (tulip_mwi_config): Use new PCI API functions
* tulip_core (tulip_mwi_config): Use new PCI API functions
...
...
drivers/net/tulip/tulip_core.c
View file @
096cbcc6
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
#define DRV_NAME "tulip"
#define DRV_NAME "tulip"
#define DRV_VERSION "1.1.1
2
"
#define DRV_VERSION "1.1.1
3
"
#define DRV_RELDATE "Ma
r 07
, 2002"
#define DRV_RELDATE "Ma
y 11
, 2002"
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -204,6 +204,7 @@ static struct pci_device_id tulip_pci_tbl[] __devinitdata = {
...
@@ -204,6 +204,7 @@ static struct pci_device_id tulip_pci_tbl[] __devinitdata = {
{
0x1317
,
0x0981
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x0981
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x0985
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x0985
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x1985
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x1985
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x1317
,
0x9511
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB02
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB02
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB03
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB03
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
{
0x13D1
,
0xAB08
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
COMET
},
...
...
drivers/net/via-rhine.c
View file @
096cbcc6
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
a complete program and may only be used when the entire operating
a complete program and may only be used when the entire operating
system is licensed under the GPL.
system is licensed under the GPL.
This driver is designed for the VIA VT86
c100A Rhine-II PCI Fast Ethernet
This driver is designed for the VIA VT86
C100A Rhine-I.
controller. It also works with the older 3043 Rhine-I chip.
It also works with the 6102 Rhine-II, and 6105/6105M Rhine-III.
The author may be reached as becker@scyld.com, or C/O
The author may be reached as becker@scyld.com, or C/O
Scyld Computing Corporation
Scyld Computing Corporation
...
@@ -81,14 +81,26 @@
...
@@ -81,14 +81,26 @@
- Add ethtool support
- Add ethtool support
- Replace some MII-related magic numbers with constants
- Replace some MII-related magic numbers with constants
LK1.1.14 (jgarzik):
LK1.1.14 (Ivan G.):
- Merge new PCI id from 'linuxfet' driver.
- fixes comments for Rhine-III
- removes W_MAX_TIMEOUT (unused)
- adds HasDavicomPhy for Rhine-I (basis: linuxfet driver; my card
is R-I and has Davicom chip, flag is referenced in kernel driver)
- sends chip_id as a parameter to wait_for_reset since np is not
initialized on first call
- changes mmio "else if (chip_id==VT6102)" to "else" so it will work
for Rhine-III's (documentation says same bit is correct)
- transmit frame queue message is off by one - fixed
- adds IntrNormalSummary to "Something Wicked" exclusion list
so normal interrupts will not trigger the message (src: Donald Becker)
(Roger Lahti)
- cosmetic cleanups, remove 3 unused members of struct netdev_private
*/
*/
#define DRV_NAME "via-rhine"
#define DRV_NAME "via-rhine"
#define DRV_VERSION "1.1.14"
#define DRV_VERSION "1.1.14"
#define DRV_RELDATE "
Feb-12
-2002"
#define DRV_RELDATE "
May-3
-2002"
/* A few user-configurable values.
/* A few user-configurable values.
...
@@ -139,9 +151,6 @@ static const int multicast_filter_limit = 32;
...
@@ -139,9 +151,6 @@ static const int multicast_filter_limit = 32;
#define PKT_BUF_SZ 1536
/* Size of each temporary Rx buffer.*/
#define PKT_BUF_SZ 1536
/* Size of each temporary Rx buffer.*/
/* max time out delay time */
#define W_MAX_TIMEOUT 0x0FFFU
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#warning See the last lines of the source file.
...
@@ -176,7 +185,7 @@ static char version[] __devinitdata =
...
@@ -176,7 +185,7 @@ static char version[] __devinitdata =
KERN_INFO
DRV_NAME
".c:v1.10-LK"
DRV_VERSION
" "
DRV_RELDATE
" Written by Donald Becker
\n
"
KERN_INFO
DRV_NAME
".c:v1.10-LK"
DRV_VERSION
" "
DRV_RELDATE
" Written by Donald Becker
\n
"
KERN_INFO
" http://www.scyld.com/network/via-rhine.html
\n
"
;
KERN_INFO
" http://www.scyld.com/network/via-rhine.html
\n
"
;
static
char
shortname
[]
__devinitdata
=
DRV_NAME
;
static
char
shortname
[]
=
DRV_NAME
;
/* This driver was written to use PCI memory space, however most versions
/* This driver was written to use PCI memory space, however most versions
...
@@ -320,8 +329,8 @@ enum pci_flags_bit {
...
@@ -320,8 +329,8 @@ enum pci_flags_bit {
enum
via_rhine_chips
{
enum
via_rhine_chips
{
VT86C100A
=
0
,
VT86C100A
=
0
,
VT6102
,
VT6102
,
VT3043
,
VT6105
,
VT6105
,
VT6105M
};
};
struct
via_rhine_chip_info
{
struct
via_rhine_chip_info
{
...
@@ -346,21 +355,21 @@ enum chip_capability_flags {
...
@@ -346,21 +355,21 @@ enum chip_capability_flags {
static
struct
via_rhine_chip_info
via_rhine_chip_info
[]
__devinitdata
=
static
struct
via_rhine_chip_info
via_rhine_chip_info
[]
__devinitdata
=
{
{
{
"VIA VT86C100A Rhine"
,
RHINE_IOTYPE
,
128
,
{
"VIA VT86C100A Rhine"
,
RHINE_IOTYPE
,
128
,
CanHaveMII
|
ReqTxAlign
},
CanHaveMII
|
ReqTxAlign
|
HasDavicomPhy
},
{
"VIA VT6102 Rhine-II"
,
RHINE_IOTYPE
,
256
,
{
"VIA VT6102 Rhine-II"
,
RHINE_IOTYPE
,
256
,
CanHaveMII
|
HasWOL
},
CanHaveMII
|
HasWOL
},
{
"VIA VT3043 Rhine"
,
RHINE_IOTYPE
,
128
,
CanHaveMII
|
ReqTxAlign
},
{
"VIA VT6105 Rhine-III"
,
RHINE_IOTYPE
,
256
,
{
"VIA VT6105 Rhine-III"
,
RHINE_IOTYPE
,
256
,
CanHaveMII
|
HasWOL
},
CanHaveMII
|
HasWOL
},
{
"VIA VT6105M Rhine-III"
,
RHINE_IOTYPE
,
256
,
CanHaveMII
|
HasWOL
},
};
};
static
struct
pci_device_id
via_rhine_pci_tbl
[]
__devinitdata
=
static
struct
pci_device_id
via_rhine_pci_tbl
[]
__devinitdata
=
{
{
{
0x1106
,
0x
6100
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT86C100A
},
{
0x1106
,
0x
3043
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT86C100A
},
{
0x1106
,
0x3065
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT6102
},
{
0x1106
,
0x3065
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT6102
},
{
0x1106
,
0x3043
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT3043
},
{
0x1106
,
0x3106
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT6105
},
{
0x1106
,
0x3106
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT6105
},
{
0x1106
,
0x3053
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
VT6105M
},
{
0
,}
/* terminate list */
{
0
,}
/* terminate list */
};
};
MODULE_DEVICE_TABLE
(
pci
,
via_rhine_pci_tbl
);
MODULE_DEVICE_TABLE
(
pci
,
via_rhine_pci_tbl
);
...
@@ -379,6 +388,11 @@ enum register_offsets {
...
@@ -379,6 +388,11 @@ enum register_offsets {
StickyHW
=
0x83
,
WOLcrClr
=
0xA4
,
WOLcgClr
=
0xA7
,
PwrcsrClr
=
0xAC
,
StickyHW
=
0x83
,
WOLcrClr
=
0xA4
,
WOLcgClr
=
0xA7
,
PwrcsrClr
=
0xAC
,
};
};
/* Bits in ConfigD (select backoff algorithm (Ethernet capture effect)) */
enum
backoff_bits
{
BackOpt
=
0x01
,
BackAMD
=
0x02
,
BackDEC
=
0x04
,
BackRandom
=
0x08
};
#ifdef USE_MEM
#ifdef USE_MEM
/* Registers we check that mmio and reg are the same. */
/* Registers we check that mmio and reg are the same. */
int
mmio_verify_registers
[]
=
{
int
mmio_verify_registers
[]
=
{
...
@@ -427,11 +441,11 @@ struct tx_desc {
...
@@ -427,11 +441,11 @@ struct tx_desc {
u32
next_desc
;
u32
next_desc
;
};
};
/* Bits in *_desc.status */
enum
rx_status_bits
{
enum
rx_status_bits
{
RxOK
=
0x8000
,
RxWholePkt
=
0x0300
,
RxErr
=
0x008F
RxOK
=
0x8000
,
RxWholePkt
=
0x0300
,
RxErr
=
0x008F
};
};
/* Bits in *_desc.status */
enum
desc_status_bits
{
enum
desc_status_bits
{
DescOwn
=
0x80000000
,
DescEndPacket
=
0x4000
,
DescIntr
=
0x1000
,
DescOwn
=
0x80000000
,
DescEndPacket
=
0x4000
,
DescIntr
=
0x1000
,
};
};
...
@@ -479,13 +493,10 @@ struct netdev_private {
...
@@ -479,13 +493,10 @@ struct netdev_private {
u16
chip_cmd
;
/* Current setting for ChipCmd */
u16
chip_cmd
;
/* Current setting for ChipCmd */
/* These values are keep track of the transceiver/media in use. */
/* These values are keep track of the transceiver/media in use. */
unsigned
int
full_duplex
:
1
;
/* Full-duplex operation requested. */
unsigned
int
duplex_lock
:
1
;
unsigned
int
default_port
:
4
;
/* Last dev->if_port value. */
unsigned
int
default_port
:
4
;
/* Last dev->if_port value. */
u8
tx_thresh
,
rx_thresh
;
u8
tx_thresh
,
rx_thresh
;
/* MII transceiver section. */
/* MII transceiver section. */
u16
advertising
;
/* NWay media advertisement */
unsigned
char
phys
[
MAX_MII_CNT
];
/* MII device addresses. */
unsigned
char
phys
[
MAX_MII_CNT
];
/* MII device addresses. */
unsigned
int
mii_cnt
;
/* number of MIIs found, but only the first one is used */
unsigned
int
mii_cnt
;
/* number of MIIs found, but only the first one is used */
u16
mii_status
;
/* last read MII status */
u16
mii_status
;
/* last read MII status */
...
@@ -509,15 +520,13 @@ static int via_rhine_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
...
@@ -509,15 +520,13 @@ static int via_rhine_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static
int
via_rhine_close
(
struct
net_device
*
dev
);
static
int
via_rhine_close
(
struct
net_device
*
dev
);
static
inline
void
clear_tally_counters
(
long
ioaddr
);
static
inline
void
clear_tally_counters
(
long
ioaddr
);
static
void
wait_for_reset
(
struct
net_device
*
dev
,
char
*
name
)
static
void
wait_for_reset
(
struct
net_device
*
dev
,
int
chip_id
,
char
*
name
)
{
{
struct
netdev_private
*
np
=
dev
->
priv
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
chip_id
=
np
->
chip_id
;
int
i
;
int
i
;
/*
3043
may need long delay after reset (dlink) */
/*
VT86C100A
may need long delay after reset (dlink) */
if
(
chip_id
==
VT
3043
||
chip_id
==
VT
86C100A
)
if
(
chip_id
==
VT86C100A
)
udelay
(
100
);
udelay
(
100
);
i
=
0
;
i
=
0
;
...
@@ -538,11 +547,11 @@ static void wait_for_reset(struct net_device *dev, char *name)
...
@@ -538,11 +547,11 @@ static void wait_for_reset(struct net_device *dev, char *name)
static
void
__devinit
enable_mmio
(
long
ioaddr
,
int
chip_id
)
static
void
__devinit
enable_mmio
(
long
ioaddr
,
int
chip_id
)
{
{
int
n
;
int
n
;
if
(
chip_id
==
VT
3043
||
chip_id
==
VT
86C100A
)
{
if
(
chip_id
==
VT86C100A
)
{
/* More recent docs say that this bit is reserved ... */
/* More recent docs say that this bit is reserved ... */
n
=
inb
(
ioaddr
+
ConfigA
)
|
0x20
;
n
=
inb
(
ioaddr
+
ConfigA
)
|
0x20
;
outb
(
n
,
ioaddr
+
ConfigA
);
outb
(
n
,
ioaddr
+
ConfigA
);
}
else
if
(
chip_id
==
VT6102
)
{
}
else
{
n
=
inb
(
ioaddr
+
ConfigD
)
|
0x80
;
n
=
inb
(
ioaddr
+
ConfigD
)
|
0x80
;
outb
(
n
,
ioaddr
+
ConfigD
);
outb
(
n
,
ioaddr
+
ConfigD
);
}
}
...
@@ -666,7 +675,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
...
@@ -666,7 +675,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
writew
(
CmdReset
,
ioaddr
+
ChipCmd
);
writew
(
CmdReset
,
ioaddr
+
ChipCmd
);
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
wait_for_reset
(
dev
,
shortname
);
wait_for_reset
(
dev
,
chip_id
,
shortname
);
/* Reload the station address from the EEPROM. */
/* Reload the station address from the EEPROM. */
#ifdef USE_IO
#ifdef USE_IO
...
@@ -787,7 +796,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
...
@@ -787,7 +796,7 @@ static int __devinit via_rhine_init_one (struct pci_dev *pdev,
(
option
&
0x300
?
100
:
10
),
(
option
&
0x300
?
100
:
10
),
(
option
&
0x220
?
"full"
:
"half"
));
(
option
&
0x220
?
"full"
:
"half"
));
if
(
np
->
mii_cnt
)
if
(
np
->
mii_cnt
)
mdio_write
(
dev
,
np
->
phys
[
0
],
0
,
mdio_write
(
dev
,
np
->
phys
[
0
],
MII_BMCR
,
((
option
&
0x300
)
?
0x2000
:
0
)
|
/* 100mbps? */
((
option
&
0x300
)
?
0x2000
:
0
)
|
/* 100mbps? */
((
option
&
0x220
)
?
0x0100
:
0
));
/* Full duplex? */
((
option
&
0x220
)
?
0x0100
:
0
));
/* Full duplex? */
}
}
...
@@ -971,9 +980,9 @@ static void init_registers(struct net_device *dev)
...
@@ -971,9 +980,9 @@ static void init_registers(struct net_device *dev)
writeb
(
dev
->
dev_addr
[
i
],
ioaddr
+
StationAddr
+
i
);
writeb
(
dev
->
dev_addr
[
i
],
ioaddr
+
StationAddr
+
i
);
/* Initialize other registers. */
/* Initialize other registers. */
writew
(
0x0006
,
ioaddr
+
PCIBusConfig
);
/*
Tune configuration???
*/
writew
(
0x0006
,
ioaddr
+
PCIBusConfig
);
/*
Store & forward
*/
/* Configure
the
FIFO thresholds. */
/* Configure
initial
FIFO thresholds. */
writeb
(
0x20
,
ioaddr
+
TxConfig
);
/* Initial threshold 32 bytes */
writeb
(
0x20
,
ioaddr
+
TxConfig
);
np
->
tx_thresh
=
0x20
;
np
->
tx_thresh
=
0x20
;
np
->
rx_thresh
=
0x60
;
/* Written in via_rhine_set_rx_mode(). */
np
->
rx_thresh
=
0x60
;
/* Written in via_rhine_set_rx_mode(). */
...
@@ -1032,13 +1041,13 @@ static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value
...
@@ -1032,13 +1041,13 @@ static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value
if
(
phy_id
==
np
->
phys
[
0
])
{
if
(
phy_id
==
np
->
phys
[
0
])
{
switch
(
regnum
)
{
switch
(
regnum
)
{
case
0
:
/* Is user forcing speed/duplex? */
case
MII_BMCR
:
/* Is user forcing speed/duplex? */
if
(
value
&
0x9000
)
/* Autonegotiation. */
if
(
value
&
0x9000
)
/* Autonegotiation. */
np
->
mii_if
.
duplex_lock
=
0
;
np
->
mii_if
.
duplex_lock
=
0
;
else
else
np
->
mii_if
.
full_duplex
=
(
value
&
0x0100
)
?
1
:
0
;
np
->
mii_if
.
full_duplex
=
(
value
&
0x0100
)
?
1
:
0
;
break
;
break
;
case
4
:
case
MII_ADVERTISE
:
np
->
mii_if
.
advertising
=
value
;
np
->
mii_if
.
advertising
=
value
;
break
;
break
;
}
}
...
@@ -1077,7 +1086,7 @@ static int via_rhine_open(struct net_device *dev)
...
@@ -1077,7 +1086,7 @@ static int via_rhine_open(struct net_device *dev)
return
i
;
return
i
;
alloc_rbufs
(
dev
);
alloc_rbufs
(
dev
);
alloc_tbufs
(
dev
);
alloc_tbufs
(
dev
);
wait_for_reset
(
dev
,
dev
->
name
);
wait_for_reset
(
dev
,
np
->
chip_id
,
dev
->
name
);
init_registers
(
dev
);
init_registers
(
dev
);
if
(
debug
>
2
)
if
(
debug
>
2
)
printk
(
KERN_DEBUG
"%s: Done via_rhine_open(), status %4.4x "
printk
(
KERN_DEBUG
"%s: Done via_rhine_open(), status %4.4x "
...
@@ -1184,7 +1193,7 @@ static void via_rhine_tx_timeout (struct net_device *dev)
...
@@ -1184,7 +1193,7 @@ static void via_rhine_tx_timeout (struct net_device *dev)
alloc_rbufs
(
dev
);
alloc_rbufs
(
dev
);
/* Reinitialize the hardware. */
/* Reinitialize the hardware. */
wait_for_reset
(
dev
,
dev
->
name
);
wait_for_reset
(
dev
,
np
->
chip_id
,
dev
->
name
);
init_registers
(
dev
);
init_registers
(
dev
);
spin_unlock
(
&
np
->
lock
);
spin_unlock
(
&
np
->
lock
);
...
@@ -1254,7 +1263,7 @@ static int via_rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
...
@@ -1254,7 +1263,7 @@ static int via_rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
if
(
debug
>
4
)
{
if
(
debug
>
4
)
{
printk
(
KERN_DEBUG
"%s: Transmit frame #%d queued in slot %d.
\n
"
,
printk
(
KERN_DEBUG
"%s: Transmit frame #%d queued in slot %d.
\n
"
,
dev
->
name
,
np
->
cur_tx
,
entry
);
dev
->
name
,
np
->
cur_tx
-
1
,
entry
);
}
}
return
0
;
return
0
;
}
}
...
@@ -1505,8 +1514,8 @@ static void via_rhine_error(struct net_device *dev, int intr_status)
...
@@ -1505,8 +1514,8 @@ static void via_rhine_error(struct net_device *dev, int intr_status)
printk
(
KERN_INFO
"%s: Transmitter underrun, increasing Tx "
printk
(
KERN_INFO
"%s: Transmitter underrun, increasing Tx "
"threshold setting to %2.2x.
\n
"
,
dev
->
name
,
np
->
tx_thresh
);
"threshold setting to %2.2x.
\n
"
,
dev
->
name
,
np
->
tx_thresh
);
}
}
if
(
(
intr_status
&
~
(
IntrLinkChange
|
IntrStatsMax
|
if
(
intr_status
&
~
(
IntrLinkChange
|
IntrStatsMax
|
IntrTxAbort
|
IntrTxAborted
)
))
{
IntrTxAbort
|
IntrTxAborted
|
IntrNormalSummary
))
{
if
(
debug
>
1
)
if
(
debug
>
1
)
printk
(
KERN_ERR
"%s: Something Wicked happened! %4.4x.
\n
"
,
printk
(
KERN_ERR
"%s: Something Wicked happened! %4.4x.
\n
"
,
dev
->
name
,
intr_status
);
dev
->
name
,
intr_status
);
...
...
drivers/net/wan/pc300_drv.c
View file @
096cbcc6
...
@@ -6,7 +6,7 @@ static char rcsid[] =
...
@@ -6,7 +6,7 @@ static char rcsid[] =
* pc300.c Cyclades-PC300(tm) Driver.
* pc300.c Cyclades-PC300(tm) Driver.
*
*
* Author: Ivan Passos <ivan@cyclades.com>
* Author: Ivan Passos <ivan@cyclades.com>
* Maintainer:
Daniela Squassoni <daniela
@cyclades.com>
* Maintainer:
Henrique Gobbi <henrique
@cyclades.com>
*
*
* Copyright: (c) 1999-2002 Cyclades Corp.
* Copyright: (c) 1999-2002 Cyclades Corp.
*
*
...
...
drivers/net/wan/pc300_tty.c
View file @
096cbcc6
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/
malloc
.h>
#include <linux/
slab
.h>
#include <linux/if.h>
#include <linux/if.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
...
include/net/iw_handler.h
View file @
096cbcc6
...
@@ -245,7 +245,8 @@
...
@@ -245,7 +245,8 @@
/* Wrapper level flags */
/* Wrapper level flags */
#define IW_DESCR_FLAG_DUMP 0x0001
/* Not part of the dump command */
#define IW_DESCR_FLAG_DUMP 0x0001
/* Not part of the dump command */
#define IW_DESCR_FLAG_EVENT 0x0002
/* Generate an event on SET */
#define IW_DESCR_FLAG_EVENT 0x0002
/* Generate an event on SET */
#define IW_DESCR_FLAG_RESTRICT 0x0004
/* GET request is ROOT only */
#define IW_DESCR_FLAG_RESTRICT 0x0004
/* GET : request is ROOT only */
/* SET : Omit payload from generated iwevent */
/* Driver level flags */
/* Driver level flags */
#define IW_DESCR_FLAG_WAIT 0x0100
/* Wait for driver event */
#define IW_DESCR_FLAG_WAIT 0x0100
/* Wait for driver event */
...
...
net/core/wireless.c
View file @
096cbcc6
...
@@ -28,11 +28,13 @@
...
@@ -28,11 +28,13 @@
*
*
* v3 - 19.12.01 - Jean II
* v3 - 19.12.01 - Jean II
* o Make sure we don't go out of standard_ioctl[] in ioctl_standard_call
* o Make sure we don't go out of standard_ioctl[] in ioctl_standard_call
* o Fix /proc/net/wireless to handle __u8 to __s8 change in iwqual
* o Add event dispatcher function
* o Add event dispatcher function
* o Add event description
* o Add event description
* o Propagate events as rtnetlink IFLA_WIRELESS option
* o Propagate events as rtnetlink IFLA_WIRELESS option
* o Generate event on selected SET requests
* o Generate event on selected SET requests
*
* v4 - 18.04.01 - Jean II
* o Fix stupid off by one in iw_ioctl_description : IW_ESSID_MAX_SIZE + 1
*/
*/
/***************************** INCLUDES *****************************/
/***************************** INCLUDES *****************************/
...
@@ -122,13 +124,13 @@ static const struct iw_ioctl_description standard_ioctl[] = {
...
@@ -122,13 +124,13 @@ static const struct iw_ioctl_description standard_ioctl[] = {
/* SIOCGIWSCAN */
/* SIOCGIWSCAN */
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_SCAN_MAX_DATA
,
0
},
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_SCAN_MAX_DATA
,
0
},
/* SIOCSIWESSID */
/* SIOCSIWESSID */
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
,
IW_DESCR_FLAG_EVENT
},
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
+
1
,
IW_DESCR_FLAG_EVENT
},
/* SIOCGIWESSID */
/* SIOCGIWESSID */
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
,
IW_DESCR_FLAG_DUMP
},
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
+
1
,
IW_DESCR_FLAG_DUMP
},
/* SIOCSIWNICKN */
/* SIOCSIWNICKN */
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
,
0
},
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
+
1
,
0
},
/* SIOCGIWNICKN */
/* SIOCGIWNICKN */
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
,
0
},
{
IW_HEADER_TYPE_POINT
,
0
,
1
,
0
,
IW_ESSID_MAX_SIZE
+
1
,
0
},
/* -- hole -- */
/* -- hole -- */
{
IW_HEADER_TYPE_NULL
,
0
,
0
,
0
,
0
,
0
},
{
IW_HEADER_TYPE_NULL
,
0
,
0
,
0
,
0
,
0
},
/* -- hole -- */
/* -- hole -- */
...
...
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