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
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
Hide 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
...
...
@@ -2887,7 +2887,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
}
static
struct
ethtool_ops
vortex_ethtool_ops
=
{
.
get_drvinfo
=
vortex_get_drvinfo
,
.
get_drvinfo
=
vortex_get_drvinfo
,
};
#ifdef CONFIG_PCI
...
...
drivers/net/dummy.c
View file @
6b49b00f
...
...
@@ -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
)
{
struct
net_device_stats
*
stats
=
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
stats
->
tx_packets
++
;
stats
->
tx_bytes
+=
skb
->
len
;
...
...
@@ -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
)
{
return
dev
->
priv
;
return
netdev_priv
(
dev
)
;
}
static
struct
net_device
**
dummies
;
...
...
drivers/net/eql.c
View file @
6b49b00f
...
...
@@ -164,12 +164,12 @@ static char version[] __initdata =
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
SET_MODULE_OWNER
(
dev
);
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
.
function
=
eql_timer
;
...
...
@@ -197,7 +197,7 @@ static void __init eql_setup(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. */
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)
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
...
...
@@ -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
)
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
spin_lock
(
&
eql
->
queue
.
lock
);
...
...
@@ -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
)
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
return
&
eql
->
stats
;
}
...
...
@@ -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
)
{
equalizer_t
*
eql
=
queue
->
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
queue
->
master_dev
)
;
if
(
queue
->
num_slaves
>=
eql
->
max_slaves
)
return
1
;
...
...
@@ -420,7 +420,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
if
(
!
eql_is_master
(
slave_dev
)
&&
!
eql_is_slave
(
slave_dev
))
{
slave_t
*
s
=
kmalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
int
ret
;
if
(
!
s
)
{
...
...
@@ -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
)
{
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
struct
net_device
*
slave_dev
;
slaving_request_t
srq
;
int
ret
;
...
...
@@ -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
)
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
struct
net_device
*
slave_dev
;
slave_config_t
sc
;
...
...
@@ -539,7 +539,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
if
(
!
slave_dev
)
return
ret
;
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
eql
->
queue
.
lock
);
if
(
eql_is_slave
(
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)
master_config_t
mc
;
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
mc
.
max_slaves
=
eql
->
max_slaves
;
mc
.
min_slaves
=
eql
->
min_slaves
;
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)
return
-
EFAULT
;
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
eql
->
max_slaves
=
mc
.
max_slaves
;
eql
->
min_slaves
=
mc
.
min_slaves
;
return
0
;
...
...
drivers/net/ns83820.c
View file @
6b49b00f
...
...
@@ -96,6 +96,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
...
...
@@ -119,7 +120,7 @@
#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
reset_phy
=
0
;
static
int
lnksts
=
0
;
/* CFG_LNKSTS bit polarity */
...
...
@@ -2209,13 +2210,13 @@ MODULE_LICENSE("GPL");
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
(
ihr
,
"i"
);
module_param
(
ihr
,
int
,
0
);
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_init
(
ns83820_init
);
...
...
drivers/net/sis900.c
View file @
6b49b00f
...
...
@@ -262,13 +262,12 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
u8
reg
;
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
)
isa_bridge
=
pci_get_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
if
(
!
isa_bridge
)
{
isa_bridge
=
pci_find_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
if
(
!
isa_bridge
)
{
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
return
0
;
}
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
return
0
;
}
pci_read_config_byte
(
isa_bridge
,
0x48
,
&
reg
);
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,
((
u8
*
)(
net_dev
->
dev_addr
))[
i
]
=
inb
(
0x71
);
}
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
&
~
0x40
);
pci_dev_put
(
isa_bridge
);
return
1
;
}
...
...
@@ -488,9 +488,11 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
}
/* save our host bridge revision */
dev
=
pci_
find
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
if
(
dev
)
dev
=
pci_
get
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
if
(
dev
)
{
pci_read_config_byte
(
dev
,
PCI_CLASS_REVISION
,
&
sis_priv
->
host_bridge_rev
);
pci_dev_put
(
dev
);
}
/* print some information about our NIC */
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)
}
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
)
;
}
else
{
...
...
drivers/net/slip.c
View file @
6b49b00f
...
...
@@ -57,6 +57,7 @@
#define SL_CHECK_TRANSMIT
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <asm/system.h>
#include <asm/uaccess.h>
...
...
@@ -85,8 +86,8 @@
static
struct
net_device
**
slip_devs
;
int
slip_maxdev
=
SL_NRUNIT
;
/* Can be overridden with insmod! */
MODULE_PARM
(
slip_maxdev
,
"i"
);
static
int
slip_maxdev
=
SL_NRUNIT
;
module_param
(
slip_maxdev
,
int
,
0
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
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)
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
);
if
(
netif_queue_stopped
(
dev
))
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
priv
);
if
(
!
netif_running
(
dev
))
goto
out
;
...
...
@@ -494,7 +493,7 @@ static void sl_tx_timeout(struct net_device *dev)
static
int
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
);
if
(
!
netif_running
(
dev
))
{
...
...
@@ -528,7 +527,7 @@ sl_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
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
);
if
(
sl
->
tty
)
{
...
...
@@ -547,7 +546,7 @@ sl_close(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
)
return
-
ENODEV
;
...
...
@@ -561,7 +560,7 @@ static int sl_open(struct net_device *dev)
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
)
return
-
EINVAL
;
...
...
@@ -577,7 +576,7 @@ static struct net_device_stats *
sl_get_stats
(
struct
net_device
*
dev
)
{
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
struct
slcompress
*
comp
;
#endif
...
...
@@ -612,7 +611,7 @@ sl_get_stats(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.
...
...
@@ -630,7 +629,7 @@ static int sl_init(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
);
}
...
...
@@ -719,7 +718,7 @@ static void sl_sync(void)
if
((
dev
=
slip_devs
[
i
])
==
NULL
)
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
||
sl
->
leased
)
continue
;
if
(
dev
->
flags
&
IFF_UP
)
...
...
@@ -746,7 +745,7 @@ sl_alloc(dev_t line)
if
(
dev
==
NULL
)
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
leased
)
{
if
(
sl
->
line
!=
line
)
continue
;
...
...
@@ -788,7 +787,7 @@ sl_alloc(dev_t line)
i
=
sel
;
dev
=
slip_devs
[
i
];
if
(
score
>
1
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
sl
->
flags
&=
(
1
<<
SLF_INUSE
);
return
sl
;
}
...
...
@@ -799,7 +798,7 @@ sl_alloc(dev_t line)
return
NULL
;
if
(
dev
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
test_bit
(
SLF_INUSE
,
&
sl
->
flags
))
{
unregister_netdevice
(
dev
);
dev
=
NULL
;
...
...
@@ -817,7 +816,7 @@ sl_alloc(dev_t line)
dev
->
base_addr
=
i
;
}
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
/* Initialize channel control data */
sl
->
magic
=
SLIP_MAGIC
;
...
...
@@ -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
)
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
unsigned
long
*
p
=
(
unsigned
long
*
)
&
rq
->
ifr_ifru
;
if
(
sl
==
NULL
)
/* Allocation failed ?? */
...
...
@@ -1406,7 +1405,7 @@ static void __exit slip_exit(void)
dev
=
slip_devs
[
i
];
if
(
!
dev
)
continue
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
sl
->
lock
);
if
(
sl
->
tty
)
{
busy
++
;
...
...
@@ -1423,7 +1422,7 @@ static void __exit slip_exit(void)
continue
;
slip_devs
[
i
]
=
NULL
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
)
{
printk
(
KERN_ERR
"%s: tty discipline still running
\n
"
,
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,
struct
tulip_private
*
tp
;
/* See note below on the multiport cards. */
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
multiport_cnt
;
/* For four-port boards w/one EEPROM */
u8
chip_rev
;
...
...
@@ -1274,17 +1279,15 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
* without the workarounds being on.
*/
/* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned
Aries might need this too. The Saturn errata are not pretty reading but
thankfully it's an old 486 chipset.
/* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache
aligned. Aries might need this too. The Saturn errata are not
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
))
{
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
))
{
if
(
pci_dev_present
(
early_486_chipsets
))
{
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
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