Re: [PATCH rdma-next 00/13] RDMA/hfi1: Make init_one() a sane counterpart of remove_one()
From: Leon Romanovsky
Date: Mon Jul 13 2026 - 07:48:04 EST
On Wed, 08 Jul 2026 13:45:38 +0300, Leon Romanovsky wrote:
> The hfi1 PCI probe path, init_one(), has accumulated years of ad-hoc
> error handling that no longer matches how a driver probe is expected to
> look. Rather than unwinding each initialization step as it fails, it
> allocated hfi1_devdata up front, ran every stage, and then funneled two
> unrelated failure values (initfail and ret) into one combined cleanup
> block. That block kept the device half-alive "so diags can be used",
> created the character device only to remove it again, flushed a global
> workqueue the driver never queues onto, and diverged from the teardown
> in remove_one() even though both release the same resources.
>
> [...]
Applied, thanks!
[01/13] RDMA/rvt: Return NULL after port allocation failure
https://git.kernel.org/rdma/rdma/c/2982eaf3b9d2d9
[02/13] RDMA/hfi1: Preserve unit 0 on allocation failure
https://git.kernel.org/rdma/rdma/c/2e3809ad8911f5
[03/13] RDMA/hfi1: Remove redundant PCI device ID validation
https://git.kernel.org/rdma/rdma/c/af9117d02f5051
[04/13] RDMA/hfi1: Pass PCI device to hfi1_pcie_init()
https://git.kernel.org/rdma/rdma/c/b9cb5e81f7d90f
[05/13] RDMA/hfi1: Drop device data from hfi1_validate_rcvhdrcnt()
https://git.kernel.org/rdma/rdma/c/4ebd241071af81
[06/13] RDMA/hfi1: Create workqueues before device initialization
https://git.kernel.org/rdma/rdma/c/0d5618c1b2fc9d
[07/13] RDMA/hfi1: Free RX data on late probe failure
https://git.kernel.org/rdma/rdma/c/8e17e101e04a3d
[08/13] RDMA/hfi1: Allocate device data after PCI initialization
https://git.kernel.org/rdma/rdma/c/9f674ba674a0d1
[09/13] RDMA/hfi1: Remove redundant NULL checks in create_workqueues()
https://git.kernel.org/rdma/rdma/c/22113f3f55a1f4
[10/13] RDMA/hfi1: Stop flushing the global IB workqueue
https://git.kernel.org/rdma/rdma/c/d43b1c17f9e1b9
[11/13] RDMA/hfi1: Defer device creation until probe succeeds
https://git.kernel.org/rdma/rdma/c/9bab31776ae60a
[12/13] RDMA/hfi1: Initialize debugfs after probe completes
https://git.kernel.org/rdma/rdma/c/bb18740b302f6f
[13/13] RDMA/hfi1: Align probe error unwinding with device removal
https://git.kernel.org/rdma/rdma/c/e26c48cf23a494
Best regards,
--
Leon Romanovsky <leonro@xxxxxxxxxx>