Lines Matching refs:ds
45 static enum dsa_tag_protocol mv88e6060_get_tag_protocol(struct dsa_switch *ds,
121 if (dsa_is_unused_port(priv->ds, p))
130 dsa_is_cpu_port(priv->ds, p) ?
145 (dsa_is_cpu_port(priv->ds, p) ?
146 dsa_user_ports(priv->ds) :
147 BIT(dsa_to_port(priv->ds, p)->cpu_dp->index)));
187 static int mv88e6060_setup(struct dsa_switch *ds)
189 struct mv88e6060_priv *priv = ds->priv;
193 priv->ds = ds;
225 static int mv88e6060_phy_read(struct dsa_switch *ds, int port, int regnum)
227 struct mv88e6060_priv *priv = ds->priv;
238 mv88e6060_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val)
240 struct mv88e6060_priv *priv = ds->priv;
250 static void mv88e6060_phylink_get_caps(struct dsa_switch *ds, int port,
254 struct mv88e6060_priv *priv = ds->priv;
260 dev_err(ds->dev,
271 dev_warn(ds->dev, "port %d: SNI mode not supported\n", port);
306 struct dsa_switch *ds;
322 ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
323 if (!ds)
326 ds->dev = dev;
327 ds->num_ports = MV88E6060_PORTS;
328 ds->priv = priv;
329 ds->dev = dev;
330 ds->ops = &mv88e6060_switch_ops;
332 dev_set_drvdata(dev, ds);
334 return dsa_register_switch(ds);
339 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
341 if (!ds)
344 dsa_unregister_switch(ds);
349 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
351 if (!ds)
354 dsa_switch_shutdown(ds);