> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Larysa Zaremba
> Sent: Monday, June 8, 2026 4:41 PM
> To: [email protected]; Nguyen, Anthony L
> <[email protected]>
> Cc: Lobakin, Aleksander <[email protected]>; Samudrala,
> Sridhar <[email protected]>; Michal Swiatkowski
> <[email protected]>; Zaremba, Larysa
> <[email protected]>; Fijalkowski, Maciej
> <[email protected]>; Tantilov, Emil S
> <[email protected]>; Chittim, Madhu <[email protected]>;
> Hay, Joshua A <[email protected]>; Keller, Jacob E
> <[email protected]>; Shanmugam, Jayaprakash
> <[email protected]>; Jiri Pirko <[email protected]>;
> David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Simon Horman <[email protected]>; Jonathan Corbet
> <[email protected]>; Richard Cochran <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>; Andrew Lunn
> <[email protected]>; [email protected]; linux-
> [email protected]; [email protected]; Salin, Samuel
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-next v8 08/15] idpf: refactor
> idpf to use libie_pci APIs
>
> From: Pavan Kumar Linga <[email protected]>
>
> Use libie_pci init and MMIO APIs where possible, struct idpf_hw cannot
> be deleted for now as it also houses control queues that will be
> refactored later. Use libie_cp header for libie_ctlq_ctx that contains
> mmio info from the start in order to not increase the diff later.
>
> Reviewed-by: Madhu Chittim <[email protected]>
> Reviewed-by: Sridhar Samudrala <[email protected]>
> Signed-off-by: Pavan Kumar Linga <[email protected]>
> Tested-by: Samuel Salin <[email protected]>
> Co-developed-by: Larysa Zaremba <[email protected]>
> Signed-off-by: Larysa Zaremba <[email protected]>
> ---
> drivers/net/ethernet/intel/idpf/Kconfig | 1 +
> drivers/net/ethernet/intel/idpf/idpf.h | 70 +-------
> .../net/ethernet/intel/idpf/idpf_controlq.c | 26 ++-
> .../net/ethernet/intel/idpf/idpf_controlq.h | 2 -
> drivers/net/ethernet/intel/idpf/idpf_dev.c | 61 ++++---
> drivers/net/ethernet/intel/idpf/idpf_idc.c | 38 ++--
> drivers/net/ethernet/intel/idpf/idpf_lib.c | 7 +-
> drivers/net/ethernet/intel/idpf/idpf_main.c | 114 ++++++------
> drivers/net/ethernet/intel/idpf/idpf_vf_dev.c | 57 +++---
> .../net/ethernet/intel/idpf/idpf_virtchnl.c | 169 +++++++++--------
> -
> .../ethernet/intel/idpf/idpf_virtchnl_ptp.c | 58 +++---
> 11 files changed, 288 insertions(+), 315 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/Kconfig
> b/drivers/net/ethernet/intel/idpf/Kconfig
> index adab2154125b..586df3a4afe9 100644
> --- a/drivers/net/ethernet/intel/idpf/Kconfig
> +++ b/drivers/net/ethernet/intel/idpf/Kconfig
> @@ -6,6 +6,7 @@ config IDPF
> depends on PCI_MSI
> depends on PTP_1588_CLOCK_OPTIONAL
> select DIMLIB
...
> +56,14 @@ static void idpf_ctlq_reg_init(struct idpf_adapter *adapter,
> */
> static void idpf_mb_intr_reg_init(struct idpf_adapter *adapter) {
> + struct libie_mmio_info *mmio = &adapter->ctlq_ctx.mmio_info;
> struct idpf_intr_reg *intr = &adapter->mb_vector.intr_reg;
> u32 dyn_ctl = le32_to_cpu(adapter->caps.mailbox_dyn_ctl);
>
> - intr->dyn_ctl = idpf_get_reg_addr(adapter, dyn_ctl);
> + intr->dyn_ctl = libie_pci_get_mmio_addr(mmio, dyn_ctl);
Probable NULL dereference: libie_pci_get_mmio_addr(mmio, dyn_ctl) can return
NULL.
It looks like no checks were made.
> intr->dyn_ctl_intena_m = PF_GLINT_DYN_CTL_INTENA_M;
> intr->dyn_ctl_itridx_m = PF_GLINT_DYN_CTL_ITR_INDX_M;
...
>
> return 0;
> }
> --
> 2.47.0