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
06dd43c4
Commit
06dd43c4
authored
Jul 10, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
293a4f60
aaca1f4f
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
128 additions
and
226 deletions
+128
-226
drivers/net/appletalk/cops.c
drivers/net/appletalk/cops.c
+3
-2
drivers/net/appletalk/ltpc.c
drivers/net/appletalk/ltpc.c
+3
-2
drivers/net/declance.c
drivers/net/declance.c
+1
-1
drivers/net/dgrs.c
drivers/net/dgrs.c
+13
-14
drivers/net/e100/e100_main.c
drivers/net/e100/e100_main.c
+12
-20
drivers/net/e100/e100_phy.c
drivers/net/e100/e100_phy.c
+1
-1
drivers/net/hamradio/mkiss.c
drivers/net/hamradio/mkiss.c
+25
-110
drivers/net/hamradio/mkiss.h
drivers/net/hamradio/mkiss.h
+0
-2
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c574_cs.c
+1
-1
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/3c589_cs.c
+1
-1
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/smc91c92_cs.c
+1
-1
drivers/net/plip.c
drivers/net/plip.c
+44
-52
drivers/net/sb1250-mac.c
drivers/net/sb1250-mac.c
+1
-1
drivers/net/sk_mca.c
drivers/net/sk_mca.c
+1
-1
drivers/net/sundance.c
drivers/net/sundance.c
+8
-2
drivers/net/tg3.c
drivers/net/tg3.c
+2
-3
drivers/net/tokenring/3c359.c
drivers/net/tokenring/3c359.c
+1
-1
drivers/net/tokenring/proteon.c
drivers/net/tokenring/proteon.c
+0
-1
drivers/net/tokenring/skisa.c
drivers/net/tokenring/skisa.c
+0
-1
drivers/net/via-rhine.c
drivers/net/via-rhine.c
+1
-1
drivers/net/wireless/atmel_cs.c
drivers/net/wireless/atmel_cs.c
+5
-6
drivers/net/wireless/wavelan.c
drivers/net/wireless/wavelan.c
+4
-2
No files found.
drivers/net/appletalk/cops.c
View file @
06dd43c4
...
...
@@ -424,7 +424,7 @@ static int cops_open(struct net_device *dev)
init_timer
(
&
cops_timer
);
cops_timer
.
function
=
cops_poll
;
cops_timer
.
data
=
(
unsigned
long
)
dev
;
cops_timer
.
expires
=
jiffies
+
5
;
cops_timer
.
expires
=
jiffies
+
HZ
/
20
;
add_timer
(
&
cops_timer
);
}
else
...
...
@@ -700,7 +700,8 @@ static void cops_poll(unsigned long ltdev)
status
=
inb
(
ioaddr
+
TANG_CARD_STATUS
);
}
while
((
++
boguscount
<
20
)
&&
(
status
&
(
TANG_RX_READY
|
TANG_TX_READY
)));
cops_timer
.
expires
=
jiffies
+
5
;
/* poll 20 times per second */
cops_timer
.
expires
=
jiffies
+
HZ
/
20
;
add_timer
(
&
cops_timer
);
return
;
...
...
drivers/net/appletalk/ltpc.c
View file @
06dd43c4
...
...
@@ -926,8 +926,9 @@ static void ltpc_poll(unsigned long l)
if
(
!
dev
)
return
;
/* we've been downed */
/* poll 20 times per second */
idle
(
dev
);
ltpc_timer
.
expires
=
jiffies
+
5
;
ltpc_timer
.
expires
=
jiffies
+
HZ
/
20
;
add_timer
(
&
ltpc_timer
);
}
...
...
@@ -1217,7 +1218,7 @@ int __init ltpc_probe(struct net_device *dev)
ltpc_timer
.
function
=
ltpc_poll
;
ltpc_timer
.
data
=
(
unsigned
long
)
dev
;
ltpc_timer
.
expires
=
jiffies
+
5
;
ltpc_timer
.
expires
=
jiffies
+
HZ
/
20
;
add_timer
(
&
ltpc_timer
);
}
...
...
drivers/net/declance.c
View file @
06dd43c4
...
...
@@ -992,7 +992,7 @@ static void lance_set_multicast(struct net_device *dev)
return
;
if
(
lp
->
tx_old
!=
lp
->
tx_new
)
{
mod_timer
(
&
lp
->
multicast_timer
,
jiffies
+
4
);
mod_timer
(
&
lp
->
multicast_timer
,
jiffies
+
4
*
HZ
/
100
);
netif_wake_queue
(
dev
);
return
;
}
...
...
drivers/net/dgrs.c
View file @
06dd43c4
...
...
@@ -1252,18 +1252,12 @@ dgrs_found_device(
{
DGRS_PRIV
*
priv
;
struct
net_device
*
dev
,
*
aux
;
/* Allocate and fill new device structure. */
int
dev_size
=
sizeof
(
struct
net_device
)
+
sizeof
(
DGRS_PRIV
);
int
i
,
ret
;
dev
=
(
struct
net_device
*
)
kmalloc
(
dev_size
,
GFP_KERNEL
);
dev
=
alloc_etherdev
(
sizeof
(
DGRS_PRIV
));
if
(
!
dev
)
return
-
ENOMEM
;
memset
(
dev
,
0
,
dev_size
);
dev
->
priv
=
((
void
*
)
dev
)
+
sizeof
(
struct
net_device
);
priv
=
(
DGRS_PRIV
*
)
dev
->
priv
;
dev
->
base_addr
=
io
;
...
...
@@ -1279,7 +1273,7 @@ dgrs_found_device(
dev
->
init
=
dgrs_probe1
;
SET_MODULE_OWNER
(
dev
);
ether_setup
(
dev
);
if
(
register_netdev
(
dev
)
!=
0
)
{
kfree
(
dev
);
return
-
EIO
;
...
...
@@ -1302,15 +1296,18 @@ dgrs_found_device(
struct
net_device
*
devN
;
DGRS_PRIV
*
privN
;
/* Allocate new dev and priv structures */
devN
=
(
struct
net_device
*
)
kmalloc
(
dev_size
,
GFP_KERNEL
);
/* Make it an exact copy of dev[0]... */
devN
=
alloc_etherdev
(
sizeof
(
DGRS_PRIV
));
ret
=
-
ENOMEM
;
if
(
!
devN
)
goto
fail
;
memcpy
(
devN
,
dev
,
dev_size
);
memset
(
devN
->
name
,
0
,
sizeof
(
devN
->
name
));
devN
->
priv
=
((
void
*
)
devN
)
+
sizeof
(
struct
net_device
);
/* Make it an exact copy of dev[0]... */
*
devN
=
*
dev
;
/* copy the priv structure of dev[0] */
privN
=
(
DGRS_PRIV
*
)
devN
->
priv
;
*
privN
=
*
priv
;
/* ... and zero out VM areas */
privN
->
vmem
=
0
;
privN
->
vplxdma
=
0
;
...
...
@@ -1318,9 +1315,11 @@ dgrs_found_device(
devN
->
irq
=
0
;
/* ... and base MAC address off address of 1st port */
devN
->
dev_addr
[
5
]
+=
i
;
/* ... choose a new name */
strncpy
(
devN
->
name
,
"eth%d"
,
IFNAMSIZ
);
devN
->
init
=
dgrs_initclone
;
SET_MODULE_OWNER
(
devN
);
ether_setup
(
devN
);
ret
=
-
EIO
;
if
(
register_netdev
(
devN
))
{
kfree
(
devN
);
...
...
drivers/net/e100/e100_main.c
View file @
06dd43c4
...
...
@@ -45,6 +45,13 @@
**********************************************************************/
/* Change Log
*
* 2.3.18 07/08/03
* o Bug fix: read skb->len after freeing skb
* [Andrew Morton] akpm@zip.com.au
* o Bug fix: 82557 (with National PHY) timeout during init
* [Adam Kropelin] akropel1@rochester.rr.com
* o Feature add: allow to change Wake On LAN when EEPROM disabled
*
* 2.3.13 05/08/03
* o Feature remove: /proc/net/PRO_LAN_Adapters support gone completely
...
...
@@ -65,20 +72,6 @@
* o Bug fix: statistic command failure would stop statistic collection.
*
* 2.2.21 02/11/03
* o Removed marketing brand strings. Instead, Using generic string
* "Intel(R) PRO/100 Network Connection" for all adapters.
* o Implemented ethtool -S option
* o Strip /proc/net/PRO_LAN_Adapters files for kernel driver
* o Bug fix: Read wrong byte in EEPROM when offset is odd number
* o Bug fix: PHY loopback test fails on ICH devices
* o Bug fix: System panic on e100_close when repeating Hot Remove and
* Add in a team
* o Bug fix: Linux Bonding driver claims adapter's link loss because of
* not updating last_rx field
* o Bug fix: e100 does not check validity of MAC address
* o New feature: added ICH5 support
*
* 2.1.27 11/20/02
*/
#include <linux/config.h>
...
...
@@ -144,7 +137,7 @@ static void e100_non_tx_background(unsigned long);
static
inline
void
e100_tx_skb_free
(
struct
e100_private
*
bdp
,
tcb_t
*
tcb
);
/* Global Data structures and variables */
char
e100_copyright
[]
__devinitdata
=
"Copyright (c) 2003 Intel Corporation"
;
char
e100_driver_version
[]
=
"2.3.1
3
-k1"
;
char
e100_driver_version
[]
=
"2.3.1
8
-k1"
;
const
char
*
e100_full_driver_name
=
"Intel(R) PRO/100 Network Driver"
;
char
e100_short_driver_name
[]
=
"e100"
;
static
int
e100nics
=
0
;
...
...
@@ -689,17 +682,16 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
bdp
->
wolsupported
=
0
;
bdp
->
wolopts
=
0
;
if
(
bdp
->
rev_id
>=
D101A4_REV_ID
)
bdp
->
wolsupported
=
WAKE_PHY
|
WAKE_MAGIC
;
if
(
bdp
->
rev_id
>=
D101MA_REV_ID
)
bdp
->
wolsupported
|=
WAKE_UCAST
|
WAKE_ARP
;
/* Check if WoL is enabled on EEPROM */
if
(
e100_eeprom_read
(
bdp
,
EEPROM_ID_WORD
)
&
BIT_5
)
{
/* Magic Packet WoL is enabled on device by default */
/* if EEPROM WoL bit is TRUE */
bdp
->
wolsupported
=
WAKE_MAGIC
;
bdp
->
wolopts
=
WAKE_MAGIC
;
if
(
bdp
->
rev_id
>=
D101A4_REV_ID
)
bdp
->
wolsupported
=
WAKE_PHY
|
WAKE_MAGIC
;
if
(
bdp
->
rev_id
>=
D101MA_REV_ID
)
bdp
->
wolsupported
|=
WAKE_UCAST
|
WAKE_ARP
;
}
printk
(
KERN_NOTICE
"
\n
"
);
...
...
drivers/net/e100/e100_phy.c
View file @
06dd43c4
...
...
@@ -919,6 +919,7 @@ e100_phy_reset(struct e100_private *bdp)
unsigned
char
__devinit
e100_phy_init
(
struct
e100_private
*
bdp
)
{
e100_phy_reset
(
bdp
);
e100_phy_address_detect
(
bdp
);
e100_phy_isolate
(
bdp
);
e100_phy_id_detect
(
bdp
);
...
...
@@ -930,7 +931,6 @@ e100_phy_init(struct e100_private *bdp)
bdp
->
PhyDelay
=
0
;
bdp
->
zlock_state
=
ZLOCK_INITIAL
;
e100_phy_reset
(
bdp
);
e100_phy_set_speed_duplex
(
bdp
,
false
);
e100_fix_polarity
(
bdp
);
...
...
drivers/net/hamradio/mkiss.c
View file @
06dd43c4
...
...
@@ -22,6 +22,8 @@
* Matthias (DG2FEF) Added support for FlexNet CRC (on special request)
* Fixed bug in ax25_close(): dev_lock_wait() was
* called twice, causing a deadlock.
* Jeroen (PE1RXQ) Removed old MKISS_MAGIC stuff and calls to
* MOD_*_USE_COUNT
*/
#include <linux/config.h>
...
...
@@ -55,15 +57,6 @@
static
char
banner
[]
__initdata
=
KERN_INFO
"mkiss: AX.25 Multikiss, Hans Albas PE1AYX
\n
"
;
#define NR_MKISS 4
#define MKISS_SERIAL_TYPE_NORMAL 1
struct
mkiss_channel
{
int
magic
;
/* magic word */
int
init
;
/* channel exists? */
struct
tty_struct
*
tty
;
/* link to tty control structure */
};
typedef
struct
ax25_ctrl
{
struct
ax_disp
ctrl
;
/* */
struct
net_device
dev
;
/* the device */
...
...
@@ -310,19 +303,11 @@ static inline void ax_unlock(struct ax_disp *ax)
/* Send one completely decapsulated AX.25 packet to the AX.25 layer. */
static
void
ax_bump
(
struct
ax_disp
*
ax
)
{
struct
ax_disp
*
tmp_ax
;
struct
sk_buff
*
skb
;
struct
mkiss_channel
*
mkiss
;
int
count
;
tmp_ax
=
ax
;
if
(
ax
->
rbuff
[
0
]
>
0x0f
)
{
if
(
ax
->
mkiss
!=
NULL
)
{
mkiss
=
ax
->
mkiss
->
tty
->
driver_data
;
if
(
mkiss
->
magic
==
MKISS_DRIVER_MAGIC
)
tmp_ax
=
ax
->
mkiss
;
}
else
if
(
ax
->
rbuff
[
0
]
&
0x20
)
{
if
(
ax
->
rbuff
[
0
]
&
0x20
)
{
ax
->
crcmode
=
CRC_MODE_FLEX
;
if
(
check_crc_flex
(
ax
->
rbuff
,
ax
->
rcount
)
<
0
)
{
ax
->
rx_errors
++
;
...
...
@@ -346,14 +331,14 @@ static void ax_bump(struct ax_disp *ax)
return
;
}
skb
->
dev
=
tmp_
ax
->
dev
;
skb
->
dev
=
ax
->
dev
;
memcpy
(
skb_put
(
skb
,
count
),
ax
->
rbuff
,
count
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
protocol
=
htons
(
ETH_P_AX25
);
netif_rx
(
skb
);
tmp_
ax
->
dev
->
last_rx
=
jiffies
;
tmp_
ax
->
rx_packets
++
;
tmp_
ax
->
rx_bytes
+=
count
;
ax
->
dev
->
last_rx
=
jiffies
;
ax
->
rx_packets
++
;
ax
->
rx_bytes
+=
count
;
}
/* Encapsulate one AX.25 packet and stuff into a TTY queue. */
...
...
@@ -361,7 +346,6 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
{
unsigned
char
*
p
;
int
actual
,
count
;
struct
mkiss_channel
*
mkiss
=
ax
->
tty
->
driver_data
;
if
(
ax
->
mtu
!=
ax
->
dev
->
mtu
+
73
)
/* Someone has been ifconfigging */
ax_changedmtu
(
ax
);
...
...
@@ -376,37 +360,26 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
p
=
icp
;
if
(
mkiss
->
magic
!=
MKISS_DRIVER_MAGIC
)
{
switch
(
ax
->
crcmode
)
{
unsigned
short
crc
;
switch
(
ax
->
crcmode
)
{
unsigned
short
crc
;
case
CRC_MODE_FLEX
:
*
p
|=
0x20
;
crc
=
calc_crc_flex
(
p
,
len
);
count
=
kiss_esc_crc
(
p
,
(
unsigned
char
*
)
ax
->
xbuff
,
crc
,
len
+
2
);
break
;
case
CRC_MODE_FLEX
:
*
p
|=
0x20
;
crc
=
calc_crc_flex
(
p
,
len
);
count
=
kiss_esc_crc
(
p
,
(
unsigned
char
*
)
ax
->
xbuff
,
crc
,
len
+
2
);
break
;
default:
count
=
kiss_esc
(
p
,
(
unsigned
char
*
)
ax
->
xbuff
,
len
);
break
;
}
ax
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
actual
=
ax
->
tty
->
driver
->
write
(
ax
->
tty
,
0
,
ax
->
xbuff
,
count
);
ax
->
tx_packets
++
;
ax
->
tx_bytes
+=
actual
;
ax
->
dev
->
trans_start
=
jiffies
;
ax
->
xleft
=
count
-
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
}
else
{
count
=
kiss_esc
(
p
,
(
unsigned
char
*
)
ax
->
mkiss
->
xbuff
,
len
);
ax
->
mkiss
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
actual
=
ax
->
mkiss
->
tty
->
driver
->
write
(
ax
->
mkiss
->
tty
,
0
,
ax
->
mkiss
->
xbuff
,
count
);
ax
->
tx_packets
++
;
ax
->
tx_bytes
+=
actual
;
ax
->
mkiss
->
dev
->
trans_start
=
jiffies
;
ax
->
mkiss
->
xleft
=
count
-
actual
;
ax
->
mkiss
->
xhead
=
ax
->
mkiss
->
xbuff
+
actual
;
default:
count
=
kiss_esc
(
p
,
(
unsigned
char
*
)
ax
->
xbuff
,
len
);
break
;
}
ax
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
actual
=
ax
->
tty
->
driver
->
write
(
ax
->
tty
,
0
,
ax
->
xbuff
,
count
);
ax
->
tx_packets
++
;
ax
->
tx_bytes
+=
actual
;
ax
->
dev
->
trans_start
=
jiffies
;
ax
->
xleft
=
count
-
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
}
/*
...
...
@@ -417,7 +390,6 @@ static void ax25_write_wakeup(struct tty_struct *tty)
{
int
actual
;
struct
ax_disp
*
ax
=
(
struct
ax_disp
*
)
tty
->
disc_data
;
struct
mkiss_channel
*
mkiss
;
/* First make sure we're connected. */
if
(
ax
==
NULL
||
ax
->
magic
!=
AX25_MAGIC
||
!
netif_running
(
ax
->
dev
))
...
...
@@ -428,12 +400,6 @@ static void ax25_write_wakeup(struct tty_struct *tty)
*/
tty
->
flags
&=
~
(
1
<<
TTY_DO_WRITE_WAKEUP
);
if
(
ax
->
mkiss
!=
NULL
)
{
mkiss
=
ax
->
mkiss
->
tty
->
driver_data
;
if
(
mkiss
->
magic
==
MKISS_DRIVER_MAGIC
)
ax_unlock
(
ax
->
mkiss
);
}
netif_wake_queue
(
ax
->
dev
);
return
;
}
...
...
@@ -447,32 +413,12 @@ static void ax25_write_wakeup(struct tty_struct *tty)
static
int
ax_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
ax_disp
*
ax
=
(
struct
ax_disp
*
)
dev
->
priv
;
struct
mkiss_channel
*
mkiss
=
ax
->
tty
->
driver_data
;
struct
ax_disp
*
tmp_ax
;
tmp_ax
=
NULL
;
if
(
mkiss
->
magic
==
MKISS_DRIVER_MAGIC
)
{
if
(
skb
->
data
[
0
]
<
0x10
)
skb
->
data
[
0
]
=
skb
->
data
[
0
]
+
0x10
;
tmp_ax
=
ax
->
mkiss
;
}
if
(
!
netif_running
(
dev
))
{
printk
(
KERN_ERR
"mkiss: %s: xmit call when iface is down
\n
"
,
dev
->
name
);
return
1
;
}
if
(
tmp_ax
!=
NULL
)
if
(
netif_queue_stopped
(
tmp_ax
->
dev
))
return
1
;
if
(
tmp_ax
!=
NULL
)
if
(
netif_queue_stopped
(
dev
))
{
printk
(
KERN_ERR
"mkiss: dev busy while serial dev is free
\n
"
);
ax_unlock
(
ax
);
}
if
(
netif_queue_stopped
(
dev
))
{
/*
* May be we must check transmitter timeout here ?
...
...
@@ -495,8 +441,6 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
/* We were not busy, so we are now... :-) */
if
(
skb
!=
NULL
)
{
ax_lock
(
ax
);
if
(
tmp_ax
!=
NULL
)
ax_lock
(
tmp_ax
);
ax_encaps
(
ax
,
skb
->
data
,
skb
->
len
);
kfree_skb
(
skb
);
}
...
...
@@ -634,9 +578,7 @@ static void ax25_receive_buf(struct tty_struct *tty, const unsigned char *cp, ch
static
int
ax25_open
(
struct
tty_struct
*
tty
)
{
struct
ax_disp
*
ax
=
(
struct
ax_disp
*
)
tty
->
disc_data
;
struct
ax_disp
*
tmp_ax
;
struct
mkiss_channel
*
mkiss
;
int
err
,
cnt
;
int
err
;
/* First make sure we're not already connected. */
if
(
ax
&&
ax
->
magic
==
AX25_MAGIC
)
...
...
@@ -649,9 +591,6 @@ static int ax25_open(struct tty_struct *tty)
ax
->
tty
=
tty
;
tty
->
disc_data
=
ax
;
ax
->
mkiss
=
NULL
;
tmp_ax
=
NULL
;
if
(
tty
->
driver
->
flush_buffer
)
tty
->
driver
->
flush_buffer
(
tty
);
if
(
tty
->
ldisc
.
flush_buffer
)
...
...
@@ -664,29 +603,6 @@ static int ax25_open(struct tty_struct *tty)
if
((
err
=
ax_open
(
ax
->
dev
)))
return
err
;
mkiss
=
ax
->
tty
->
driver_data
;
if
(
mkiss
->
magic
==
MKISS_DRIVER_MAGIC
)
{
for
(
cnt
=
1
;
cnt
<
ax25_maxdev
;
cnt
++
)
{
if
(
ax25_ctrls
[
cnt
])
{
if
(
netif_running
(
&
ax25_ctrls
[
cnt
]
->
dev
))
{
if
(
ax
==
&
ax25_ctrls
[
cnt
]
->
ctrl
)
{
cnt
--
;
tmp_ax
=
&
ax25_ctrls
[
cnt
]
->
ctrl
;
break
;
}
}
}
}
}
if
(
tmp_ax
!=
NULL
)
{
ax
->
mkiss
=
tmp_ax
;
tmp_ax
->
mkiss
=
ax
;
}
MOD_INC_USE_COUNT
;
/* Done. We have linked the TTY line to a channel. */
return
ax
->
dev
->
base_addr
;
}
...
...
@@ -705,7 +621,6 @@ static void ax25_close(struct tty_struct *tty)
ax
->
tty
=
NULL
;
ax_free
(
ax
);
MOD_DEC_USE_COUNT
;
}
...
...
drivers/net/hamradio/mkiss.h
View file @
06dd43c4
...
...
@@ -19,7 +19,6 @@ struct ax_disp {
/* Various fields. */
struct
tty_struct
*
tty
;
/* ptr to TTY structure */
struct
net_device
*
dev
;
/* easy for intr handling */
struct
ax_disp
*
mkiss
;
/* mkiss txport if mkiss channel*/
/* These are pointers to the malloc()ed frame buffers. */
unsigned
char
*
rbuff
;
/* receiver buffer */
...
...
@@ -60,4 +59,3 @@ struct ax_disp {
};
#define AX25_MAGIC 0x5316
#define MKISS_DRIVER_MAGIC 1215
drivers/net/pcmcia/3c574_cs.c
View file @
06dd43c4
...
...
@@ -1048,7 +1048,7 @@ static void media_check(unsigned long arg)
}
if
(
lp
->
fast_poll
)
{
lp
->
fast_poll
--
;
lp
->
media
.
expires
=
jiffies
+
2
;
lp
->
media
.
expires
=
jiffies
+
2
*
HZ
/
100
;
add_timer
(
&
lp
->
media
);
return
;
}
...
...
drivers/net/pcmcia/3c589_cs.c
View file @
06dd43c4
...
...
@@ -921,7 +921,7 @@ static void media_check(unsigned long arg)
}
if
(
lp
->
fast_poll
)
{
lp
->
fast_poll
--
;
lp
->
media
.
expires
=
jiffies
+
1
;
lp
->
media
.
expires
=
jiffies
+
HZ
/
100
;
add_timer
(
&
lp
->
media
);
return
;
}
...
...
drivers/net/pcmcia/smc91c92_cs.c
View file @
06dd43c4
...
...
@@ -1996,7 +1996,7 @@ static void media_check(u_long arg)
}
if
(
smc
->
fast_poll
)
{
smc
->
fast_poll
--
;
smc
->
media
.
expires
=
jiffies
+
1
;
smc
->
media
.
expires
=
jiffies
+
HZ
/
100
;
add_timer
(
&
smc
->
media
);
SMC_SELECT_BANK
(
saved_bank
);
return
;
...
...
drivers/net/plip.c
View file @
06dd43c4
...
...
@@ -277,27 +277,10 @@ inline static unsigned char read_status (struct net_device *dev)
then calls us here.
*/
int
__ini
t
plip_init_
dev
(
struct
net_device
*
dev
,
struct
parport
*
pb
)
static
in
t
plip_init_
netdev
(
struct
net_device
*
dev
)
{
struct
net_local
*
nl
;
struct
pardevice
*
pardev
;
SET_MODULE_OWNER
(
dev
);
dev
->
irq
=
pb
->
irq
;
dev
->
base_addr
=
pb
->
base
;
if
(
pb
->
irq
==
-
1
)
{
printk
(
KERN_INFO
"plip: %s has no IRQ. Using IRQ-less mode,"
"which is fairly inefficient!
\n
"
,
pb
->
name
);
}
pardev
=
parport_register_device
(
pb
,
dev
->
name
,
plip_preempt
,
plip_wakeup
,
plip_interrupt
,
0
,
dev
);
if
(
!
pardev
)
return
-
ENODEV
;
struct
net_local
*
nl
=
dev
->
priv
;
printk
(
KERN_INFO
"%s"
,
version
);
if
(
dev
->
irq
!=
-
1
)
...
...
@@ -307,9 +290,6 @@ plip_init_dev(struct net_device *dev, struct parport *pb)
printk
(
KERN_INFO
"%s: Parallel port at %#3lx, not using IRQ.
\n
"
,
dev
->
name
,
dev
->
base_addr
);
/* Fill in the generic fields of the device structure. */
ether_setup
(
dev
);
/* Then, override parts of it */
dev
->
hard_start_xmit
=
plip_tx_packet
;
dev
->
open
=
plip_open
;
...
...
@@ -322,22 +302,12 @@ plip_init_dev(struct net_device *dev, struct parport *pb)
memset
(
dev
->
dev_addr
,
0xfc
,
ETH_ALEN
);
/* Set the private structure */
dev
->
priv
=
kmalloc
(
sizeof
(
struct
net_local
),
GFP_KERNEL
);
if
(
dev
->
priv
==
NULL
)
{
printk
(
KERN_ERR
"%s: out of memory
\n
"
,
dev
->
name
);
parport_unregister_device
(
pardev
);
return
-
ENOMEM
;
}
memset
(
dev
->
priv
,
0
,
sizeof
(
struct
net_local
));
nl
=
(
struct
net_local
*
)
dev
->
priv
;
nl
->
orig_hard_header
=
dev
->
hard_header
;
dev
->
hard_header
=
plip_hard_header
;
nl
->
orig_hard_header_cache
=
dev
->
hard_header_cache
;
dev
->
hard_header_cache
=
plip_hard_header_cache
;
nl
->
pardev
=
pardev
;
nl
->
port_owner
=
0
;
...
...
@@ -1299,29 +1269,52 @@ plip_searchfor(int list[], int a)
* available to use. */
static
void
plip_attach
(
struct
parport
*
port
)
{
static
int
i
;
static
int
unit
;
struct
net_device
*
dev
;
struct
net_local
*
nl
;
char
name
[
IFNAMSIZ
];
if
((
parport
[
0
]
==
-
1
&&
(
!
timid
||
!
port
->
devices
))
||
plip_searchfor
(
parport
,
port
->
number
))
{
if
(
i
==
PLIP_MAX
)
{
if
(
unit
==
PLIP_MAX
)
{
printk
(
KERN_ERR
"plip: too many devices
\n
"
);
return
;
}
dev_plip
[
i
]
=
kmalloc
(
sizeof
(
struct
net_device
),
GFP_KERNEL
);
if
(
!
dev_plip
[
i
])
{
sprintf
(
name
,
"plip%d"
,
unit
);
dev
=
alloc_netdev
(
sizeof
(
struct
net_local
),
name
,
ether_setup
);
if
(
!
dev
)
{
printk
(
KERN_ERR
"plip: memory squeeze
\n
"
);
return
;
}
memset
(
dev_plip
[
i
],
0
,
sizeof
(
struct
net_device
));
sprintf
(
dev_plip
[
i
]
->
name
,
"plip%d"
,
i
);
dev_plip
[
i
]
->
priv
=
port
;
if
(
plip_init_dev
(
dev_plip
[
i
],
port
)
||
register_netdev
(
dev_plip
[
i
]))
{
kfree
(
dev_plip
[
i
]);
dev_plip
[
i
]
=
NULL
;
dev
->
init
=
plip_init_netdev
;
SET_MODULE_OWNER
(
dev
);
dev
->
irq
=
port
->
irq
;
dev
->
base_addr
=
port
->
base
;
if
(
port
->
irq
==
-
1
)
{
printk
(
KERN_INFO
"plip: %s has no IRQ. Using IRQ-less mode,"
"which is fairly inefficient!
\n
"
,
port
->
name
);
}
nl
=
dev
->
priv
;
nl
->
pardev
=
parport_register_device
(
port
,
name
,
plip_preempt
,
plip_wakeup
,
plip_interrupt
,
0
,
dev
);
if
(
!
nl
->
pardev
)
{
printk
(
KERN_ERR
"%s: parport_register failed
\n
"
,
name
);
kfree
(
dev
);
return
;
}
if
(
register_netdev
(
dev
))
{
printk
(
KERN_ERR
"%s: network register failed
\n
"
,
name
);
kfree
(
dev
);
}
else
{
i
++
;
dev_plip
[
unit
++
]
=
dev
;
}
}
}
...
...
@@ -1341,20 +1334,19 @@ static struct parport_driver plip_driver = {
static
void
__exit
plip_cleanup_module
(
void
)
{
struct
net_device
*
dev
;
int
i
;
parport_unregister_driver
(
&
plip_driver
);
for
(
i
=
0
;
i
<
PLIP_MAX
;
i
++
)
{
if
(
dev_plip
[
i
])
{
struct
net_local
*
nl
=
(
struct
net_local
*
)
dev_plip
[
i
]
->
priv
;
unregister_netdev
(
dev_plip
[
i
]);
if
((
dev
=
dev_plip
[
i
]))
{
struct
net_local
*
nl
=
dev
->
priv
;
unregister_netdev
(
dev
);
if
(
nl
->
port_owner
)
parport_release
(
nl
->
pardev
);
parport_unregister_device
(
nl
->
pardev
);
kfree
(
dev_plip
[
i
]
->
priv
);
kfree
(
dev_plip
[
i
]);
kfree
(
dev
);
dev_plip
[
i
]
=
NULL
;
}
}
...
...
drivers/net/sb1250-mac.c
View file @
06dd43c4
...
...
@@ -2493,7 +2493,7 @@ static int sbmac_open(struct net_device *dev)
/* Set the timer to check for link beat. */
init_timer
(
&
sc
->
sbm_timer
);
sc
->
sbm_timer
.
expires
=
jiffies
+
2
;
sc
->
sbm_timer
.
expires
=
jiffies
+
2
*
HZ
/
100
;
sc
->
sbm_timer
.
data
=
(
unsigned
long
)
dev
;
sc
->
sbm_timer
.
function
=
&
sbmac_timer
;
add_timer
(
&
sc
->
sbm_timer
);
...
...
drivers/net/sk_mca.c
View file @
06dd43c4
...
...
@@ -537,7 +537,7 @@ static int __init ProbeIRQ(struct SKMCA_NETDEV *dev)
ResetBoard
(
dev
);
InitBoard
(
dev
);
njiffies
=
jiffies
+
100
;
njiffies
=
jiffies
+
HZ
;
do
{
csr0val
=
GetLANCE
(
dev
,
LANCE_CSR0
);
}
...
...
drivers/net/sundance.c
View file @
06dd43c4
...
...
@@ -87,11 +87,15 @@
Version LK1.09 (D-Link):
- Fix the flowctrl bug.
- Set Pause bit in MII ANAR if flow control enabled.
Version LK1.09a (ICPlus):
- Add the delay time in reading the contents of EEPROM
*/
#define DRV_NAME "sundance"
#define DRV_VERSION "1.01+LK1.09a"
#define DRV_RELDATE "1
6-May
-2003"
#define DRV_RELDATE "1
0-Jul
-2003"
/* The user-configurable values.
...
...
@@ -744,12 +748,14 @@ static int change_mtu(struct net_device *dev, int new_mtu)
return
0
;
}
#define eeprom_delay(ee_addr) readl(ee_addr)
/* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. */
static
int
__devinit
eeprom_read
(
long
ioaddr
,
int
location
)
{
int
boguscnt
=
1000
;
/* Typical 19
0 ticks. */
int
boguscnt
=
1000
0
;
/* Typical 190
0 ticks. */
writew
(
0x0200
|
(
location
&
0xff
),
ioaddr
+
EECtrl
);
do
{
eeprom_delay
(
ioaddr
+
EECtrl
);
if
(
!
(
readw
(
ioaddr
+
EECtrl
)
&
0x8000
))
{
return
readw
(
ioaddr
+
EEData
);
}
...
...
drivers/net/tg3.c
View file @
06dd43c4
...
...
@@ -6679,10 +6679,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
}
/* Configure DMA attributes. */
if
(
!
pci_set_dma_mask
(
pdev
,
(
u64
)
0xffffffffffffffffULL
))
{
if
(
!
pci_set_dma_mask
(
pdev
,
0xffffffffffffffffULL
))
{
pci_using_dac
=
1
;
if
(
pci_set_consistent_dma_mask
(
pdev
,
(
u64
)
0xffffffffffffffff
))
{
if
(
pci_set_consistent_dma_mask
(
pdev
,
0xffffffffffffffffULL
))
{
printk
(
KERN_ERR
PFX
"Unable to obtain 64 bit DMA "
"for consistent allocations
\n
"
);
goto
err_out_free_res
;
...
...
drivers/net/tokenring/3c359.c
View file @
06dd43c4
...
...
@@ -464,7 +464,7 @@ static int xl_hw_reset(struct net_device *dev)
printk
(
KERN_INFO
"3C359: Uploading Microcode: "
);
for
(
i
=
start
,
j
=
0
;
(
j
<
mc_size
&&
i
<=
0xffff
)
;
i
++
,
j
++
)
{
for
(
i
=
start
,
j
=
0
;
j
<
mc_size
;
i
++
,
j
++
)
{
writel
(
MEM_BYTE_WRITE
|
0XD0000
|
i
,
xl_mmio
+
MMIO_MAC_ACCESS_CMD
)
;
writeb
(
microcode
[
j
],
xl_mmio
+
MMIO_MACDATA
)
;
if
(
j
%
1024
==
0
)
...
...
drivers/net/tokenring/proteon.c
View file @
06dd43c4
...
...
@@ -401,7 +401,6 @@ static int __init setup_card(unsigned long io, unsigned irq, unsigned char dma)
int
init_module
(
void
)
{
int
i
,
num
;
struct
net_device
*
dev
;
num
=
0
;
if
(
io
[
0
])
{
/* Only probe addresses from command line */
...
...
drivers/net/tokenring/skisa.c
View file @
06dd43c4
...
...
@@ -414,7 +414,6 @@ static int __init setup_card(unsigned long io, unsigned irq, unsigned char dma)
int
init_module
(
void
)
{
int
i
,
num
;
struct
net_device
*
dev
;
num
=
0
;
if
(
io
[
0
])
{
/* Only probe addresses from command line */
...
...
drivers/net/via-rhine.c
View file @
06dd43c4
...
...
@@ -1152,7 +1152,7 @@ static int via_rhine_open(struct net_device *dev)
/* Set the timer to check for link beat. */
init_timer
(
&
np
->
timer
);
np
->
timer
.
expires
=
jiffies
+
2
;
np
->
timer
.
expires
=
jiffies
+
2
*
HZ
/
100
;
np
->
timer
.
data
=
(
unsigned
long
)
dev
;
np
->
timer
.
function
=
&
via_rhine_timer
;
/* timer handler */
add_timer
(
&
np
->
timer
);
...
...
drivers/net/wireless/atmel_cs.c
View file @
06dd43c4
...
...
@@ -391,7 +391,7 @@ static void atmel_config(dev_link_t *link)
local_info_t
*
dev
;
int
last_fn
,
last_ret
;
u_char
buf
[
64
];
int
card_index
=
-
1
;
int
card_index
=
-
1
,
done
=
0
;
handle
=
link
->
handle
;
dev
=
link
->
priv
;
...
...
@@ -415,13 +415,13 @@ static void atmel_config(dev_link_t *link)
manfid
->
manf
==
card_table
[
i
].
manf
&&
manfid
->
card
==
card_table
[
i
].
card
)
{
card_index
=
i
;
goto
done
;
done
=
1
;
}
}
}
tuple
.
DesiredTuple
=
CISTPL_VERS_1
;
if
(
CardServices
(
GetFirstTuple
,
handle
,
&
tuple
)
==
0
)
{
if
(
!
done
&&
(
CardServices
(
GetFirstTuple
,
handle
,
&
tuple
)
==
0
)
)
{
int
i
,
j
,
k
;
cistpl_vers_1_t
*
ver1
;
CS_CHECK
(
GetTupleData
,
handle
,
&
tuple
);
...
...
@@ -446,12 +446,11 @@ static void atmel_config(dev_link_t *link)
goto
mismatch
;
}
card_index
=
i
;
goto
done
;
break
;
/* done */
mismatch:
j
=
0
;
/* dummy stmt to shut up compiler */
}
done:
}
/*
...
...
drivers/net/wireless/wavelan.c
View file @
06dd43c4
...
...
@@ -3730,8 +3730,8 @@ static int wv_check_ioaddr(unsigned long ioaddr, u8 * mac)
int
i
;
/* Loop counter */
/* Check if the base address if available. */
if
(
check_region
(
ioaddr
,
sizeof
(
ha_t
)
))
return
-
E
ADDRINUSE
;
/* ioaddr already used */
if
(
!
request_region
(
ioaddr
,
sizeof
(
ha_t
),
"wavelan probe"
))
return
-
E
BUSY
;
/* ioaddr already used */
/* Reset host interface */
wv_hacr_reset
(
ioaddr
);
...
...
@@ -3740,6 +3740,8 @@ static int wv_check_ioaddr(unsigned long ioaddr, u8 * mac)
psa_read
(
ioaddr
,
HACR_DEFAULT
,
psaoff
(
0
,
psa_univ_mac_addr
),
mac
,
6
);
release_region
(
ioaddr
,
sizeof
(
ha_t
));
/*
* Check the first three octets of the address for the manufacturer's code.
* Note: if this can't find your WaveLAN card, you've got a
...
...
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