Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
5f787a1a
Commit
5f787a1a
authored
Aug 17, 2006
by
Francois Romieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
r8169: add basic MII ioctl support
Signed-off-by:
Francois Romieu
<
romieu@fr.zoreil.com
>
parent
64e4bfb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
drivers/net/r8169.c
drivers/net/r8169.c
+28
-0
No files found.
drivers/net/r8169.c
View file @
5f787a1a
...
...
@@ -1475,6 +1475,32 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
printk
(
KERN_INFO
PFX
"%s: TBI auto-negotiating
\n
"
,
dev
->
name
);
}
static
int
rtl8169_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
)
{
struct
rtl8169_private
*
tp
=
netdev_priv
(
dev
);
struct
mii_ioctl_data
*
data
=
if_mii
(
ifr
);
if
(
!
netif_running
(
dev
))
return
-
ENODEV
;
switch
(
cmd
)
{
case
SIOCGMIIPHY
:
data
->
phy_id
=
32
;
/* Internal PHY */
return
0
;
case
SIOCGMIIREG
:
data
->
val_out
=
mdio_read
(
tp
->
mmio_addr
,
data
->
reg_num
&
0x1f
);
return
0
;
case
SIOCSMIIREG
:
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
mdio_write
(
tp
->
mmio_addr
,
data
->
reg_num
&
0x1f
,
data
->
val_in
);
return
0
;
}
return
-
EOPNOTSUPP
;
}
static
int
__devinit
rtl8169_init_one
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
{
...
...
@@ -1639,6 +1665,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp
->
phy_reset_enable
=
rtl8169_xmii_reset_enable
;
tp
->
phy_reset_pending
=
rtl8169_xmii_reset_pending
;
tp
->
link_ok
=
rtl8169_xmii_link_ok
;
dev
->
do_ioctl
=
rtl8169_ioctl
;
}
/* Get MAC address. FIXME: read EEPROM */
...
...
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