Lines Matching refs:mst
1845 struct mv88e6xxx_mst *mst; in mv88e6xxx_sid_get() local
1849 list_for_each_entry(mst, &chip->msts, node) in mv88e6xxx_sid_get()
1850 __set_bit(mst->stu.sid, busy); in mv88e6xxx_sid_get()
1859 struct mv88e6xxx_mst *mst, *tmp; in mv88e6xxx_mst_put() local
1865 list_for_each_entry_safe(mst, tmp, &chip->msts, node) { in mv88e6xxx_mst_put()
1866 if (mst->stu.sid != sid) in mv88e6xxx_mst_put()
1869 if (!refcount_dec_and_test(&mst->refcnt)) in mv88e6xxx_mst_put()
1872 mst->stu.valid = false; in mv88e6xxx_mst_put()
1873 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_put()
1875 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_put()
1879 list_del(&mst->node); in mv88e6xxx_mst_put()
1880 kfree(mst); in mv88e6xxx_mst_put()
1890 struct mv88e6xxx_mst *mst; in mv88e6xxx_mst_get() local
1903 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_mst_get()
1904 if (mst->br == br && mst->msti == msti) { in mv88e6xxx_mst_get()
1905 refcount_inc(&mst->refcnt); in mv88e6xxx_mst_get()
1906 *sid = mst->stu.sid; in mv88e6xxx_mst_get()
1915 mst = kzalloc(sizeof(*mst), GFP_KERNEL); in mv88e6xxx_mst_get()
1916 if (!mst) { in mv88e6xxx_mst_get()
1921 INIT_LIST_HEAD(&mst->node); in mv88e6xxx_mst_get()
1922 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_get()
1923 mst->br = br; in mv88e6xxx_mst_get()
1924 mst->msti = msti; in mv88e6xxx_mst_get()
1925 mst->stu.valid = true; in mv88e6xxx_mst_get()
1926 mst->stu.sid = *sid; in mv88e6xxx_mst_get()
1934 mst->stu.state[i] = dsa_is_user_port(chip->ds, i) ? in mv88e6xxx_mst_get()
1938 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_get()
1942 list_add_tail(&mst->node, &chip->msts); in mv88e6xxx_mst_get()
1946 kfree(mst); in mv88e6xxx_mst_get()
1956 struct mv88e6xxx_mst *mst; in mv88e6xxx_port_mst_state_set() local
1979 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_port_mst_state_set()
1980 if (mst->br == dsa_port_bridge_dev_get(dp) && in mv88e6xxx_port_mst_state_set()
1981 mst->msti == st->msti) { in mv88e6xxx_port_mst_state_set()
1982 if (mst->stu.state[port] == state) in mv88e6xxx_port_mst_state_set()
1985 mst->stu.state[port] = state; in mv88e6xxx_port_mst_state_set()
1987 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_port_mst_state_set()