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:   Wed, 25 Jan 2023 23:04:10 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Raju Rangoju <Raju.Rangoju@....com>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <pabeni@...hat.com>,
        <Shyam-sundar.S-k@....com>
Subject: Re: [PATCH net-next 2/2] amd-xgbe: add support for rx-adaptation

On Wed, 25 Jan 2023 12:55:29 +0530 Raju Rangoju wrote:
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> @@ -387,7 +387,13 @@ struct xgbe_phy_data {
>  /* I2C, MDIO and GPIO lines are muxed, so only one device at a time */
>  static DEFINE_MUTEX(xgbe_phy_comm_lock);
>  
> +static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
> +					unsigned int cmd, unsigned int sub_cmd);
>  static enum xgbe_an_mode xgbe_phy_an_mode(struct xgbe_prv_data *pdata);
> +static void xgbe_phy_rrc(struct xgbe_prv_data *pdata);
> +static void xgbe_phy_set_mode(struct xgbe_prv_data *pdata, enum xgbe_mode mode);
> +static void xgbe_phy_kr_mode(struct xgbe_prv_data *pdata);
> +static void xgbe_phy_sfi_mode(struct xgbe_prv_data *pdata);

Why the forward declarations? It's against the kernel coding style.

>  static int xgbe_phy_i2c_xfer(struct xgbe_prv_data *pdata,
>  			     struct xgbe_i2c_op *i2c_op)
> @@ -2038,6 +2044,87 @@ static void xgbe_phy_set_redrv_mode(struct xgbe_prv_data *pdata)
>  	xgbe_phy_put_comm_ownership(pdata);
>  }
>  
> +#define MAX_RX_ADAPT_RETRIES	1
> +#define XGBE_PMA_RX_VAL_SIG_MASK	(XGBE_PMA_RX_SIG_DET_0_MASK | XGBE_PMA_RX_VALID_0_MASK)
> +
> +static inline void xgbe_set_rx_adap_mode(struct xgbe_prv_data *pdata, enum xgbe_mode mode)

Don't pointlessly use inline, please. The compiler will know when 
to inline, and this is not the datapath.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ