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
ccfca0bf
Commit
ccfca0bf
authored
Nov 20, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/disk1/davem/BK/network-2.5
into nuts.ninka.net:/disk1/davem/BK/net-2.5
parents
09feeaff
482f6240
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
19 deletions
+79
-19
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_main.c
+76
-16
drivers/net/tg3.c
drivers/net/tg3.c
+3
-3
No files found.
drivers/net/bonding/bond_main.c
View file @
ccfca0bf
...
@@ -3047,6 +3047,10 @@ static int bond_ioctl(struct net_device *master_dev, struct ifreq *ifr, int cmd)
...
@@ -3047,6 +3047,10 @@ static int bond_ioctl(struct net_device *master_dev, struct ifreq *ifr, int cmd)
case
SIOCBONDRELEASE
:
case
SIOCBONDRELEASE
:
ret
=
bond_release
(
master_dev
,
slave_dev
);
ret
=
bond_release
(
master_dev
,
slave_dev
);
break
;
break
;
case
BOND_SETHWADDR_OLD
:
case
SIOCBONDSETHWADDR
:
ret
=
bond_sethwaddr
(
master_dev
,
slave_dev
);
break
;
case
BOND_CHANGE_ACTIVE_OLD
:
case
BOND_CHANGE_ACTIVE_OLD
:
case
SIOCBONDCHANGEACTIVE
:
case
SIOCBONDCHANGEACTIVE
:
if
(
USES_PRIMARY
(
bond_mode
))
{
if
(
USES_PRIMARY
(
bond_mode
))
{
...
@@ -3569,6 +3573,62 @@ static void bond_destroy_proc_info(struct bonding *bond)
...
@@ -3569,6 +3573,62 @@ static void bond_destroy_proc_info(struct bonding *bond)
bond
->
bond_proc_file
=
NULL
;
bond
->
bond_proc_file
=
NULL
;
}
}
}
}
/* Create the bonding directory under /proc/net, if doesn't exist yet.
* Caller must hold rtnl_lock.
*/
static
void
bond_create_proc_dir
(
void
)
{
int
len
=
strlen
(
DRV_NAME
);
for
(
bond_proc_dir
=
proc_net
->
subdir
;
bond_proc_dir
;
bond_proc_dir
=
bond_proc_dir
->
next
)
{
if
((
bond_proc_dir
->
namelen
==
len
)
&&
!
memcmp
(
bond_proc_dir
->
name
,
DRV_NAME
,
len
))
{
break
;
}
}
if
(
!
bond_proc_dir
)
{
bond_proc_dir
=
proc_mkdir
(
DRV_NAME
,
proc_net
);
if
(
bond_proc_dir
)
{
bond_proc_dir
->
owner
=
THIS_MODULE
;
}
else
{
printk
(
KERN_WARNING
DRV_NAME
": Warning: cannot create /proc/net/%s
\n
"
,
DRV_NAME
);
}
}
}
/* Destroy the bonding directory under /proc/net, if empty.
* Caller must hold rtnl_lock.
*/
static
void
bond_destroy_proc_dir
(
void
)
{
struct
proc_dir_entry
*
de
;
if
(
!
bond_proc_dir
)
{
return
;
}
/* verify that the /proc dir is empty */
for
(
de
=
bond_proc_dir
->
subdir
;
de
;
de
=
de
->
next
)
{
/* ignore . and .. */
if
(
*
(
de
->
name
)
!=
'.'
)
{
break
;
}
}
if
(
de
)
{
if
(
bond_proc_dir
->
owner
==
THIS_MODULE
)
{
bond_proc_dir
->
owner
=
NULL
;
}
}
else
{
remove_proc_entry
(
DRV_NAME
,
proc_net
);
bond_proc_dir
=
NULL
;
}
}
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
/*
/*
...
@@ -3824,6 +3884,9 @@ static struct notifier_block bond_netdev_notifier = {
...
@@ -3824,6 +3884,9 @@ static struct notifier_block bond_netdev_notifier = {
.
notifier_call
=
bond_netdev_event
,
.
notifier_call
=
bond_netdev_event
,
};
};
/* De-initialize device specific data.
* Caller must hold rtnl_lock.
*/
static
inline
void
bond_deinit
(
struct
net_device
*
dev
)
static
inline
void
bond_deinit
(
struct
net_device
*
dev
)
{
{
struct
bonding
*
bond
=
dev
->
priv
;
struct
bonding
*
bond
=
dev
->
priv
;
...
@@ -3835,6 +3898,9 @@ static inline void bond_deinit(struct net_device *dev)
...
@@ -3835,6 +3898,9 @@ static inline void bond_deinit(struct net_device *dev)
#endif
#endif
}
}
/* Unregister and free all bond devices.
* Caller must hold rtnl_lock.
*/
static
void
bond_free_all
(
void
)
static
void
bond_free_all
(
void
)
{
{
struct
bonding
*
bond
,
*
nxt
;
struct
bonding
*
bond
,
*
nxt
;
...
@@ -3842,16 +3908,13 @@ static void bond_free_all(void)
...
@@ -3842,16 +3908,13 @@ static void bond_free_all(void)
list_for_each_entry_safe
(
bond
,
nxt
,
&
bond_dev_list
,
bond_list
)
{
list_for_each_entry_safe
(
bond
,
nxt
,
&
bond_dev_list
,
bond_list
)
{
struct
net_device
*
dev
=
bond
->
device
;
struct
net_device
*
dev
=
bond
->
device
;
unregister_netdev
(
dev
);
unregister_netdev
ice
(
dev
);
bond_deinit
(
dev
);
bond_deinit
(
dev
);
free_netdev
(
dev
);
free_netdev
(
dev
);
}
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
if
(
bond_proc_dir
)
{
bond_destroy_proc_dir
();
remove_proc_entry
(
DRV_NAME
,
proc_net
);
bond_proc_dir
=
NULL
;
}
#endif
#endif
}
}
...
@@ -4229,18 +4292,12 @@ static int __init bonding_init(void)
...
@@ -4229,18 +4292,12 @@ static int __init bonding_init(void)
primary
=
NULL
;
primary
=
NULL
;
}
}
rtnl_lock
();
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
bond_proc_dir
=
proc_mkdir
(
DRV_NAME
,
proc_net
);
bond_create_proc_dir
();
if
(
bond_proc_dir
==
NULL
)
{
printk
(
KERN_WARNING
"bonding_init(): can not create /proc/net/"
DRV_NAME
);
}
else
{
bond_proc_dir
->
owner
=
THIS_MODULE
;
}
#endif
#endif
rtnl_lock
();
err
=
0
;
err
=
0
;
for
(
no
=
0
;
no
<
max_bonds
;
no
++
)
{
for
(
no
=
0
;
no
<
max_bonds
;
no
++
)
{
struct
net_device
*
dev
;
struct
net_device
*
dev
;
...
@@ -4283,18 +4340,21 @@ static int __init bonding_init(void)
...
@@ -4283,18 +4340,21 @@ static int __init bonding_init(void)
return
0
;
return
0
;
out_err:
out_err:
rtnl_unlock
();
/* free and unregister all bonds that were successfully added */
/* free and unregister all bonds that were successfully added */
bond_free_all
();
bond_free_all
();
rtnl_unlock
();
return
err
;
return
err
;
}
}
static
void
__exit
bonding_exit
(
void
)
static
void
__exit
bonding_exit
(
void
)
{
{
unregister_netdevice_notifier
(
&
bond_netdev_notifier
);
unregister_netdevice_notifier
(
&
bond_netdev_notifier
);
rtnl_lock
();
bond_free_all
();
bond_free_all
();
rtnl_unlock
();
}
}
module_init
(
bonding_init
);
module_init
(
bonding_init
);
...
...
drivers/net/tg3.c
View file @
ccfca0bf
...
@@ -6071,8 +6071,8 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e
...
@@ -6071,8 +6071,8 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e
tp
->
rx_pending
=
ering
->
rx_pending
;
tp
->
rx_pending
=
ering
->
rx_pending
;
if
((
tp
->
tg3_flags2
&
TG3_FLG2_MAX_RXPEND_64
)
&&
if
((
tp
->
tg3_flags2
&
TG3_FLG2_MAX_RXPEND_64
)
&&
tp
->
rx_pending
>
6
4
)
tp
->
rx_pending
>
6
3
)
tp
->
rx_pending
=
6
4
;
tp
->
rx_pending
=
6
3
;
tp
->
rx_jumbo_pending
=
ering
->
rx_jumbo_pending
;
tp
->
rx_jumbo_pending
=
ering
->
rx_jumbo_pending
;
tp
->
tx_pending
=
ering
->
tx_pending
;
tp
->
tx_pending
=
ering
->
tx_pending
;
...
@@ -7676,7 +7676,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
...
@@ -7676,7 +7676,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
!
(
tp
->
tg3_flags2
&
TG3_FLG2_TSO_CAPABLE
)
&&
!
(
tp
->
tg3_flags2
&
TG3_FLG2_TSO_CAPABLE
)
&&
!
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
))
{
!
(
tr32
(
TG3PCI_PCISTATE
)
&
PCISTATE_BUS_SPEED_HIGH
))
{
tp
->
tg3_flags2
|=
TG3_FLG2_MAX_RXPEND_64
;
tp
->
tg3_flags2
|=
TG3_FLG2_MAX_RXPEND_64
;
tp
->
rx_pending
=
6
4
;
tp
->
rx_pending
=
6
3
;
}
}
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5704
)
if
(
GET_ASIC_REV
(
tp
->
pci_chip_rev_id
)
==
ASIC_REV_5704
)
...
...
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