Skip to content

Commit

Permalink
realtek: dsa: increase RTL839x max phy page to 8191
Browse files Browse the repository at this point in the history
According to the specs the RTL839x provides up to 8192 phy pages.
Especially the "raw" page 8191 is used for different initialization
tasks. Increase the limit.

Signed-off-by: Markus Stockhausen <[email protected]>
  • Loading branch information
plappermaul committed Sep 22, 2024
1 parent 6a40c04 commit a4afda4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ int rtl839x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
u32 v;
int err = 0;

if (port > 63 || page > 4095 || reg > 31)
if (port > 63 || page > 8191 || reg > 31)
return -ENOTSUPP;

/* Take bug on RTL839x Rev <= C into account */
Expand Down Expand Up @@ -698,7 +698,7 @@ int rtl839x_write_phy(u32 port, u32 page, u32 reg, u32 val)
int err = 0;

val &= 0xffff;
if (port > 63 || page > 4095 || reg > 31)
if (port > 63 || page > 8191 || reg > 31)
return -ENOTSUPP;

/* Take bug on RTL839x Rev <= C into account */
Expand Down

0 comments on commit a4afda4

Please sign in to comment.