From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42050 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754255AbeCRQCI (ORCPT ); Sun, 18 Mar 2018 12:02:08 -0400 Subject: Patch "IB/hfi1: Check for QSFP presence before attempting reads" has been added to the 4.9-stable tree To: easwar.hariharan@intel.com, alexander.levin@microsoft.com, dennis.dalessandro@intel.com, dledford@redhat.com, gregkh@linuxfoundation.org Cc: , From: Date: Sun, 18 Mar 2018 17:01:04 +0100 Message-ID: <152138886491173@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled IB/hfi1: Check for QSFP presence before attempting reads to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ib-hfi1-check-for-qsfp-presence-before-attempting-reads.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sun Mar 18 16:55:33 CET 2018 From: Easwar Hariharan Date: Mon, 20 Mar 2017 17:25:42 -0700 Subject: IB/hfi1: Check for QSFP presence before attempting reads From: Easwar Hariharan [ Upstream commit fb897ad315643e5dc1092a115b3cec914b66df9d ] Attempting to read the status of a QSFP cable creates noise in the logs and misses out on setting an appropriate Offline/Disabled Reason if the cable is not plugged in. Check for this prior to attempting the read and attendant retries. Fixes: 673b975f1fba ("IB/hfi1: Add QSFP sanity pre-check") Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/hfi1/chip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/infiniband/hw/hfi1/chip.c +++ b/drivers/infiniband/hw/hfi1/chip.c @@ -9489,8 +9489,11 @@ static int test_qsfp_read(struct hfi1_pp int ret; u8 status; - /* report success if not a QSFP */ - if (ppd->port_type != PORT_TYPE_QSFP) + /* + * Report success if not a QSFP or, if it is a QSFP, but the cable is + * not present + */ + if (ppd->port_type != PORT_TYPE_QSFP || !qsfp_mod_present(ppd)) return 0; /* read byte 2, the status byte */ Patches currently in stable-queue which might be from easwar.hariharan@intel.com are queue-4.9/ib-hfi1-check-for-qsfp-presence-before-attempting-reads.patch