Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8aa284b authored by Easwar Hariharan's avatar Easwar Hariharan Committed by Doug Ledford
Browse files

staging/rdma/hfi1: Cleanup comments and logs in PHY code



This is a set of minor fixes including comment and log message cleanups
and improvements to the PHY layer code.

Reviewed-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarEaswar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: default avatarJubin John <jubin.john@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 4c9e7aac
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -5946,10 +5946,10 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)
	u64 qsfp_int_mgmt = (u64)(QSFP_HFI0_INT_N | QSFP_HFI0_MODPRST_N);
	u64 qsfp_int_mgmt = (u64)(QSFP_HFI0_INT_N | QSFP_HFI0_MODPRST_N);


	if (reg & QSFP_HFI0_MODPRST_N) {
	if (reg & QSFP_HFI0_MODPRST_N) {
		dd_dev_info(dd, "%s: ModPresent triggered QSFP interrupt\n",
		if (!qsfp_mod_present(ppd)) {
			dd_dev_info(dd, "%s: QSFP module removed\n",
				    __func__);
				    __func__);


		if (!qsfp_mod_present(ppd)) {
			ppd->driver_link_ready = 0;
			ppd->driver_link_ready = 0;
			/*
			/*
			 * Cable removed, reset all our information about the
			 * Cable removed, reset all our information about the
@@ -5989,6 +5989,9 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)
				queue_work(ppd->hfi1_wq, &ppd->link_down_work);
				queue_work(ppd->hfi1_wq, &ppd->link_down_work);
			}
			}
		} else {
		} else {
			dd_dev_info(dd, "%s: QSFP module inserted\n",
				    __func__);

			spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags);
			spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags);
			ppd->qsfp_info.cache_valid = 0;
			ppd->qsfp_info.cache_valid = 0;
			ppd->qsfp_info.cache_refresh_required = 1;
			ppd->qsfp_info.cache_refresh_required = 1;
@@ -6009,7 +6012,7 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)
	}
	}


	if (reg & QSFP_HFI0_INT_N) {
	if (reg & QSFP_HFI0_INT_N) {
		dd_dev_info(dd, "%s: IntN triggered QSFP interrupt\n",
		dd_dev_info(dd, "%s: Interrupt received from QSFP module\n",
			    __func__);
			    __func__);
		spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags);
		spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags);
		ppd->qsfp_info.check_interrupt_flags = 1;
		ppd->qsfp_info.check_interrupt_flags = 1;
+2 −2
Original line number Original line Diff line number Diff line
@@ -187,7 +187,7 @@ int i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, int offset,


/*
/*
 * Write page n, offset m of QSFP memory as defined by SFF 8636
 * Write page n, offset m of QSFP memory as defined by SFF 8636
 * in the cache by writing @addr = ((256 * n) + m)
 * by writing @addr = ((256 * n) + m)
 */
 */
int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,
int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,
	       int len)
	       int len)
@@ -253,7 +253,7 @@ int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,


/*
/*
 * Access page n, offset m of QSFP memory as defined by SFF 8636
 * Access page n, offset m of QSFP memory as defined by SFF 8636
 * in the cache by reading @addr = ((256 * n) + m)
 * by reading @addr = ((256 * n) + m)
 */
 */
int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,
int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,
	      int len)
	      int len)