Lines Matching defs:priv
48 #define to_mvsw(_phy) ((struct mvswitch_priv *) (_phy)->priv)
66 struct mvswitch_priv *priv;
70 priv = dev->phy_ptr;
71 if (unlikely(!priv))
92 if (unlikely((vid > 15 || !priv->vlans[vid])))
124 ((priv->vlans[vid] << MV_HEADER_PORTS_S) & MV_HEADER_PORTS_M)
130 ((priv->vlans[vid] & MV_TRAILER_PORTS_M) << MV_TRAILER_PORTS_S)
149 struct mvswitch_priv *priv;
154 priv = dev->phy_ptr;
155 if (WARN_ON_ONCE(!priv))
168 for (i = 0; i < ARRAY_SIZE(priv->vlans); i++) {
169 if ((1 << buf[1]) & priv->vlans[i])
197 struct mvswitch_priv *priv = to_mvsw(pdev);
208 dev->phy_ptr = priv;
216 priv->vlans[(i == MV_WANPORT ? 2 : 1)] |= (1 << i);
259 for (j = 0; j < ARRAY_SIZE(priv->vlans); j++) {
260 if (priv->vlans[j] & (1 << i)) {
261 vlmap = priv->vlans[j];
306 priv->orig_features = dev->features;
353 struct mvswitch_priv *priv = to_mvsw(pdev);
359 dev->features = priv->orig_features;
361 kfree(priv);
367 struct mvswitch_priv *priv;
369 priv = kzalloc(sizeof(struct mvswitch_priv), GFP_KERNEL);
370 if (priv == NULL)
373 pdev->priv = priv;