Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
ca42df73
Commit
ca42df73
authored
Oct 10, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eeprom: don't pass redundant parameters to eeprom_match_sfp
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
c46b5b0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
eeprom.c
dev/eeprom.c
+1
-1
sdb-eeprom.c
dev/sdb-eeprom.c
+2
-2
eeprom.h
include/eeprom.h
+1
-1
cmd_sfp.c
shell/cmd_sfp.c
+1
-1
No files found.
dev/eeprom.c
View file @
ca42df73
...
...
@@ -201,7 +201,7 @@ int32_t eeprom_get_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo * sfp,
return
sfpcount
;
}
int
8_t
eeprom_match_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
)
int
eeprom_match_sfp
(
struct
s_sfpinfo
*
sfp
)
{
uint8_t
sfpcount
=
1
;
int8_t
i
,
temp
;
...
...
dev/sdb-eeprom.c
View file @
ca42df73
...
...
@@ -350,14 +350,14 @@ out:
return
0
;
}
int
8_t
eeprom_match_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
)
int
eeprom_match_sfp
(
struct
s_sfpinfo
*
sfp
)
{
uint8_t
sfpcount
=
1
;
int8_t
i
,
temp
;
struct
s_sfpinfo
dbsfp
;
for
(
i
=
0
;
i
<
sfpcount
;
++
i
)
{
temp
=
eeprom_get_sfp
(
i2c
if
,
i2c_
addr
,
temp
=
eeprom_get_sfp
(
i2c
_params
.
ifnum
,
i2c_params
.
addr
,
&
dbsfp
,
0
,
i
);
if
(
!
i
)
{
// first round: valid sfpcount is returned
...
...
include/eeprom.h
View file @
ca42df73
...
...
@@ -30,7 +30,7 @@ struct s_sfpinfo {
void
eeprom_init
(
int
i2cif
,
int
i2c_addr
);
int
eeprom_sfpdb_erase
(
void
);
int
8_t
eeprom_match_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
);
int
eeprom_match_sfp
(
struct
s_sfpinfo
*
sfp
);
int8_t
eeprom_phtrans
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
uint32_t
*
val
,
uint8_t
write
);
...
...
shell/cmd_sfp.c
View file @
ca42df73
...
...
@@ -99,7 +99,7 @@ static int cmd_sfp(const char *args[])
return
0
;
}
strncpy
(
sfp
.
pn
,
pn
,
SFP_PN_LEN
);
if
(
eeprom_match_sfp
(
WRPC_FMC_I2C
,
FMC_EEPROM_ADR
,
&
sfp
)
>
0
)
{
if
(
eeprom_match_sfp
(
&
sfp
)
>
0
)
{
mprintf
(
"SFP matched, dTx=%d, dRx=%d, alpha=%d
\n
"
,
sfp
.
dTx
,
sfp
.
dRx
,
sfp
.
alpha
);
sfp_deltaTx
=
sfp
.
dTx
;
...
...
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