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]
Message-ID: <20200929171030.GC3996795@lunn.ch>
Date:   Tue, 29 Sep 2020 19:10:30 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Igor Russkikh <irusskikh@...vell.com>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next 2/3] net: atlantic: implement phy downshift
 feature

> +int aq_nic_set_downshift(struct aq_nic_s *self)
> +{
> +	int err = 0;
> +	struct aq_nic_cfg_s *cfg = &self->aq_nic_cfg;
> +
> +	if (!self->aq_fw_ops->set_downshift)
> +		return -EOPNOTSUPP;
> +
> +	if (ATL_HW_IS_CHIP_FEATURE(self->aq_hw, ANTIGUA)) {
> +		if (cfg->downshift_counter > 15)
> +			cfg->downshift_counter = 15;
> +	} else {
> +		if (cfg->downshift_counter > 255)
> +			cfg->downshift_counter = 255;
> +	}

Hi Igor

I think all other implementations return -EINVAL or -E2BIG or similar
when the value is not supported.

Also, given that a u8 is being passed, is cfg->downshift_counter > 255
possible? I'm not even sure 255 makes any sense. Autoneg takes around
1.5s, maybe longer. Do you really want to wait 255 * 1.5 seconds
before downshifting? Even 15*1.5 seems a long time.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ