[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190617142813.GD25211@lunn.ch>
Date: Mon, 17 Jun 2019 16:28:13 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Ioana Ciornei <ioana.ciornei@....com>
Cc: "linux@...linux.org.uk" <linux@...linux.org.uk>,
"hkallweit1@...il.com" <hkallweit1@...il.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Alexandru Marginean <alexandru.marginean@....com>,
Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>
Subject: Re: [PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object
On Fri, Jun 14, 2019 at 02:06:05PM +0000, Ioana Ciornei wrote:
> > Subject: Re: [PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object
> >
> > > +/**
> > > + * dpmac_set_link_state() - Set the Ethernet link status
> > > + * @mc_io: Pointer to opaque I/O object
> > > + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
> > > + * @token: Token of DPMAC object
> > > + * @link_state: Link state configuration
> > > + *
> > > + * Return: '0' on Success; Error code otherwise.
> > > + */
> > > +int dpmac_set_link_state(struct fsl_mc_io *mc_io,
> > > + u32 cmd_flags,
> > > + u16 token,
> > > + struct dpmac_link_state *link_state) {
> > > + struct dpmac_cmd_set_link_state *cmd_params;
> > > + struct fsl_mc_command cmd = { 0 };
> > > +
> > > + /* prepare command */
> > > + cmd.header =
> > mc_encode_cmd_header(DPMAC_CMDID_SET_LINK_STATE,
> > > + cmd_flags,
> > > + token);
> > > + cmd_params = (struct dpmac_cmd_set_link_state *)cmd.params;
> > > + cmd_params->options = cpu_to_le64(link_state->options);
> > > + cmd_params->rate = cpu_to_le32(link_state->rate);
> > > + dpmac_set_field(cmd_params->state, STATE, link_state->up);
> > > + dpmac_set_field(cmd_params->state, STATE_VALID,
> > > + link_state->state_valid);
> > > + cmd_params->supported = cpu_to_le64(link_state->supported);
> > > + cmd_params->advertising = cpu_to_le64(link_state->advertising);
> >
> > I don't understand what supported and advertising mean in the context of a
> > MAC. PHY yes, but MAC?
>
> It's still in the context of the PHY.
If this is for the PHY why are you not using DPNI? That is the object
which represents the PHY.
> As stated in the previous reply, the MAC can do pause, asym pause
> but not half duplex or EEE.
I'm very surprised it cannot do EEE! I hope the firmware is getting
the auto-neg advertisement correct.
Andrew
Powered by blists - more mailing lists