summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/chip.c
diff options
context:
space:
mode:
authorHarish Chegondi2015-12-01 21:38:24 +0100
committerGreg Kroah-Hartman2015-12-21 22:51:55 +0100
commit6cc6ad2eb886e8cb47e8b15e9d4132fe8275021f (patch)
treecd19458a7f0f3aad838d5394557d54120f52c643 /drivers/staging/rdma/hfi1/chip.c
parentstaging/rdma/hfi1: unknown frame messages are not errors (diff)
downloadkernel-qcow2-linux-6cc6ad2eb886e8cb47e8b15e9d4132fe8275021f.tar.gz
kernel-qcow2-linux-6cc6ad2eb886e8cb47e8b15e9d4132fe8275021f.tar.xz
kernel-qcow2-linux-6cc6ad2eb886e8cb47e8b15e9d4132fe8275021f.zip
staging/rdma/hfi1: Consider VL15 MTU also when calculating the maximum VL MTU
Currently, only MTUs of VLs 0-7 are checked when calculating the maximum VL MTU which is used to set the port MTU capability in DCC_CFG_PORT_CONFIG CSR This can cause a port MTU capability to be set to 0 if MTUs of VLs 0-7 is 0 This would affect the VL15 traffic. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Arthur Kepner <arthur.kepner@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r--drivers/staging/rdma/hfi1/chip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index cb73243c497a..d88945a80250 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -9407,7 +9407,8 @@ u32 lrh_max_header_bytes(struct hfi1_devdata *dd)
static void set_send_length(struct hfi1_pportdata *ppd)
{
struct hfi1_devdata *dd = ppd->dd;
- u32 max_hb = lrh_max_header_bytes(dd), maxvlmtu = 0, dcmtu;
+ u32 max_hb = lrh_max_header_bytes(dd), dcmtu;
+ u32 maxvlmtu = dd->vld[15].mtu;
u64 len1 = 0, len2 = (((dd->vld[15].mtu + max_hb) >> 2)
& SEND_LEN_CHECK1_LEN_VL15_MASK) <<
SEND_LEN_CHECK1_LEN_VL15_SHIFT;