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
f71c419e
Commit
f71c419e
authored
Sep 28, 2002
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[net drivers] add optional duplex-changed arg to generic_mii_ioctl helper
parent
ec7689a2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
23 deletions
+18
-23
drivers/net/8139cp.c
drivers/net/8139cp.c
+3
-3
drivers/net/8139too.c
drivers/net/8139too.c
+1
-4
drivers/net/epic100.c
drivers/net/epic100.c
+1
-3
drivers/net/fealnx.c
drivers/net/fealnx.c
+1
-3
drivers/net/mii.c
drivers/net/mii.c
+8
-3
drivers/net/sundance.c
drivers/net/sundance.c
+1
-3
drivers/net/via-rhine.c
drivers/net/via-rhine.c
+1
-3
include/linux/mii.h
include/linux/mii.h
+2
-1
No files found.
drivers/net/8139cp.c
View file @
f71c419e
...
...
@@ -1664,9 +1664,9 @@ static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
if
(
cmd
==
SIOCETHTOOL
)
return
cp_ethtool_ioctl
(
cp
,
(
void
*
)
rq
->
ifr_data
);
rc
=
generic_mii_ioctl
(
&
cp
->
mii_if
,
mii
,
cmd
);
if
(
rc
==
1
)
/* we don't care about duplex change, fixup rc */
rc
=
0
;
spin_lock_irq
(
&
cp
->
lock
);
rc
=
generic_mii_ioctl
(
&
cp
->
mii_if
,
mii
,
cmd
,
NULL
);
spin_unlock_irq
(
&
cp
->
lock
)
;
return
rc
;
}
...
...
drivers/net/8139too.c
View file @
f71c419e
...
...
@@ -2454,11 +2454,8 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else
{
spin_lock_irq
(
&
np
->
lock
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
,
NULL
);
spin_unlock_irq
(
&
np
->
lock
);
if
(
rc
==
1
)
/* don't care about duplex change, fix up rc */
rc
=
0
;
}
return
rc
;
...
...
drivers/net/epic100.c
View file @
f71c419e
...
...
@@ -1446,10 +1446,8 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
/* all other ioctls (the SIOC[GS]MIIxxx ioctls) */
else
{
spin_lock_irq
(
&
np
->
lock
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
,
NULL
);
spin_unlock_irq
(
&
np
->
lock
);
if
(
rc
==
1
)
/* don't care about duplex change, fixup rc */
rc
=
0
;
}
/* power-down, if interface is down */
...
...
drivers/net/fealnx.c
View file @
f71c419e
...
...
@@ -1847,10 +1847,8 @@ static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else
{
spin_lock_irq
(
&
np
->
lock
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
);
rc
=
generic_mii_ioctl
(
&
np
->
mii
,
data
,
cmd
,
NULL
);
spin_unlock_irq
(
&
np
->
lock
);
if
(
rc
==
1
)
/* don't care about duplex change, fix up rc */
rc
=
0
;
}
return
rc
;
...
...
drivers/net/mii.c
View file @
f71c419e
...
...
@@ -262,11 +262,15 @@ unsigned int mii_check_media (struct mii_if_info *mii,
}
int
generic_mii_ioctl
(
struct
mii_if_info
*
mii_if
,
struct
mii_ioctl_data
*
mii_data
,
int
cmd
)
struct
mii_ioctl_data
*
mii_data
,
int
cmd
,
unsigned
int
*
duplex_chg_out
)
{
int
rc
=
0
;
unsigned
int
duplex_changed
=
0
;
if
(
duplex_chg_out
)
*
duplex_chg_out
=
0
;
mii_data
->
phy_id
&=
mii_if
->
phy_id_mask
;
mii_data
->
reg_num
&=
mii_if
->
reg_num_mask
;
...
...
@@ -323,8 +327,9 @@ int generic_mii_ioctl(struct mii_if_info *mii_if,
break
;
}
if
((
rc
==
0
)
&&
(
duplex_changed
))
rc
=
1
;
if
((
rc
==
0
)
&&
(
duplex_chg_out
)
&&
(
duplex_changed
))
*
duplex_chg_out
=
1
;
return
rc
;
}
...
...
drivers/net/sundance.c
View file @
f71c419e
...
...
@@ -1564,10 +1564,8 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else
{
spin_lock_irq
(
&
np
->
lock
);
rc
=
generic_mii_ioctl
(
&
np
->
mii_if
,
data
,
cmd
);
rc
=
generic_mii_ioctl
(
&
np
->
mii_if
,
data
,
cmd
,
NULL
);
spin_unlock_irq
(
&
np
->
lock
);
if
(
rc
==
1
)
/* don't care about duplex change, fix up rc */
rc
=
0
;
}
return
rc
;
...
...
drivers/net/via-rhine.c
View file @
f71c419e
...
...
@@ -1686,10 +1686,8 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else
{
spin_lock_irq
(
&
np
->
lock
);
rc
=
generic_mii_ioctl
(
&
np
->
mii_if
,
data
,
cmd
);
rc
=
generic_mii_ioctl
(
&
np
->
mii_if
,
data
,
cmd
,
NULL
);
spin_unlock_irq
(
&
np
->
lock
);
if
(
rc
==
1
)
/* don't care about duplex change, fix up rc */
rc
=
0
;
}
return
rc
;
...
...
include/linux/mii.h
View file @
f71c419e
...
...
@@ -130,7 +130,8 @@ extern unsigned int mii_check_media (struct mii_if_info *mii,
unsigned
int
ok_to_print
,
unsigned
int
init_media
);
extern
int
generic_mii_ioctl
(
struct
mii_if_info
*
mii_if
,
struct
mii_ioctl_data
*
mii_data
,
int
cmd
);
struct
mii_ioctl_data
*
mii_data
,
int
cmd
,
unsigned
int
*
duplex_changed
);
...
...
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