Lines Matching refs:mst
1838 struct mv88e6xxx_mst *mst; in mv88e6xxx_sid_get() local
1842 list_for_each_entry(mst, &chip->msts, node) in mv88e6xxx_sid_get()
1843 __set_bit(mst->stu.sid, busy); in mv88e6xxx_sid_get()
1852 struct mv88e6xxx_mst *mst, *tmp; in mv88e6xxx_mst_put() local
1858 list_for_each_entry_safe(mst, tmp, &chip->msts, node) { in mv88e6xxx_mst_put()
1859 if (mst->stu.sid != sid) in mv88e6xxx_mst_put()
1862 if (!refcount_dec_and_test(&mst->refcnt)) in mv88e6xxx_mst_put()
1865 mst->stu.valid = false; in mv88e6xxx_mst_put()
1866 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_put()
1868 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_put()
1872 list_del(&mst->node); in mv88e6xxx_mst_put()
1873 kfree(mst); in mv88e6xxx_mst_put()
1883 struct mv88e6xxx_mst *mst; in mv88e6xxx_mst_get() local
1896 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_mst_get()
1897 if (mst->br == br && mst->msti == msti) { in mv88e6xxx_mst_get()
1898 refcount_inc(&mst->refcnt); in mv88e6xxx_mst_get()
1899 *sid = mst->stu.sid; in mv88e6xxx_mst_get()
1908 mst = kzalloc(sizeof(*mst), GFP_KERNEL); in mv88e6xxx_mst_get()
1909 if (!mst) { in mv88e6xxx_mst_get()
1914 INIT_LIST_HEAD(&mst->node); in mv88e6xxx_mst_get()
1915 refcount_set(&mst->refcnt, 1); in mv88e6xxx_mst_get()
1916 mst->br = br; in mv88e6xxx_mst_get()
1917 mst->msti = msti; in mv88e6xxx_mst_get()
1918 mst->stu.valid = true; in mv88e6xxx_mst_get()
1919 mst->stu.sid = *sid; in mv88e6xxx_mst_get()
1927 mst->stu.state[i] = dsa_is_user_port(chip->ds, i) ? in mv88e6xxx_mst_get()
1931 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_mst_get()
1935 list_add_tail(&mst->node, &chip->msts); in mv88e6xxx_mst_get()
1939 kfree(mst); in mv88e6xxx_mst_get()
1949 struct mv88e6xxx_mst *mst; in mv88e6xxx_port_mst_state_set() local
1972 list_for_each_entry(mst, &chip->msts, node) { in mv88e6xxx_port_mst_state_set()
1973 if (mst->br == dsa_port_bridge_dev_get(dp) && in mv88e6xxx_port_mst_state_set()
1974 mst->msti == st->msti) { in mv88e6xxx_port_mst_state_set()
1975 if (mst->stu.state[port] == state) in mv88e6xxx_port_mst_state_set()
1978 mst->stu.state[port] = state; in mv88e6xxx_port_mst_state_set()
1980 err = mv88e6xxx_stu_loadpurge(chip, &mst->stu); in mv88e6xxx_port_mst_state_set()