OSDN Git Service

IB/hfi1: Ensure full Gen3 speed in a Gen4 system
authorJames Erwin <james.erwin@intel.com>
Fri, 1 Nov 2019 19:20:59 +0000 (15:20 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:26:11 +0000 (18:26 +0100)
commit6dc6e94448a54425cea5e5e0f350e7e5a9cd932d
treebce3bf719416da3fcad9109e7c764497020663c5
parentf8b4961625044fd7db665f26e9e9cac06a2c565d
IB/hfi1: Ensure full Gen3 speed in a Gen4 system

If an hfi1 card is inserted in a Gen4 systems, the driver will avoid the
gen3 speed bump and the card will operate at half speed.

This is because the driver avoids the gen3 speed bump when the parent bus
speed isn't identical to gen3, 8.0GT/s.  This is not compatible with gen4
and newer speeds.

Fix by relaxing the test to explicitly look for the lower capability
speeds which inherently allows for gen4 and all future speeds.

Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Link: https://lore.kernel.org/r/20191101192059.106248.1699.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: James Erwin <james.erwin@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/rdma/hfi1/pcie.c