IB/hfi1: Use 4096 for default active MTU in query_qp
authorJan Sokolowski <jan.sokolowski@intel.com>
Tue, 14 Nov 2017 12:34:45 +0000 (04:34 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Dec 2017 23:19:40 +0000 (16:19 -0700)
Currently, if a port is queried that has an invalid
Maximum Transmission Unit, driver reports default MTU of 2048.
This in incorrect.

Use default value of 4096 if invalid.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/verbs.c

index a38785e224cc661dca8dd8956d87adda364fe52f..6d27c8594b3444d6044a92edd58b2237b8ebd29e 100644 (file)
@@ -1486,7 +1486,7 @@ static int query_port(struct rvt_dev_info *rdi, u8 port_num,
        props->max_mtu = mtu_to_enum((!valid_ib_mtu(hfi1_max_mtu) ?
                                      4096 : hfi1_max_mtu), IB_MTU_4096);
        props->active_mtu = !valid_ib_mtu(ppd->ibmtu) ? props->max_mtu :
-               mtu_to_enum(ppd->ibmtu, IB_MTU_2048);
+               mtu_to_enum(ppd->ibmtu, IB_MTU_4096);
 
        /*
         * sm_lid of 0xFFFF needs special handling so that it can