net: dsa: mv88e6xxx: get STU entry on VTU GetNext
Now that the code reads both VTU and STU data on VTU GetNext operation, fetch the STU entry data of a VTU entry at the same time. The STU data bits are masked with the VTU data bits and they are now all read at the same time a VTU GetNext operation is issued. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -194,6 +194,28 @@ int mv88e6xxx_g1_vtu_stu_getnext(struct mv88e6xxx_chip *chip,
|
||||
return mv88e6xxx_g1_vtu_vid_read(chip, entry);
|
||||
}
|
||||
|
||||
int mv88e6xxx_g1_vtu_stu_get(struct mv88e6xxx_chip *chip,
|
||||
struct mv88e6xxx_vtu_entry *vtu)
|
||||
{
|
||||
struct mv88e6xxx_vtu_entry stu;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_vtu_sid_read(chip, vtu);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
stu.sid = vtu->sid - 1;
|
||||
|
||||
err = mv88e6xxx_g1_vtu_stu_getnext(chip, &stu);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (stu.sid != vtu->sid || !stu.valid)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mv88e6xxx_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
|
||||
struct mv88e6xxx_vtu_entry *entry)
|
||||
{
|
||||
|
在新工单中引用
屏蔽一个用户