> -----Original Message----- > From: Ben Hutchings [mailto:b...@decadent.org.uk] > Sent: Monday, February 22, 2016 3:05 PM > To: David Miller; Woojung Huh - C21699 > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause > functions > > On Mon, 2016-02-22 at 14:10 -0500, David Miller wrote: > > From: <woojung....@microchip.com> > > Date: Mon, 22 Feb 2016 18:28:18 +0000 > > > > >> This is incorrect; you should always return the manual settings > > >> (fc_request_control flags) here. If autonegotiation is enabled then > > >> your get_settings function will return the actual pause flags. > > >> > > > What do you mean "return actual pause flags" when autoneg is enabled? > > > Pause flags set by (or default) advertise flag? > > > > It means what was negotiated by autonegotiation, and is actually in use. > > > > Otherwise, how can the user find out what was negotiated? > > Well, actually we don't *directly* report the autonegotiation flow > control mode at present. We report which pause flags were advertised > and what the link partner advertised, from which you can work it out.
NIC advertises pause flags via advertise register (phy reg 0x4) based on Rx & Tx flags, and get_pauseparam() returns Rx & Tx flags set by set_pauseparm() if autonegotiation is enabled? > Perhaps ethtool (the utility) should explicitly show what the result > is. Ethtool -a reports Rx/Tx flags and Rx/Tx negotiated flag based on advertising and lp_advertising value.