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] [day] [month] [year] [list]
Message-ID: <556591A8.6050602@dev.mellanox.co.il>
Date:	Wed, 27 May 2015 12:43:04 +0300
From:	Yishai Hadas <yishaih@....mellanox.co.il>
To:	Benjamin Poirier <bpoirier@...e.de>
CC:	Amir Vadai <amirv@...lanox.com>, Ido Shamay <idos@...lanox.com>,
	Yishai Hadas <yishaih@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mlx4_core: Fix fallback from MSI-X to INTx

On 5/23/2015 2:12 AM, Benjamin Poirier wrote:
> The test in mlx4_load_one() to remove MLX4_FLAG_MSI_X expects mlx4_NOP() to
> fail with -EBUSY. It is also necessary to avoid the reset since the device
> is not fully reinitialized before calling mlx4_start_hca() a second time.
>
> Note that this will also affect mlx4_test_interrupts(), the only other user
> of MLX4_CMD_NOP.
>
> Fixes: f5aef5a ("net/mlx4_core: Activate reset flow upon fatal command cases")
> Signed-off-by: Benjamin Poirier <bpoirier@...e.de>
> ---
>   drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
> index 4f7dc04..529ef05 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
> @@ -714,8 +714,13 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
>   					 msecs_to_jiffies(timeout))) {
>   		mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n",
>   			  op);
> -		err = -EIO;
> -		goto out_reset;
> +		if (op == MLX4_CMD_NOP) {
> +			err = -EBUSY;
> +			goto out;
> +		} else {
> +			err = -EIO;
> +			goto out_reset;
> +		}
>   	}
>
>   	err = context->result;
>

It looks fine, a private case that should not trigger the reset flow.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ