diff options
| -rw-r--r-- | drivers/infiniband/hw/hfi1/chip.c | 12 | ||||
| -rw-r--r-- | drivers/infiniband/hw/hfi1/chip.h | 2 | ||||
| -rw-r--r-- | drivers/infiniband/hw/hfi1/platform.c | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c index 1c810d65721a..27b75a8f5097 100644 --- a/drivers/infiniband/hw/hfi1/chip.c +++ b/drivers/infiniband/hw/hfi1/chip.c | |||
| @@ -9415,7 +9415,7 @@ static void set_qsfp_int_n(struct hfi1_pportdata *ppd, u8 enable) | |||
| 9415 | write_csr(dd, dd->hfi1_id ? ASIC_QSFP2_MASK : ASIC_QSFP1_MASK, mask); | 9415 | write_csr(dd, dd->hfi1_id ? ASIC_QSFP2_MASK : ASIC_QSFP1_MASK, mask); |
| 9416 | } | 9416 | } |
| 9417 | 9417 | ||
| 9418 | void reset_qsfp(struct hfi1_pportdata *ppd) | 9418 | int reset_qsfp(struct hfi1_pportdata *ppd) |
| 9419 | { | 9419 | { |
| 9420 | struct hfi1_devdata *dd = ppd->dd; | 9420 | struct hfi1_devdata *dd = ppd->dd; |
| 9421 | u64 mask, qsfp_mask; | 9421 | u64 mask, qsfp_mask; |
| @@ -9445,6 +9445,13 @@ void reset_qsfp(struct hfi1_pportdata *ppd) | |||
| 9445 | * for alarms and warnings | 9445 | * for alarms and warnings |
| 9446 | */ | 9446 | */ |
| 9447 | set_qsfp_int_n(ppd, 1); | 9447 | set_qsfp_int_n(ppd, 1); |
| 9448 | |||
| 9449 | /* | ||
| 9450 | * After the reset, AOC transmitters are enabled by default. They need | ||
| 9451 | * to be turned off to complete the QSFP setup before they can be | ||
| 9452 | * enabled again. | ||
| 9453 | */ | ||
| 9454 | return set_qsfp_tx(ppd, 0); | ||
| 9448 | } | 9455 | } |
| 9449 | 9456 | ||
| 9450 | static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd, | 9457 | static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd, |
| @@ -10406,6 +10413,9 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason) | |||
| 10406 | & (HLS_DN_POLL | HLS_VERIFY_CAP | HLS_GOING_UP)) { | 10413 | & (HLS_DN_POLL | HLS_VERIFY_CAP | HLS_GOING_UP)) { |
| 10407 | /* went down while attempting link up */ | 10414 | /* went down while attempting link up */ |
| 10408 | check_lni_states(ppd); | 10415 | check_lni_states(ppd); |
| 10416 | |||
| 10417 | /* The QSFP doesn't need to be reset on LNI failure */ | ||
| 10418 | ppd->qsfp_info.reset_needed = 0; | ||
| 10409 | } | 10419 | } |
| 10410 | 10420 | ||
| 10411 | /* the active link width (downgrade) is 0 on link down */ | 10421 | /* the active link width (downgrade) is 0 on link down */ |
diff --git a/drivers/infiniband/hw/hfi1/chip.h b/drivers/infiniband/hw/hfi1/chip.h index 461f937fe110..50b8645d0b87 100644 --- a/drivers/infiniband/hw/hfi1/chip.h +++ b/drivers/infiniband/hw/hfi1/chip.h | |||
| @@ -723,7 +723,7 @@ void handle_link_downgrade(struct work_struct *work); | |||
| 723 | void handle_link_bounce(struct work_struct *work); | 723 | void handle_link_bounce(struct work_struct *work); |
| 724 | void handle_start_link(struct work_struct *work); | 724 | void handle_start_link(struct work_struct *work); |
| 725 | void handle_sma_message(struct work_struct *work); | 725 | void handle_sma_message(struct work_struct *work); |
| 726 | void reset_qsfp(struct hfi1_pportdata *ppd); | 726 | int reset_qsfp(struct hfi1_pportdata *ppd); |
| 727 | void qsfp_event(struct work_struct *work); | 727 | void qsfp_event(struct work_struct *work); |
| 728 | void start_freeze_handling(struct hfi1_pportdata *ppd, int flags); | 728 | void start_freeze_handling(struct hfi1_pportdata *ppd, int flags); |
| 729 | int send_idle_sma(struct hfi1_devdata *dd, u64 message); | 729 | int send_idle_sma(struct hfi1_devdata *dd, u64 message); |
diff --git a/drivers/infiniband/hw/hfi1/platform.c b/drivers/infiniband/hw/hfi1/platform.c index a8af96d2b1b0..d486355880cb 100644 --- a/drivers/infiniband/hw/hfi1/platform.c +++ b/drivers/infiniband/hw/hfi1/platform.c | |||
| @@ -790,7 +790,9 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, | |||
| 790 | * reuse of stale settings established in our previous pass through. | 790 | * reuse of stale settings established in our previous pass through. |
| 791 | */ | 791 | */ |
| 792 | if (ppd->qsfp_info.reset_needed) { | 792 | if (ppd->qsfp_info.reset_needed) { |
| 793 | reset_qsfp(ppd); | 793 | ret = reset_qsfp(ppd); |
| 794 | if (ret) | ||
| 795 | return ret; | ||
| 794 | refresh_qsfp_cache(ppd, &ppd->qsfp_info); | 796 | refresh_qsfp_cache(ppd, &ppd->qsfp_info); |
| 795 | } else { | 797 | } else { |
| 796 | ppd->qsfp_info.reset_needed = 1; | 798 | ppd->qsfp_info.reset_needed = 1; |
