lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Patch v3 net-next 7/7] octeontx2-pf: ethtool physical link configuration
Date
Hi Jakub,



> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Friday, February 5, 2021 12:21 AM
> To: Hariprasad Kelam <hkelam@marvell.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> davem@davemloft.net; willemdebruijn.kernel@gmail.com;
> andrew@lunn.ch; Sunil Kovvuri Goutham <sgoutham@marvell.com>; Linu
> Cherian <lcherian@marvell.com>; Geethasowjanya Akula
> <gakula@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> Subbaraya Sundeep Bhatta <sbhatta@marvell.com>
> Subject: [EXT] Re: [Patch v3 net-next 7/7] octeontx2-pf: ethtool physical link
> configuration
>
> On Thu, 4 Feb 2021 17:37:41 +0000 Hariprasad Kelam wrote:
> > > > + req->args.speed = req_ks.base.speed;
> > > > + /* firmware expects 1 for half duplex and 0 for full duplex
> > > > + * hence inverting
> > > > + */
> > > > + req->args.duplex = req_ks.base.duplex ^ 0x1;
> > > > + req->args.an = req_ks.base.autoneg;
> > > > + otx2_get_advertised_mode(&req_ks, &req->args.mode);
> > >
> > > But that only returns the first bit set. What does the device
> > > actually do? What if the user cleared a middle bit?
> > >
> > This is initial patch series to support advertised modes. Current
> > firmware design is such that It can handle only one advertised mode.
> > Due to this limitation we are always checking The first set bit in advertised
> modes and passing it to firmware.
> > Will add multi advertised mode support in near future.
>
> Looking at patch 6 it seems like the get side already supports multiple modes,
> although the example output only lists supported no advertised.
>
> Is the device actually doing IEEE autoneg or just configures the speed, lanes
> etc. according to the link mode selected?

Device supports IEEE autoneg mode. Agreed get_link_ksetting returns multiple modes .
But set side firmware code designed in such way that it handles single mode. Upon
Successful configuration firmware updates advertised modes to shared memory
such that kernel will read and updates to ethtool.

Thanks,
Hariprasad k

\
 
 \ /
  Last update: 2021-02-05 17:23    [W:0.104 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site