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:   Fri, 2 Oct 2020 16:24:52 +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 v2 net-next 3/3] net: atlantic: implement media detect
 feature via phy tunables

> +	if (val > 0 && val != AQ_HW_MEDIA_DETECT_CNT) {
> +		netdev_err(self->ndev, "EDPD on this device could have only fixed value of %d\n",
> +			   AQ_HW_MEDIA_DETECT_CNT);
> +		return -EINVAL;
> +	}
> +
> +	/* msecs plays no role - configuration is always fixed in PHY */
> +	cfg->is_media_detect = val ? 1 : 0;
> +
> +	mutex_lock(&self->fwreq_mutex);
> +	err = self->aq_fw_ops->set_media_detect(self->aq_hw, cfg->is_media_detect);
> +	mutex_unlock(&self->fwreq_mutex);
> +
> +	return err;
> +}

> +static int aq_fw2x_set_media_detect(struct aq_hw_s *self, bool on)
> +{
> +	u32 enable;
> +	u32 offset;
> +
> +	if (self->fw_ver_actual < HW_ATL_FW_VER_MEDIA_CONTROL)
> +		return -EOPNOTSUPP;

So if the firmware is tool old, you return -EOPNOTSUPP. But it appears
cfg->is_media_detect has already been changed?

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ