lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 1 Jul 2024 13:49:51 +0000
From: "Kolacinski, Karol" <karol.kolacinski@...el.com>
To: Paul Menzel <pmenzel@...gen.mpg.de>, "Temerkhanov, Sergey"
	<sergey.temerkhanov@...el.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Kubalewski, Arkadiusz"
	<arkadiusz.kubalewski@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 7/7] ice: Enable 1PPS out from
 CGU for E825C products

Hi Paul,

Thank you for your feedback!

On 6/27/2024 5:37 PM, Paul Menzel wrote:
> > @@ -1708,6 +1709,15 @@ static int ice_ptp_write_perout(struct ice_hw *hw, unsigned int chan,
> >        /* 0. Reset mode & out_en in AUX_OUT */
> >        wr32(hw, GLTSYN_AUX_OUT(chan, tmr_idx), 0);
> >  
> > +     if (ice_is_e825c(hw)) {
> > +             int err;
> > +
> > +             /* Enable/disable CGU 1PPS output for E825C */
> > +             err = ice_cgu_ena_pps_out(hw, !!period);
> > +             if (err)
> > +                     return err;
> > +     }
> 
> Does only E825C products support this feature?

Yes, it's only necessary for E825C, other products don't need or support
it.

> > +/**
> > + * ice_cgu_ena_pps_out - Enable/disable 1PPS output
> > + * @hw: pointer to the HW struct
> > + * @ena: Enable/disable 1PPS output
> > + */
> > +int ice_cgu_ena_pps_out(struct ice_hw *hw, bool ena)
> 
> Is `ena` short for enable?

Yes. I guess for the function argument 'enable' would be better.

> > diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> > index ff98f76969e3..382e84568256 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> > +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> > @@ -331,6 +331,7 @@ extern const struct ice_vernier_info_e82x e822_vernier[NUM_ICE_PTP_LNK_SPD];
> >  
> >   /* Device agnostic functions */
> >   u8 ice_get_ptp_src_clock_index(struct ice_hw *hw);
> > +int ice_cgu_ena_pps_out(struct ice_hw *hw, bool ena);
> 
> If *ena* means “enable”, I do not like this pattern very much, and I’d
> prefer an enable and a disable function.

Good point regarding the name, I guess I should use 'cfg' instead of
'ena' in this case to be clear that this function doesn't only enable
PPS output.

That said, I don't see a point to use two separate functions for
a simple enable/disable functionality. From my point of view, ~20 lines
for 2 lines of actual code difference would be unnecessarily redundant.

Kind regards,
Karol

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ