Lines Matching refs:mst
1863 struct mv88e6xxx_mst *mst; in mv88e6xxx_sid_get() local
1867 list_for_each_entry(mst, &chip->msts, node) in mv88e6xxx_sid_get()
1868 __set_bit(mst->stu.sid, busy); in mv88e6xxx_sid_get()
1877 struct mv88e6xxx_mst *mst, *tmp; in mv88e6xxx_mst_put() local
1883 list_for_each_entry_safe(mst, tmp, &chip->msts, node) { in mv88e6xxx_mst_put()
1884 if (mst->stu.sid != sid) in mv88e6xxx_mst_put()
1887 if (!refcount_dec_and_test(&mst->refcnt)) in mv88e6xxx_mst_put()
1890 mst->stu.valid = false; in mv88e6xxx_mst_put()
1891 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_put()
1893 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_put()
1897 list_del(&mst->node); in mv88e6xxx_mst_put()
1898 kfree(mst); in mv88e6xxx_mst_put()
1908 struct mv88e6xxx_mst *mst; in mv88e6xxx_mst_get() local
1921 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_mst_get()
1922 if (mst->br == br && mst->msti == msti) { in mv88e6xxx_mst_get()
1923 refcount_inc(&mst->refcnt); in mv88e6xxx_mst_get()
1924 *sid = mst->stu.sid; in mv88e6xxx_mst_get()
1933 mst = kzalloc(sizeof(*mst), GFP_KERNEL); in mv88e6xxx_mst_get()
1934 if (!mst) { in mv88e6xxx_mst_get()
1939 INIT_LIST_HEAD(&mst->node); in mv88e6xxx_mst_get()
1940 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_get()
1941 mst->br = br; in mv88e6xxx_mst_get()
1942 mst->msti = msti; in mv88e6xxx_mst_get()
1943 mst->stu.valid = true; in mv88e6xxx_mst_get()
1944 mst->stu.sid = *sid; in mv88e6xxx_mst_get()
1952 mst->stu.state[i] = dsa_is_user_port(chip->ds, i) ? in mv88e6xxx_mst_get()
1956 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_get()
1960 list_add_tail(&mst->node, &chip->msts); in mv88e6xxx_mst_get()
1964 kfree(mst); in mv88e6xxx_mst_get()
1974 struct mv88e6xxx_mst *mst; in mv88e6xxx_port_mst_state_set() local
1997 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_port_mst_state_set()
1998 if (mst->br == dsa_port_bridge_dev_get(dp) && in mv88e6xxx_port_mst_state_set()
1999 mst->msti == st->msti) { in mv88e6xxx_port_mst_state_set()
2000 if (mst->stu.state[port] == state) in mv88e6xxx_port_mst_state_set()
2003 mst->stu.state[port] = state; in mv88e6xxx_port_mst_state_set()
2005 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_port_mst_state_set()