From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BA09C31E5C for ; Mon, 17 Jun 2019 14:28:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 042D62084D for ; Mon, 17 Jun 2019 14:28:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="EJIBwP/1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbfFQO2V (ORCPT ); Mon, 17 Jun 2019 10:28:21 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33194 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfFQO2U (ORCPT ); Mon, 17 Jun 2019 10:28:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2ill3+BPg+PjYSkFeffTLMYEsH7eA76ZuTeUwvDT5ig=; b=EJIBwP/1X4q3GB6IpNCDIptbCh il2B7WWqPOsjMq8H6R/+1nj6lXipox0lrztKuamG2jk6dlnY8WeE4Tc/uzsyNaoZrxoO/DkDQLqjj eZogdnHYOdwXb3CDHB4MbZuq4cdduJiP/b3bI7S2d0mv3QP4Ce/yQPel+OphB29GBB6s=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hcscH-000837-Mc; Mon, 17 Jun 2019 16:28:13 +0200 Date: Mon, 17 Jun 2019 16:28:13 +0200 From: Andrew Lunn To: Ioana Ciornei Cc: "linux@armlinux.org.uk" , "hkallweit1@gmail.com" , "f.fainelli@gmail.com" , "davem@davemloft.net" , "netdev@vger.kernel.org" , Alexandru Marginean , Ioana Ciocoi Radulescu Subject: Re: [PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object Message-ID: <20190617142813.GD25211@lunn.ch> References: <1560470153-26155-1-git-send-email-ioana.ciornei@nxp.com> <1560470153-26155-4-git-send-email-ioana.ciornei@nxp.com> <20190614011224.GC28822@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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