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
ca72724a
Commit
ca72724a
authored
Aug 05, 2002
by
Chad N. Tindel
Committed by
David S. Miller
Aug 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/net/bonding.c: Handle non-ETHTOOL devices more correctly.
parent
f28df58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
drivers/net/bonding.c
drivers/net/bonding.c
+16
-20
No files found.
drivers/net/bonding.c
View file @
ca72724a
...
...
@@ -399,7 +399,7 @@ static u16 bond_check_dev_link(struct net_device *dev)
{
static
int
(
*
ioctl
)(
struct
net_device
*
,
struct
ifreq
*
,
int
);
struct
ifreq
ifr
;
struct
mii_ioctl_data
mii
;
struct
mii_ioctl_data
*
mii
;
struct
ethtool_value
etool
;
if
((
ioctl
=
dev
->
do_ioctl
)
!=
NULL
)
{
/* ioctl to access MII */
...
...
@@ -425,21 +425,24 @@ static u16 bond_check_dev_link(struct net_device *dev)
}
}
ifr
.
ifr_data
=
(
char
*
)
&
mii
;
/* try MIIPHY first then, if that doesn't work, try MIIREG */
if
(
ioctl
(
dev
,
&
ifr
,
SIOCGMIIPHY
)
==
0
)
{
/* now, mii.phy_id contains info about link status :
- mii.phy_id & 0x04 means link up
- mii.phy_id & 0x20 means end of auto-negociation
*/
return
mii
.
phy_id
;
/*
* We cannot assume that SIOCGMIIPHY will also read a
* register; not all network drivers support that.
*/
/* Yes, the mii is overlaid on the ifreq.ifr_ifru */
mii
=
(
struct
mii_ioctl_data
*
)
&
ifr
.
ifr_data
;
if
(
ioctl
(
dev
,
&
ifr
,
SIOCGMIIPHY
)
!=
0
)
{
return
MII_LINK_READY
;
/* can't tell */
}
mii
.
reg_num
=
1
;
/* the MII register we want to read */
mii
->
reg_num
=
1
;
if
(
ioctl
(
dev
,
&
ifr
,
SIOCGMIIREG
)
==
0
)
{
/* mii.val_out contians the same link info as phy_id */
/* above */
return
mii
.
val_out
;
/*
* mii->val_out contains MII reg 1, BMSR
* 0x0004 means link established
*/
return
mii
->
val_out
;
}
}
...
...
@@ -641,12 +644,6 @@ static void set_multicast_list(struct net_device *master)
*/
write_lock_irqsave
(
&
bond
->
lock
,
flags
);
/*
* Lock the master device so that noone trys to transmit
* while we're changing things
*/
spin_lock_bh
(
&
master
->
xmit_lock
);
/* set promiscuity flag to slaves */
if
(
(
master
->
flags
&
IFF_PROMISC
)
&&
!
(
bond
->
flags
&
IFF_PROMISC
)
)
bond_set_promiscuity
(
bond
,
1
);
...
...
@@ -680,7 +677,6 @@ static void set_multicast_list(struct net_device *master)
bond_mc_list_destroy
(
bond
);
bond_mc_list_copy
(
master
->
mc_list
,
bond
,
GFP_KERNEL
);
spin_unlock_bh
(
&
master
->
xmit_lock
);
write_unlock_irqrestore
(
&
bond
->
lock
,
flags
);
}
...
...
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