lkml.org 
[lkml]   [2019]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 5/5] net: dsa: add support for Atheros AR9331 build-in switch
Hi Oleksij

> > > +static void ar9331_sw_port_disable(struct dsa_switch *ds, int port)
> > > +{
> > > + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv;
> > > + struct regmap *regmap = priv->regmap;
> > > + int ret;
> > > +
> > > + ret = regmap_write(regmap, AR9331_SW_REG_PORT_STATUS(port), 0);
> > > + if (ret)
> > > + dev_err_ratelimited(priv->dev, "%s: %i\n", __func__, ret);
> > > +}
> >
> > I've asked this before, but i don't remember the answer. Why are
> > port_enable and port_disable the same?
>
> I have only MAC TX/RX enable bit. This bit is set by phylink_mac_link_up and
> removed by phylink_mac_link_down.
> The port enable I use only to set predictable state of the port
> register: all bits cleared. May be i should just drop port enable
> function? What do you think?

At minimum, it needs a comment about why enable and disable are the
same. If i keep asking, others will as well.

If there is nothing useful to do, then drop it.

Andrew

\
 
 \ /
  Last update: 2019-10-29 13:40    [W:0.062 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site