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
ba62b2a8
Commit
ba62b2a8
authored
May 05, 2012
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Implement module EEPROM access for SFE4002 and SFN4112F
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
c087bd2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
drivers/net/ethernet/sfc/qt202x_phy.c
drivers/net/ethernet/sfc/qt202x_phy.c
+33
-0
No files found.
drivers/net/ethernet/sfc/qt202x_phy.c
View file @
ba62b2a8
...
...
@@ -449,6 +449,37 @@ static void qt202x_phy_remove(struct efx_nic *efx)
efx
->
phy_data
=
NULL
;
}
static
int
qt202x_phy_get_module_info
(
struct
efx_nic
*
efx
,
struct
ethtool_modinfo
*
modinfo
)
{
modinfo
->
type
=
ETH_MODULE_SFF_8079
;
modinfo
->
eeprom_len
=
ETH_MODULE_SFF_8079_LEN
;
return
0
;
}
static
int
qt202x_phy_get_module_eeprom
(
struct
efx_nic
*
efx
,
struct
ethtool_eeprom
*
ee
,
u8
*
data
)
{
int
mmd
,
reg_base
,
rc
,
i
;
if
(
efx
->
phy_type
==
PHY_TYPE_QT2025C
)
{
mmd
=
MDIO_MMD_PCS
;
reg_base
=
0xd000
;
}
else
{
mmd
=
MDIO_MMD_PMAPMD
;
reg_base
=
0x8007
;
}
for
(
i
=
0
;
i
<
ee
->
len
;
i
++
)
{
rc
=
efx_mdio_read
(
efx
,
mmd
,
reg_base
+
ee
->
offset
+
i
);
if
(
rc
<
0
)
return
rc
;
data
[
i
]
=
rc
;
}
return
0
;
}
const
struct
efx_phy_operations
falcon_qt202x_phy_ops
=
{
.
probe
=
qt202x_phy_probe
,
.
init
=
qt202x_phy_init
,
...
...
@@ -459,4 +490,6 @@ const struct efx_phy_operations falcon_qt202x_phy_ops = {
.
get_settings
=
qt202x_phy_get_settings
,
.
set_settings
=
efx_mdio_set_settings
,
.
test_alive
=
efx_mdio_test_alive
,
.
get_module_eeprom
=
qt202x_phy_get_module_eeprom
,
.
get_module_info
=
qt202x_phy_get_module_info
,
};
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