[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcc5PjbS_kwCW=Fj-7LAHe4ELUWfeuRTAkDBQK8uy-F=9UNPQ@mail.gmail.com>
Date: Wed, 8 Apr 2015 21:38:31 +0300
From: Amir Vadai <amirv@...lanox.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Amir Vadai <amirv@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Yevgeny Petrilin <yevgenyp@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Achiad Shochat <achiad@...lanox.com>,
Ido Shamay <idos@...lanox.com>,
Rana Shahout <ranas@...lanox.com>
Subject: Re: [PATCH net-next 07/11] net/mlx5_core: Implement get/set port status
On Wed, Apr 8, 2015 at 9:26 PM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> Hello.
Hi,
>
>
> On 04/08/2015 05:51 PM, Amir Vadai wrote:
>
>> From: Rana Shahout <ranas@...lanox.com>
>
>
>> Signed-off-by: Rana Shahout <ranas@...lanox.com>
>> Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
>> Signed-off-by: Amir Vadai <amirv@...lanox.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/port.c | 34
>> ++++++++++++++++++++++++++
>> include/linux/mlx5/driver.h | 8 ++++++
>> 2 files changed, 42 insertions(+)
>
>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> index 6e2d99c..7c394c0 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> @@ -179,3 +179,37 @@ int mlx5_set_port_proto(struct mlx5_core_dev *dev,
>> u32 proto_admin,
>> return err;
>> }
>> EXPORT_SYMBOL_GPL(mlx5_set_port_proto);
>> +
>> +int mlx5_set_port_status(struct mlx5_core_dev *dev,
>> + enum mlx5_port_status status)
>> +{
>> + u32 in[MLX5_ST_SZ_DW(paos_reg)];
>> + u32 out[MLX5_ST_SZ_DW(paos_reg)];
>> + int err;
>> +
>> + memset(in, 0, sizeof(in));
>> +
>> + MLX5_SET(paos_reg, in, admin_status, status);
>> + MLX5_SET(paos_reg, in, ase, 1);
>> +
>> + err = mlx5_core_access_reg(dev, in, sizeof(in), out,
>> + sizeof(out), MLX5_REG_PAOS, 0, 1);
>> + return err;
>
>
> Why not just direct return of the function's result?
Right - will be fixed in V1.
Amir
>
> [...]
>
> WBR, Sergei
>
>
> --
> 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
--
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