]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Allow larger MTU without AIP
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Tue, 8 Feb 2022 19:25:09 +0000 (14:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:37 +0000 (14:23 +0200)
commit26d6b9661223df8698a978b67a1c900d099eb2e9
tree59dce4949220e542561ee198c4eb5607b4a72efe
parent4b8431bb5f9bf0c892d2c6ad0e61c38cb61d0973
IB/hfi1: Allow larger MTU without AIP

[ Upstream commit fe92e01813b0d8b1509ff3d2d1dc84183709ee67 ]

The AIP code signals the phys_mtu in the following query_port()
fragment:

props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu :
ib_mtu_enum_to_int(props->max_mtu);

Using the largest MTU possible should not depend on AIP.

Fix by unconditionally using the hfi1_max_mtu value.

Fixes: 632d5aecd676 ("IB/ipoib: Increase ipoib Datagram mode MTU's upper limit")
Link: https://lore.kernel.org/r/1644348309-174874-1-git-send-email-mike.marciniszyn@cornelisnetworks.com
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hfi1/verbs.c