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
32
Issues
32
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
755b9cab
Commit
755b9cab
authored
Oct 10, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eeprom: don't pass redundant parameters to sfpdb_erase()
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
ab8e3c9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
eeprom.c
dev/eeprom.c
+1
-1
sdb-eeprom.c
dev/sdb-eeprom.c
+1
-1
eeprom.h
include/eeprom.h
+1
-1
cmd_sfp.c
shell/cmd_sfp.c
+1
-1
No files found.
dev/eeprom.c
View file @
755b9cab
...
@@ -134,7 +134,7 @@ static int eeprom_write(uint8_t i2cif, uint8_t i2c_addr, uint32_t offset,
...
@@ -134,7 +134,7 @@ static int eeprom_write(uint8_t i2cif, uint8_t i2c_addr, uint32_t offset,
return
size
;
return
size
;
}
}
int32_t
eeprom_sfpdb_erase
(
uint8_t
i2cif
,
uint8_t
i2c_addr
)
int32_t
eeprom_sfpdb_erase
(
void
)
{
{
uint8_t
sfpcount
=
0
;
uint8_t
sfpcount
=
0
;
...
...
dev/sdb-eeprom.c
View file @
755b9cab
...
@@ -275,7 +275,7 @@ int set_persistent_mac(uint8_t portnum, uint8_t * mac)
...
@@ -275,7 +275,7 @@ int set_persistent_mac(uint8_t portnum, uint8_t * mac)
/* Just a dummy function that writes '0' to sfp count field of the SFP DB */
/* Just a dummy function that writes '0' to sfp count field of the SFP DB */
int32_t
eeprom_sfpdb_erase
(
uint8_t
i2cif
,
uint8_t
i2c_addr
)
int32_t
eeprom_sfpdb_erase
(
void
)
{
{
uint8_t
sfpcount
=
0
;
uint8_t
sfpcount
=
0
;
int
ret
;
int
ret
;
...
...
include/eeprom.h
View file @
755b9cab
...
@@ -29,7 +29,7 @@ struct s_sfpinfo {
...
@@ -29,7 +29,7 @@ struct s_sfpinfo {
void
eeprom_init
(
int
i2cif
,
int
i2c_addr
);
void
eeprom_init
(
int
i2cif
,
int
i2c_addr
);
int
32_t
eeprom_sfpdb_erase
(
uint8_t
i2cif
,
uint8_t
i2c_addr
);
int
eeprom_sfpdb_erase
(
void
);
int32_t
eeprom_sfp_section
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
size_t
size
,
int32_t
eeprom_sfp_section
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
size_t
size
,
uint16_t
*
section_sz
);
uint16_t
*
section_sz
);
int8_t
eeprom_match_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
);
int8_t
eeprom_match_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
);
...
...
shell/cmd_sfp.c
View file @
755b9cab
...
@@ -51,7 +51,7 @@ static int cmd_sfp(const char *args[])
...
@@ -51,7 +51,7 @@ static int cmd_sfp(const char *args[])
// return 0;
// return 0;
// }
// }
else
if
(
!
strcasecmp
(
args
[
0
],
"erase"
))
{
else
if
(
!
strcasecmp
(
args
[
0
],
"erase"
))
{
if
(
eeprom_sfpdb_erase
(
WRPC_FMC_I2C
,
FMC_EEPROM_ADR
)
==
if
(
eeprom_sfpdb_erase
()
==
EE_RET_I2CERR
)
EE_RET_I2CERR
)
mprintf
(
"Could not erase DB
\n
"
);
mprintf
(
"Could not erase DB
\n
"
);
}
else
if
(
args
[
4
]
&&
!
strcasecmp
(
args
[
0
],
"add"
))
{
}
else
if
(
args
[
4
]
&&
!
strcasecmp
(
args
[
0
],
"add"
))
{
...
...
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