From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Easwar Hariharan
<easwar.hariharan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Dean Luick <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 11/21] IB/hfi1: Remove module presence check outside pre-LNI checks
Date: Tue, 12 Apr 2016 11:25:57 -0700 [thread overview]
Message-ID: <20160412182546.25419.51352.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20160412174746.24485.92280.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
From: Easwar Hariharan <easwar.hariharan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
The pre-LNI SerDes and channel tuning algorithm already checks for
module presence assertion for the relevant port types. The extraneous
check removed in this patch blocks link up for port types for which
the module presence assertion is not relevant.
Reviewed-by: Dean Luick <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Easwar Hariharan <easwar.hariharan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/staging/rdma/hfi1/chip.c | 20 ++++++--------------
drivers/staging/rdma/hfi1/platform.c | 8 ++++++--
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index 962cca0..38c0e97 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -6849,7 +6849,7 @@ void handle_link_down(struct work_struct *work)
* If there is no cable attached, turn the DC off. Otherwise,
* start the link bring up.
*/
- if (!qsfp_mod_present(ppd)) {
+ if (ppd->port_type == PORT_TYPE_QSFP && !qsfp_mod_present(ppd)) {
dc_shutdown(ppd->dd);
} else {
tune_serdes(ppd);
@@ -9008,9 +9008,9 @@ set_local_link_attributes_fail:
}
/*
- * Call this to start the link. Schedule a retry if the cable is not
- * present or if unable to start polling. Do not do anything if the
- * link is disabled. Returns 0 if link is disabled or moved to polling
+ * Call this to start the link.
+ * Do not do anything if the link is disabled.
+ * Returns 0 if link is disabled, moved to polling, or the driver is not ready.
*/
int start_link(struct hfi1_pportdata *ppd)
{
@@ -9027,15 +9027,7 @@ int start_link(struct hfi1_pportdata *ppd)
return 0;
}
- if (qsfp_mod_present(ppd) || loopback == LOOPBACK_SERDES ||
- loopback == LOOPBACK_LCB ||
- ppd->dd->icode == ICODE_FUNCTIONAL_SIMULATOR)
- return set_link_state(ppd, HLS_DN_POLL);
-
- dd_dev_info(ppd->dd,
- "%s: stopping link start because no cable is present\n",
- __func__);
- return -EAGAIN;
+ return set_link_state(ppd, HLS_DN_POLL);
}
static void wait_for_qsfp_init(struct hfi1_pportdata *ppd)
@@ -9206,7 +9198,7 @@ static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd,
return 0;
}
-/* This routine will only be scheduled if the QSFP module is present */
+/* This routine will only be scheduled if the QSFP module present is asserted */
void qsfp_event(struct work_struct *work)
{
struct qsfp_data *qd;
diff --git a/drivers/staging/rdma/hfi1/platform.c b/drivers/staging/rdma/hfi1/platform.c
index 19d0223..b97027d 100644
--- a/drivers/staging/rdma/hfi1/platform.c
+++ b/drivers/staging/rdma/hfi1/platform.c
@@ -838,9 +838,11 @@ void tune_serdes(struct hfi1_pportdata *ppd)
total_atten = platform_atten + remote_atten;
tuning_method = OPA_PASSIVE_TUNING;
- } else
+ } else {
ppd->offline_disabled_reason =
HFI1_ODR_MASK(OPA_LINKDOWN_REASON_CHASSIS_CONFIG);
+ goto bail;
+ }
break;
case PORT_TYPE_QSFP:
if (qsfp_mod_present(ppd)) {
@@ -869,10 +871,12 @@ void tune_serdes(struct hfi1_pportdata *ppd)
__func__);
goto bail;
}
- } else
+ } else {
ppd->offline_disabled_reason =
HFI1_ODR_MASK(
OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED);
+ goto bail;
+ }
break;
default:
dd_dev_info(ppd->dd, "%s: Unknown port type\n", __func__);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-04-12 18:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 17:49 [PATCH 00/21] IB/hfi1: First round of fixes for 4.7 Dennis Dalessandro
[not found] ` <20160412174746.24485.92280.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-04-12 17:49 ` [PATCH 01/21] IB/hfi1: Fix sysfs file offset usage Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 02/21] IB/hfi1: Fix i2c resource reservation checks Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 03/21] IB/hfi1: Fix QOS num_vl bit width Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 04/21] IB/hfi1: Remove invalid QOS check Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 05/21] IB/hfi1: Fix QOS rule mappings Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 06/21] IB/hfi1: Correctly obtain the full service class Dennis Dalessandro
2016-04-12 17:50 ` [PATCH 07/21] IB/hfi1: Simplify init_qpmap_table() Dennis Dalessandro
2016-04-12 18:17 ` [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB Dennis Dalessandro
[not found] ` <20160412181708.21853.23423.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-04-12 18:35 ` Dennis Dalessandro
2016-04-18 7:07 ` Leon Romanovsky
[not found] ` <20160418070708.GJ6349-2ukJVAZIZ/Y@public.gmane.org>
2016-04-18 12:03 ` Dennis Dalessandro
[not found] ` <20160418120335.GB17987-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-04-18 12:30 ` Leon Romanovsky
[not found] ` <20160418123032.GM6349-2ukJVAZIZ/Y@public.gmane.org>
2016-04-18 18:42 ` David Woodhouse
[not found] ` <1461004942.3765.78.camel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-19 3:31 ` Ira Weiny
2016-04-12 18:22 ` [PATCH 09/21] IB/hfi1: Check P_KEY for all sent packets from user mode Dennis Dalessandro
2016-04-12 18:25 ` [PATCH 10/21] IB/hfi1: Always turn on CDRs for low power QSFP modules Dennis Dalessandro
2016-04-12 18:25 ` Dennis Dalessandro [this message]
2016-04-12 18:26 ` [PATCH 12/21] IB/hfi1: Guard against concurrent I2C access across all chains Dennis Dalessandro
2016-04-12 18:28 ` [PATCH 13/21] IB/hfi1: Fix double QSFP resource acquire on cache refresh Dennis Dalessandro
2016-04-12 18:28 ` [PATCH 14/21] IB/hfi1: Remove unreachable code Dennis Dalessandro
2016-04-12 18:29 ` [PATCH 15/21] IB/hfi1: Use global defines for upper bits in opcode Dennis Dalessandro
2016-04-12 18:30 ` [PATCH 16/21] IB/hfi1: Change default number of user contexts Dennis Dalessandro
2016-04-12 18:30 ` [PATCH 17/21] IB/hfi1: Reduce kernel context pio buffer allocation Dennis Dalessandro
2016-04-12 18:30 ` [PATCH 18/21] IB/hfi1: Extract RSM map table init from QOS Dennis Dalessandro
2016-04-12 18:31 ` [PATCH 19/21] IB/hfi1: Move QOS decision logic into its own function Dennis Dalessandro
2016-04-12 18:31 ` [PATCH 20/21] IB/hfi1: Create a routine to set a receive side mapping rule Dennis Dalessandro
2016-04-12 18:32 ` [PATCH 21/21] IB/hfi1: Add RSM rule for user FECN handling Dennis Dalessandro
2016-04-18 7:09 ` [PATCH 00/21] IB/hfi1: First round of fixes for 4.7 Leon Romanovsky
[not found] ` <20160418070936.GK6349-2ukJVAZIZ/Y@public.gmane.org>
2016-04-18 12:07 ` Dennis Dalessandro
[not found] ` <20160418120754.GC17987-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-04-18 12:19 ` Leon Romanovsky
[not found] ` <20160418121944.GL6349-2ukJVAZIZ/Y@public.gmane.org>
2016-04-18 13:38 ` Dennis Dalessandro
[not found] ` <20160418133842.GA7596-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-04-18 13:56 ` Leon Romanovsky
2016-05-05 19:58 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160412182546.25419.51352.stgit@scvm10.sc.intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=easwar.hariharan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.