Skip to content
This repository has been archived by the owner on Jun 25, 2018. It is now read-only.

Commit

Permalink
generic: rtl8367b: map external ports
Browse files Browse the repository at this point in the history
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports.
RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7).
RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6).
Map ports so that extif0 complies to external port 0 or 1 depending on chip ID.

Signed-off-by: Vitaly Chekryzhev <[email protected]>
  • Loading branch information
13hakta committed Jun 17, 2018
1 parent 71d7d68 commit 1bdec2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target/linux/generic/files/drivers/net/phy/rtl8367b.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,10 @@ static int rtl8367b_extif_init(struct rtl8366_smi *smi, int id,

mode = (cfg) ? cfg->mode : RTL8367_EXTIF_MODE_DISABLED;

/* Map external port ID. V-RB has ext ports: 0,1; RB: 1,2 */
if (smi->chip_ver == 0x1000)
id++;

err = rtl8367b_extif_set_mode(smi, id, mode);
if (err)
return err;
Expand Down

0 comments on commit 1bdec2c

Please sign in to comment.