Message ID | 20200623204047.107638.77646.stgit@awfm-01.aw.intel.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | minor hfi1 fixes | expand |
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 8d3e71136a08 ("IB/{hfi1, qib}: Add handling of kernel restart"). The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228. v5.7.6: Build OK! v5.4.49: Build OK! v4.19.130: Failed to apply! Possible dependencies: 09e71899b9cf5 ("IB/hfi1: Prepare for new HFI1 MSIx API") 24c5bfeaf1e66 ("IB/hfi1: Add the TID second leg ACK packet builder") 3ca633f1ff7b1 ("IB/hfi1: Right size user_sdma sequence numbers and related variables") 572f0c3301138 ("IB/hfi1: Add the dual leg code") 57f97e96625fe ("IB/hfi1: Get the hfi1_devdata structure as early as possible") 5da0fc9dbf891 ("IB/hfi1: Prepare resource waits for dual leg") 6eb4eb10fb0d1 ("IB/hfi1: Make the MSIx resource allocation a bit more flexible") 829eaee5d09a7 ("IB/hfi1: Add TID RDMA retry timer") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") c54a73d8202a3 ("IB/hfi1: Rework file list in Makefile") f01b4d5a43da4 ("IB/hfi1: OPFN interface") v4.14.186: Failed to apply! Possible dependencies: 05cb18fda926d ("IB/hfi1: Update HFI to use the latest PCI API") 09e71899b9cf5 ("IB/hfi1: Prepare for new HFI1 MSIx API") 1b311f8931cfe ("IB/hfi1: Add tx_opcode_stats like the opcode_stats") 2d9544aacf9e6 ("IB/hfi1: Insure int mask for in-kernel receive contexts is clear") 442e55661db1d ("IB/hfi1: Extend input hdr tracing for packet type") 473291b3ea0e1 ("IB/hfi1: Fix for early release of sdma context") 5d18ee67d4c17 ("IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support") 6eb4eb10fb0d1 ("IB/hfi1: Make the MSIx resource allocation a bit more flexible") 70324739ac5e0 ("IB/hfi1: Remove INTx support and simplify MSIx usage") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") a74d5307caba4 ("IB/hfi1: Rework fault injection machinery") b5de809ef6f6c ("IB/hfi1: Show fault stats in both TX and RX directions") c54a73d8202a3 ("IB/hfi1: Rework file list in Makefile") cc9a97ea2c74e ("IB/hfi1: Do not allocate PIO send contexts for VNIC") d108c60d3d55e ("IB/hfi1: Set in_use_ctxts bits for user ctxts only") e9777ad4399c2 ("IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure") v4.9.228: Failed to apply! Possible dependencies: 0181ce31b2602 ("IB/hfi1: Add receive fault injection feature") 1bb0d7b781b1c ("IB/hfi1: Code reuse with memdup_copy") 2280740f01aee ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support") 6e768f0682e26 ("IB/hfi1: Optimize devdata cachelines") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") b7481944b06e9 ("IB/hfi1: Show statistics counters under IB stats interface") cc9a97ea2c74e ("IB/hfi1: Do not allocate PIO send contexts for VNIC") d108c60d3d55e ("IB/hfi1: Set in_use_ctxts bits for user ctxts only") d295dbeb2a0c9 ("IB/hf1: User context locking is inconsistent") d4829ea6035b8 ("IB/hfi1: OPA_VNIC RDMA netdev support") ec8a142327f85 ("IB/hfi1: Force logical link down") NOTE: The patch will not be queued to stable trees until it is upstream. How should we proceed with this patch?
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 8d3e71136a08 ("IB/{hfi1, qib}: Add handling of kernel restart"). The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228. v5.7.6: Build OK! v5.4.49: Build OK! v4.19.130: Failed to apply! Possible dependencies: 09e71899b9cf5 ("IB/hfi1: Prepare for new HFI1 MSIx API") 24c5bfeaf1e66 ("IB/hfi1: Add the TID second leg ACK packet builder") 3ca633f1ff7b1 ("IB/hfi1: Right size user_sdma sequence numbers and related variables") 572f0c3301138 ("IB/hfi1: Add the dual leg code") 57f97e96625fe ("IB/hfi1: Get the hfi1_devdata structure as early as possible") 5da0fc9dbf891 ("IB/hfi1: Prepare resource waits for dual leg") 6eb4eb10fb0d1 ("IB/hfi1: Make the MSIx resource allocation a bit more flexible") 829eaee5d09a7 ("IB/hfi1: Add TID RDMA retry timer") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") c54a73d8202a3 ("IB/hfi1: Rework file list in Makefile") f01b4d5a43da4 ("IB/hfi1: OPFN interface") v4.14.186: Failed to apply! Possible dependencies: 05cb18fda926d ("IB/hfi1: Update HFI to use the latest PCI API") 09e71899b9cf5 ("IB/hfi1: Prepare for new HFI1 MSIx API") 1b311f8931cfe ("IB/hfi1: Add tx_opcode_stats like the opcode_stats") 2d9544aacf9e6 ("IB/hfi1: Insure int mask for in-kernel receive contexts is clear") 442e55661db1d ("IB/hfi1: Extend input hdr tracing for packet type") 473291b3ea0e1 ("IB/hfi1: Fix for early release of sdma context") 5d18ee67d4c17 ("IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support") 6eb4eb10fb0d1 ("IB/hfi1: Make the MSIx resource allocation a bit more flexible") 70324739ac5e0 ("IB/hfi1: Remove INTx support and simplify MSIx usage") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") a74d5307caba4 ("IB/hfi1: Rework fault injection machinery") b5de809ef6f6c ("IB/hfi1: Show fault stats in both TX and RX directions") c54a73d8202a3 ("IB/hfi1: Rework file list in Makefile") cc9a97ea2c74e ("IB/hfi1: Do not allocate PIO send contexts for VNIC") d108c60d3d55e ("IB/hfi1: Set in_use_ctxts bits for user ctxts only") e9777ad4399c2 ("IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure") v4.9.228: Failed to apply! Possible dependencies: 0181ce31b2602 ("IB/hfi1: Add receive fault injection feature") 1bb0d7b781b1c ("IB/hfi1: Code reuse with memdup_copy") 2280740f01aee ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support") 6e768f0682e26 ("IB/hfi1: Optimize devdata cachelines") a2f7bbdc2dba0 ("IB/hfi1: Rework the IRQ API to be more flexible") b7481944b06e9 ("IB/hfi1: Show statistics counters under IB stats interface") cc9a97ea2c74e ("IB/hfi1: Do not allocate PIO send contexts for VNIC") d108c60d3d55e ("IB/hfi1: Set in_use_ctxts bits for user ctxts only") d295dbeb2a0c9 ("IB/hf1: User context locking is inconsistent") d4829ea6035b8 ("IB/hfi1: OPA_VNIC RDMA netdev support") ec8a142327f85 ("IB/hfi1: Force logical link down") NOTE: The patch will not be queued to stable trees until it is upstream. How should we proceed with this patch?
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index 5eed436..16d6788 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -831,6 +831,25 @@ static int create_workqueues(struct hfi1_devdata *dd) } /** + * destroy_workqueues - destroy per port workqueues + * @dd: the hfi1_ib device + */ +static void destroy_workqueues(struct hfi1_devdata *dd) +{ + int pidx; + struct hfi1_pportdata *ppd; + + for (pidx = 0; pidx < dd->num_pports; ++pidx) { + ppd = dd->pport + pidx; + + if (ppd->hfi1_wq) { + destroy_workqueue(ppd->hfi1_wq); + ppd->hfi1_wq = NULL; + } + } +} + +/** * enable_general_intr() - Enable the IRQs that will be handled by the * general interrupt handler. * @dd: valid devdata @@ -1104,11 +1123,10 @@ static void shutdown_device(struct hfi1_devdata *dd) */ hfi1_quiet_serdes(ppd); - if (ppd->hfi1_wq) { - destroy_workqueue(ppd->hfi1_wq); - ppd->hfi1_wq = NULL; - } + if (ppd->hfi1_wq) + flush_workqueue(ppd->hfi1_wq); if (ppd->link_wq) { + flush_workqueue(ppd->link_wq); destroy_workqueue(ppd->link_wq); ppd->link_wq = NULL; } @@ -1756,6 +1774,7 @@ static void remove_one(struct pci_dev *pdev) * clear dma engines, etc. */ shutdown_device(dd); + destroy_workqueues(dd); stop_timers(dd); diff --git a/drivers/infiniband/hw/hfi1/qp.c b/drivers/infiniband/hw/hfi1/qp.c index 0c2ae9f..283d4c5 100644 --- a/drivers/infiniband/hw/hfi1/qp.c +++ b/drivers/infiniband/hw/hfi1/qp.c @@ -367,7 +367,10 @@ bool _hfi1_schedule_send(struct rvt_qp *qp) struct hfi1_ibport *ibp = to_iport(qp->ibqp.device, qp->port_num); struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); - struct hfi1_devdata *dd = dd_from_ibdev(qp->ibqp.device); + struct hfi1_devdata *dd = ppd->dd; + + if (dd->flags & HFI1_SHUTDOWN) + return true; return iowait_schedule(&priv->s_iowait, ppd->hfi1_wq, priv->s_sde ? diff --git a/drivers/infiniband/hw/hfi1/tid_rdma.c b/drivers/infiniband/hw/hfi1/tid_rdma.c index 243b4ba..facff13 100644 --- a/drivers/infiniband/hw/hfi1/tid_rdma.c +++ b/drivers/infiniband/hw/hfi1/tid_rdma.c @@ -5406,7 +5406,10 @@ static bool _hfi1_schedule_tid_send(struct rvt_qp *qp) struct hfi1_ibport *ibp = to_iport(qp->ibqp.device, qp->port_num); struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); - struct hfi1_devdata *dd = dd_from_ibdev(qp->ibqp.device); + struct hfi1_devdata *dd = ppd->dd; + + if ((dd->flags & HFI1_SHUTDOWN)) + return true; return iowait_tid_schedule(&priv->s_iowait, ppd->hfi1_wq, priv->s_sde ?