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
6b49b00f
Commit
6b49b00f
authored
Oct 25, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/garz/repo/netdev-2.6/janitor
into pobox.com:/garz/repo/net-drivers-2.6
parents
c91c43bf
7244fe9e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
58 deletions
+64
-58
drivers/net/3c59x.c
drivers/net/3c59x.c
+1
-1
drivers/net/dummy.c
drivers/net/dummy.c
+2
-2
drivers/net/eql.c
drivers/net/eql.c
+13
-13
drivers/net/ns83820.c
drivers/net/ns83820.c
+5
-4
drivers/net/sis900.c
drivers/net/sis900.c
+10
-8
drivers/net/skfp/hwmtm.c
drivers/net/skfp/hwmtm.c
+2
-1
drivers/net/slip.c
drivers/net/slip.c
+19
-20
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+12
-9
No files found.
drivers/net/3c59x.c
View file @
6b49b00f
drivers/net/dummy.c
View file @
6b49b00f
...
@@ -77,7 +77,7 @@ static void __init dummy_setup(struct net_device *dev)
...
@@ -77,7 +77,7 @@ static void __init dummy_setup(struct net_device *dev)
static
int
dummy_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
dummy_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_device_stats
*
stats
=
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
stats
->
tx_packets
++
;
stats
->
tx_packets
++
;
stats
->
tx_bytes
+=
skb
->
len
;
stats
->
tx_bytes
+=
skb
->
len
;
...
@@ -88,7 +88,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -88,7 +88,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
dummy_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
dummy_get_stats
(
struct
net_device
*
dev
)
{
{
return
dev
->
priv
;
return
netdev_priv
(
dev
)
;
}
}
static
struct
net_device
**
dummies
;
static
struct
net_device
**
dummies
;
...
...
drivers/net/eql.c
View file @
6b49b00f
...
@@ -164,12 +164,12 @@ static char version[] __initdata =
...
@@ -164,12 +164,12 @@ static char version[] __initdata =
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
SET_MODULE_OWNER
(
dev
);
SET_MODULE_OWNER
(
dev
);
init_timer
(
&
eql
->
timer
);
init_timer
(
&
eql
->
timer
);
eql
->
timer
.
data
=
(
unsigned
long
)
dev
->
priv
;
eql
->
timer
.
data
=
(
unsigned
long
)
eql
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
eql
->
timer
.
function
=
eql_timer
;
eql
->
timer
.
function
=
eql_timer
;
...
@@ -197,7 +197,7 @@ static void __init eql_setup(struct net_device *dev)
...
@@ -197,7 +197,7 @@ static void __init eql_setup(struct net_device *dev)
static
int
eql_open
(
struct
net_device
*
dev
)
static
int
eql_open
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
/* XXX We should force this off automatically for the user. */
/* XXX We should force this off automatically for the user. */
printk
(
KERN_INFO
"%s: remember to turn off Van-Jacobson compression on "
printk
(
KERN_INFO
"%s: remember to turn off Van-Jacobson compression on "
...
@@ -241,7 +241,7 @@ static void eql_kill_slave_queue(slave_queue_t *queue)
...
@@ -241,7 +241,7 @@ static void eql_kill_slave_queue(slave_queue_t *queue)
static
int
eql_close
(
struct
net_device
*
dev
)
static
int
eql_close
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
/*
/*
* The timer has to be stopped first before we start hacking away
* The timer has to be stopped first before we start hacking away
...
@@ -326,7 +326,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
...
@@ -326,7 +326,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
static
int
eql_slave_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
eql_slave_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
slave_t
*
slave
;
spin_lock
(
&
eql
->
queue
.
lock
);
spin_lock
(
&
eql
->
queue
.
lock
);
...
@@ -352,7 +352,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -352,7 +352,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
eql_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
eql_get_stats
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
return
&
eql
->
stats
;
return
&
eql
->
stats
;
}
}
...
@@ -378,7 +378,7 @@ static slave_t *__eql_find_slave_dev(slave_queue_t *queue, struct net_device *de
...
@@ -378,7 +378,7 @@ static slave_t *__eql_find_slave_dev(slave_queue_t *queue, struct net_device *de
static
inline
int
eql_is_full
(
slave_queue_t
*
queue
)
static
inline
int
eql_is_full
(
slave_queue_t
*
queue
)
{
{
equalizer_t
*
eql
=
queue
->
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
queue
->
master_dev
)
;
if
(
queue
->
num_slaves
>=
eql
->
max_slaves
)
if
(
queue
->
num_slaves
>=
eql
->
max_slaves
)
return
1
;
return
1
;
...
@@ -420,7 +420,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
...
@@ -420,7 +420,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
if
(
!
eql_is_master
(
slave_dev
)
&&
if
(
!
eql_is_master
(
slave_dev
)
&&
!
eql_is_slave
(
slave_dev
))
{
!
eql_is_slave
(
slave_dev
))
{
slave_t
*
s
=
kmalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
slave_t
*
s
=
kmalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
int
ret
;
int
ret
;
if
(
!
s
)
{
if
(
!
s
)
{
...
@@ -453,7 +453,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
...
@@ -453,7 +453,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
static
int
eql_emancipate
(
struct
net_device
*
master_dev
,
slaving_request_t
__user
*
srqp
)
static
int
eql_emancipate
(
struct
net_device
*
master_dev
,
slaving_request_t
__user
*
srqp
)
{
{
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
struct
net_device
*
slave_dev
;
struct
net_device
*
slave_dev
;
slaving_request_t
srq
;
slaving_request_t
srq
;
int
ret
;
int
ret
;
...
@@ -485,7 +485,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use
...
@@ -485,7 +485,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use
static
int
eql_g_slave_cfg
(
struct
net_device
*
dev
,
slave_config_t
__user
*
scp
)
static
int
eql_g_slave_cfg
(
struct
net_device
*
dev
,
slave_config_t
__user
*
scp
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
slave_t
*
slave
;
struct
net_device
*
slave_dev
;
struct
net_device
*
slave_dev
;
slave_config_t
sc
;
slave_config_t
sc
;
...
@@ -539,7 +539,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
...
@@ -539,7 +539,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
if
(
!
slave_dev
)
if
(
!
slave_dev
)
return
ret
;
return
ret
;
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
eql
->
queue
.
lock
);
spin_lock_bh
(
&
eql
->
queue
.
lock
);
if
(
eql_is_slave
(
slave_dev
))
{
if
(
eql_is_slave
(
slave_dev
))
{
slave
=
__eql_find_slave_dev
(
&
eql
->
queue
,
slave_dev
);
slave
=
__eql_find_slave_dev
(
&
eql
->
queue
,
slave_dev
);
...
@@ -561,7 +561,7 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp)
...
@@ -561,7 +561,7 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp)
master_config_t
mc
;
master_config_t
mc
;
if
(
eql_is_master
(
dev
))
{
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
mc
.
max_slaves
=
eql
->
max_slaves
;
mc
.
max_slaves
=
eql
->
max_slaves
;
mc
.
min_slaves
=
eql
->
min_slaves
;
mc
.
min_slaves
=
eql
->
min_slaves
;
if
(
copy_to_user
(
mcp
,
&
mc
,
sizeof
(
master_config_t
)))
if
(
copy_to_user
(
mcp
,
&
mc
,
sizeof
(
master_config_t
)))
...
@@ -580,7 +580,7 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp)
...
@@ -580,7 +580,7 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp)
return
-
EFAULT
;
return
-
EFAULT
;
if
(
eql_is_master
(
dev
))
{
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
eql
->
max_slaves
=
mc
.
max_slaves
;
eql
->
max_slaves
=
mc
.
max_slaves
;
eql
->
min_slaves
=
mc
.
min_slaves
;
eql
->
min_slaves
=
mc
.
min_slaves
;
return
0
;
return
0
;
...
...
drivers/net/ns83820.c
View file @
6b49b00f
...
@@ -96,6 +96,7 @@
...
@@ -96,6 +96,7 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
...
@@ -119,7 +120,7 @@
...
@@ -119,7 +120,7 @@
#define DRV_NAME "ns83820"
#define DRV_NAME "ns83820"
/* Global parameters. See
MODULE_PARM
near the bottom. */
/* Global parameters. See
module_param
near the bottom. */
static
int
ihr
=
2
;
static
int
ihr
=
2
;
static
int
reset_phy
=
0
;
static
int
reset_phy
=
0
;
static
int
lnksts
=
0
;
/* CFG_LNKSTS bit polarity */
static
int
lnksts
=
0
;
/* CFG_LNKSTS bit polarity */
...
@@ -2209,13 +2210,13 @@ MODULE_LICENSE("GPL");
...
@@ -2209,13 +2210,13 @@ MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE
(
pci
,
ns83820_pci_tbl
);
MODULE_DEVICE_TABLE
(
pci
,
ns83820_pci_tbl
);
MODULE_PARM
(
lnksts
,
"i"
);
module_param
(
lnksts
,
int
,
0
);
MODULE_PARM_DESC
(
lnksts
,
"Polarity of LNKSTS bit"
);
MODULE_PARM_DESC
(
lnksts
,
"Polarity of LNKSTS bit"
);
MODULE_PARM
(
ihr
,
"i"
);
module_param
(
ihr
,
int
,
0
);
MODULE_PARM_DESC
(
ihr
,
"Time in 100 us increments to delay interrupts (range 0-127)"
);
MODULE_PARM_DESC
(
ihr
,
"Time in 100 us increments to delay interrupts (range 0-127)"
);
MODULE_PARM
(
reset_phy
,
"i"
);
module_param
(
reset_phy
,
int
,
0
);
MODULE_PARM_DESC
(
reset_phy
,
"Set to 1 to reset the PHY on startup"
);
MODULE_PARM_DESC
(
reset_phy
,
"Set to 1 to reset the PHY on startup"
);
module_init
(
ns83820_init
);
module_init
(
ns83820_init
);
...
...
drivers/net/sis900.c
View file @
6b49b00f
...
@@ -262,14 +262,13 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
...
@@ -262,14 +262,13 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
u8
reg
;
u8
reg
;
int
i
;
int
i
;
isa_bridge
=
pci_
find
_device
(
PCI_VENDOR_ID_SI
,
0x0008
,
isa_bridge
);
isa_bridge
=
pci_
get
_device
(
PCI_VENDOR_ID_SI
,
0x0008
,
isa_bridge
);
if
(
!
isa_bridge
)
{
if
(
!
isa_bridge
)
isa_bridge
=
pci_
find
_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
isa_bridge
=
pci_
get
_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
if
(
!
isa_bridge
)
{
if
(
!
isa_bridge
)
{
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
return
0
;
return
0
;
}
}
}
pci_read_config_byte
(
isa_bridge
,
0x48
,
&
reg
);
pci_read_config_byte
(
isa_bridge
,
0x48
,
&
reg
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
|
0x40
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
|
0x40
);
...
@@ -278,6 +277,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
...
@@ -278,6 +277,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
((
u8
*
)(
net_dev
->
dev_addr
))[
i
]
=
inb
(
0x71
);
((
u8
*
)(
net_dev
->
dev_addr
))[
i
]
=
inb
(
0x71
);
}
}
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
&
~
0x40
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
&
~
0x40
);
pci_dev_put
(
isa_bridge
);
return
1
;
return
1
;
}
}
...
@@ -488,9 +488,11 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
...
@@ -488,9 +488,11 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
}
}
/* save our host bridge revision */
/* save our host bridge revision */
dev
=
pci_
find
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
dev
=
pci_
get
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
if
(
dev
)
if
(
dev
)
{
pci_read_config_byte
(
dev
,
PCI_CLASS_REVISION
,
&
sis_priv
->
host_bridge_rev
);
pci_read_config_byte
(
dev
,
PCI_CLASS_REVISION
,
&
sis_priv
->
host_bridge_rev
);
pci_dev_put
(
dev
);
}
/* print some information about our NIC */
/* print some information about our NIC */
printk
(
KERN_INFO
"%s: %s at %#lx, IRQ %d, "
,
net_dev
->
name
,
printk
(
KERN_INFO
"%s: %s at %#lx, IRQ %d, "
,
net_dev
->
name
,
...
...
drivers/net/skfp/hwmtm.c
View file @
6b49b00f
...
@@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc)
...
@@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc)
}
}
if
(
!
smc
->
hw
.
mac_ring_is_up
||
frag_count
>
queue
->
tx_free
)
{
if
(
!
smc
->
hw
.
mac_ring_is_up
||
frag_count
>
queue
->
tx_free
)
{
if
(
frame_status
&=
~
LAN_TX
)
{
frame_status
&=
~
LAN_TX
;
if
(
frame_status
)
{
DB_TX
(
"Ring is down: terminate LAN_TX"
,
0
,
0
,
2
)
;
DB_TX
(
"Ring is down: terminate LAN_TX"
,
0
,
0
,
2
)
;
}
}
else
{
else
{
...
...
drivers/net/slip.c
View file @
6b49b00f
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#define SL_CHECK_TRANSMIT
#define SL_CHECK_TRANSMIT
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
@@ -85,8 +86,8 @@
...
@@ -85,8 +86,8 @@
static
struct
net_device
**
slip_devs
;
static
struct
net_device
**
slip_devs
;
int
slip_maxdev
=
SL_NRUNIT
;
/* Can be overridden with insmod! */
static
int
slip_maxdev
=
SL_NRUNIT
;
MODULE_PARM
(
slip_maxdev
,
"i"
);
module_param
(
slip_maxdev
,
int
,
0
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
...
@@ -458,13 +459,11 @@ static void slip_write_wakeup(struct tty_struct *tty)
...
@@ -458,13 +459,11 @@ static void slip_write_wakeup(struct tty_struct *tty)
static
void
sl_tx_timeout
(
struct
net_device
*
dev
)
static
void
sl_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock
(
&
sl
->
lock
);
spin_lock
(
&
sl
->
lock
);
if
(
netif_queue_stopped
(
dev
))
{
if
(
netif_queue_stopped
(
dev
))
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
priv
);
if
(
!
netif_running
(
dev
))
if
(
!
netif_running
(
dev
))
goto
out
;
goto
out
;
...
@@ -494,7 +493,7 @@ static void sl_tx_timeout(struct net_device *dev)
...
@@ -494,7 +493,7 @@ static void sl_tx_timeout(struct net_device *dev)
static
int
static
int
sl_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
sl_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock
(
&
sl
->
lock
);
spin_lock
(
&
sl
->
lock
);
if
(
!
netif_running
(
dev
))
{
if
(
!
netif_running
(
dev
))
{
...
@@ -528,7 +527,7 @@ sl_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -528,7 +527,7 @@ sl_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
static
int
sl_close
(
struct
net_device
*
dev
)
sl_close
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock_bh
(
&
sl
->
lock
);
spin_lock_bh
(
&
sl
->
lock
);
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
...
@@ -547,7 +546,7 @@ sl_close(struct net_device *dev)
...
@@ -547,7 +546,7 @@ sl_close(struct net_device *dev)
static
int
sl_open
(
struct
net_device
*
dev
)
static
int
sl_open
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
if
(
sl
->
tty
==
NULL
)
if
(
sl
->
tty
==
NULL
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -561,7 +560,7 @@ static int sl_open(struct net_device *dev)
...
@@ -561,7 +560,7 @@ static int sl_open(struct net_device *dev)
static
int
sl_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
static
int
sl_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
if
(
new_mtu
<
68
||
new_mtu
>
65534
)
if
(
new_mtu
<
68
||
new_mtu
>
65534
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -577,7 +576,7 @@ static struct net_device_stats *
...
@@ -577,7 +576,7 @@ static struct net_device_stats *
sl_get_stats
(
struct
net_device
*
dev
)
sl_get_stats
(
struct
net_device
*
dev
)
{
{
static
struct
net_device_stats
stats
;
static
struct
net_device_stats
stats
;
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
#ifdef SL_INCLUDE_CSLIP
#ifdef SL_INCLUDE_CSLIP
struct
slcompress
*
comp
;
struct
slcompress
*
comp
;
#endif
#endif
...
@@ -612,7 +611,7 @@ sl_get_stats(struct net_device *dev)
...
@@ -612,7 +611,7 @@ sl_get_stats(struct net_device *dev)
static
int
sl_init
(
struct
net_device
*
dev
)
static
int
sl_init
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
/*
/*
* Finish setting up the DEVICE info.
* Finish setting up the DEVICE info.
...
@@ -630,7 +629,7 @@ static int sl_init(struct net_device *dev)
...
@@ -630,7 +629,7 @@ static int sl_init(struct net_device *dev)
static
void
sl_uninit
(
struct
net_device
*
dev
)
static
void
sl_uninit
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
sl_free_bufs
(
sl
);
sl_free_bufs
(
sl
);
}
}
...
@@ -719,7 +718,7 @@ static void sl_sync(void)
...
@@ -719,7 +718,7 @@ static void sl_sync(void)
if
((
dev
=
slip_devs
[
i
])
==
NULL
)
if
((
dev
=
slip_devs
[
i
])
==
NULL
)
break
;
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
||
sl
->
leased
)
if
(
sl
->
tty
||
sl
->
leased
)
continue
;
continue
;
if
(
dev
->
flags
&
IFF_UP
)
if
(
dev
->
flags
&
IFF_UP
)
...
@@ -746,7 +745,7 @@ sl_alloc(dev_t line)
...
@@ -746,7 +745,7 @@ sl_alloc(dev_t line)
if
(
dev
==
NULL
)
if
(
dev
==
NULL
)
break
;
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
leased
)
{
if
(
sl
->
leased
)
{
if
(
sl
->
line
!=
line
)
if
(
sl
->
line
!=
line
)
continue
;
continue
;
...
@@ -788,7 +787,7 @@ sl_alloc(dev_t line)
...
@@ -788,7 +787,7 @@ sl_alloc(dev_t line)
i
=
sel
;
i
=
sel
;
dev
=
slip_devs
[
i
];
dev
=
slip_devs
[
i
];
if
(
score
>
1
)
{
if
(
score
>
1
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
sl
->
flags
&=
(
1
<<
SLF_INUSE
);
sl
->
flags
&=
(
1
<<
SLF_INUSE
);
return
sl
;
return
sl
;
}
}
...
@@ -799,7 +798,7 @@ sl_alloc(dev_t line)
...
@@ -799,7 +798,7 @@ sl_alloc(dev_t line)
return
NULL
;
return
NULL
;
if
(
dev
)
{
if
(
dev
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
test_bit
(
SLF_INUSE
,
&
sl
->
flags
))
{
if
(
test_bit
(
SLF_INUSE
,
&
sl
->
flags
))
{
unregister_netdevice
(
dev
);
unregister_netdevice
(
dev
);
dev
=
NULL
;
dev
=
NULL
;
...
@@ -817,7 +816,7 @@ sl_alloc(dev_t line)
...
@@ -817,7 +816,7 @@ sl_alloc(dev_t line)
dev
->
base_addr
=
i
;
dev
->
base_addr
=
i
;
}
}
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
/* Initialize channel control data */
/* Initialize channel control data */
sl
->
magic
=
SLIP_MAGIC
;
sl
->
magic
=
SLIP_MAGIC
;
...
@@ -1260,7 +1259,7 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
...
@@ -1260,7 +1259,7 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
static
int
sl_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
sl_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
unsigned
long
*
p
=
(
unsigned
long
*
)
&
rq
->
ifr_ifru
;
unsigned
long
*
p
=
(
unsigned
long
*
)
&
rq
->
ifr_ifru
;
if
(
sl
==
NULL
)
/* Allocation failed ?? */
if
(
sl
==
NULL
)
/* Allocation failed ?? */
...
@@ -1406,7 +1405,7 @@ static void __exit slip_exit(void)
...
@@ -1406,7 +1405,7 @@ static void __exit slip_exit(void)
dev
=
slip_devs
[
i
];
dev
=
slip_devs
[
i
];
if
(
!
dev
)
if
(
!
dev
)
continue
;
continue
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
sl
->
lock
);
spin_lock_bh
(
&
sl
->
lock
);
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
busy
++
;
busy
++
;
...
@@ -1423,7 +1422,7 @@ static void __exit slip_exit(void)
...
@@ -1423,7 +1422,7 @@ static void __exit slip_exit(void)
continue
;
continue
;
slip_devs
[
i
]
=
NULL
;
slip_devs
[
i
]
=
NULL
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
printk
(
KERN_ERR
"%s: tty discipline still running
\n
"
,
printk
(
KERN_ERR
"%s: tty discipline still running
\n
"
,
dev
->
name
);
dev
->
name
);
...
...
drivers/net/tulip/tulip_core.c
View file @
6b49b00f
...
@@ -1221,6 +1221,11 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1221,6 +1221,11 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
struct
tulip_private
*
tp
;
struct
tulip_private
*
tp
;
/* See note below on the multiport cards. */
/* See note below on the multiport cards. */
static
unsigned
char
last_phys_addr
[
6
]
=
{
0x00
,
'L'
,
'i'
,
'n'
,
'u'
,
'x'
};
static
unsigned
char
last_phys_addr
[
6
]
=
{
0x00
,
'L'
,
'i'
,
'n'
,
'u'
,
'x'
};
static
struct
pci_device_id
early_486_chipsets
[]
=
{
{
PCI_DEVICE
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82424
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_496
)
},
{
},
};
static
int
last_irq
;
static
int
last_irq
;
static
int
multiport_cnt
;
/* For four-port boards w/one EEPROM */
static
int
multiport_cnt
;
/* For four-port boards w/one EEPROM */
u8
chip_rev
;
u8
chip_rev
;
...
@@ -1274,17 +1279,15 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1274,17 +1279,15 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
* without the workarounds being on.
* without the workarounds being on.
*/
*/
/* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned
/* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache
Aries might need this too. The Saturn errata are not pretty reading but
aligned. Aries might need this too. The Saturn errata are not
thankfully it's an old 486 chipset.
pretty reading but thankfully it's an old 486 chipset.
2. The dreaded SiS496 486 chipset. Same workaround as Intel
Saturn.
*/
*/
if
(
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82424
,
NULL
))
{
if
(
pci_dev_present
(
early_486_chipsets
))
{
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
force_csr0
=
1
;
}
/* The dreaded SiS496 486 chipset. Same workaround as above. */
if
(
pci_find_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_496
,
NULL
))
{
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
force_csr0
=
1
;
force_csr0
=
1
;
}
}
...
...
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