RE: [EXT] [PATCH for-next v2 1/4] RDMA/core: Fix return code when modify_port isn't supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Kamal Heib <kamalheib1@xxxxxxxxx>
> Sent: Wednesday, October 16, 2019 10:23 AM
> 
> External Email
> 
> ----------------------------------------------------------------------
> The proper return code is "-EOPNOTSUPP" when modify_port callback is not
> supported.
> 
> Fixes: 61e0962d5221 ("IB: Avoid ib_modify_port() failure for RoCE devices")
> Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
> ---
>  drivers/infiniband/core/device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/device.c
> b/drivers/infiniband/core/device.c
> index a667636f74bf..98a01caf7850 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -2397,7 +2397,7 @@ int ib_modify_port(struct ib_device *device,
>  					     port_modify_mask,
>  					     port_modify);
>  	else
> -		rc = rdma_protocol_roce(device, port_num) ? 0 : -ENOSYS;
> +		rc = rdma_protocol_roce(device, port_num) ? 0 : -
> EOPNOTSUPP;

This is a bit confusing, looks like for RoCE it's ok not to have a callback but for the 
The other protocols it's required. For iWARP for example there also isn't a modify-port.
Is there any other protocol except ib that this is relevant to ? 
If not perhaps modify rdma_protocol_roce(..)? to rdma_protocol_ib(...)? -EOPNOTSUPP : 0?



>  	return rc;
>  }
>  EXPORT_SYMBOL(ib_modify_port);
> --
> 2.20.1





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux