Subject: Re: [PATCH net-next v2] net: sfp: soft status and control support

From: Russell King - ARM Linux admin <[email-masked]>
Date: Thu, 21 Nov 2019 23:17:09 +0000

On Thu, Nov 21, 2019 at 07:14:01PM +0000, Ioana Ciornei wrote:
> > Subject: Re: [PATCH net-next v2] net: sfp: soft status and control support
> > 
> > On Thu, Nov 21, 2019 at 06:33:41PM +0000, Ioana Ciornei wrote:
> > >
> > > > Subject: Re: [PATCH net-next v2] net: sfp: soft status and control
> > > > support
> > > >
> > > > On Thu, Nov 21, 2019 at 03:51:07PM +0000, Ioana Ciornei wrote:
> > > > > > Subject: [PATCH net-next v2] net: sfp: soft status and control
> > > > > > support
> > > > > >
> > > > > > Add support for the soft status and control register, which
> > > > > > allows TX_FAULT and RX_LOS to be monitored and TX_DISABLE to be
> > > > > > set.  We make use of this when the board does not support GPIOs
> > > > > > for these
> > > > signals.
> > > > >
> > > > > Hi Russell,
> > > > >
> > > > > With this addition, shouldn't the following print be removed?
> > > > >
> > > > > [    2.967583] sfp sfp-mac4: No tx_disable pin: SFP modules will always be
> > > > emitting.
> > > >
> > > > No, because modules do not have to provide the soft controls.
> > > >
> > >
> > > I understand that the soft controls are optional but can't we read
> > > byte 93 (Enhanced Options) and see if bit 6 (Optional soft TX_DISABLE
> > > control) is set or not (ie the soft TX_DISABLE is implemented)?
> > 
> > At cage initialisation time, when we don't know whether there's a module
> > present or not?
> > 
> 
> I was not suggesting to keep the print exactly in place.
> Anyway, it was merely a curiosity because it can be a misleading info in
> some situations.

However, it's the safe thing to do, to assume that the module soft
TX disable may not be implemented or working.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up