forked from luck/tmp_suning_uos_patched
IB/core: Add new IB rates
Add the new rates that were added to Infiniband spec as part of HDR and 2x support. Signed-off-by: Michael Guralnik <michaelgur@mellanox.com> Reviewed-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
dbabf68574
commit
a5a5d19936
|
@ -141,6 +141,10 @@ __attribute_const__ int ib_rate_to_mult(enum ib_rate rate)
|
||||||
case IB_RATE_100_GBPS: return 40;
|
case IB_RATE_100_GBPS: return 40;
|
||||||
case IB_RATE_200_GBPS: return 80;
|
case IB_RATE_200_GBPS: return 80;
|
||||||
case IB_RATE_300_GBPS: return 120;
|
case IB_RATE_300_GBPS: return 120;
|
||||||
|
case IB_RATE_28_GBPS: return 11;
|
||||||
|
case IB_RATE_50_GBPS: return 20;
|
||||||
|
case IB_RATE_400_GBPS: return 160;
|
||||||
|
case IB_RATE_600_GBPS: return 240;
|
||||||
default: return -1;
|
default: return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,6 +170,10 @@ __attribute_const__ enum ib_rate mult_to_ib_rate(int mult)
|
||||||
case 40: return IB_RATE_100_GBPS;
|
case 40: return IB_RATE_100_GBPS;
|
||||||
case 80: return IB_RATE_200_GBPS;
|
case 80: return IB_RATE_200_GBPS;
|
||||||
case 120: return IB_RATE_300_GBPS;
|
case 120: return IB_RATE_300_GBPS;
|
||||||
|
case 11: return IB_RATE_28_GBPS;
|
||||||
|
case 20: return IB_RATE_50_GBPS;
|
||||||
|
case 160: return IB_RATE_400_GBPS;
|
||||||
|
case 240: return IB_RATE_600_GBPS;
|
||||||
default: return IB_RATE_PORT_CURRENT;
|
default: return IB_RATE_PORT_CURRENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,6 +199,10 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate)
|
||||||
case IB_RATE_100_GBPS: return 103125;
|
case IB_RATE_100_GBPS: return 103125;
|
||||||
case IB_RATE_200_GBPS: return 206250;
|
case IB_RATE_200_GBPS: return 206250;
|
||||||
case IB_RATE_300_GBPS: return 309375;
|
case IB_RATE_300_GBPS: return 309375;
|
||||||
|
case IB_RATE_28_GBPS: return 28125;
|
||||||
|
case IB_RATE_50_GBPS: return 53125;
|
||||||
|
case IB_RATE_400_GBPS: return 425000;
|
||||||
|
case IB_RATE_600_GBPS: return 637500;
|
||||||
default: return -1;
|
default: return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2703,7 +2703,7 @@ static int ib_rate_to_mlx5(struct mlx5_ib_dev *dev, u8 rate)
|
||||||
if (rate == IB_RATE_PORT_CURRENT)
|
if (rate == IB_RATE_PORT_CURRENT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_300_GBPS)
|
if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_600_GBPS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
while (rate != IB_RATE_PORT_CURRENT &&
|
while (rate != IB_RATE_PORT_CURRENT &&
|
||||||
|
|
|
@ -732,7 +732,11 @@ enum ib_rate {
|
||||||
IB_RATE_25_GBPS = 15,
|
IB_RATE_25_GBPS = 15,
|
||||||
IB_RATE_100_GBPS = 16,
|
IB_RATE_100_GBPS = 16,
|
||||||
IB_RATE_200_GBPS = 17,
|
IB_RATE_200_GBPS = 17,
|
||||||
IB_RATE_300_GBPS = 18
|
IB_RATE_300_GBPS = 18,
|
||||||
|
IB_RATE_28_GBPS = 19,
|
||||||
|
IB_RATE_50_GBPS = 20,
|
||||||
|
IB_RATE_400_GBPS = 21,
|
||||||
|
IB_RATE_600_GBPS = 22,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user