[dpdk-stable] [PATCH 18.11 2/4] net/bnxt: fix probe in FreeBSD
Kevin Traynor
ktraynor at redhat.com
Wed Mar 18 23:59:26 CET 2020
On 18/03/2020 05:55, Somnath Kotur wrote:
> From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
>
Added [ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ]
> In FreeBSD environment, nic_uio driver does not support interrupts
> and rte_intr_callback_register() will fail to register interrupts
> which in turn causes bnxt driver probe failure.
>
> Fixed driver to ignore interrupt callback failures in FreeBSD.
>
> Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start")
> Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration")
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
> Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
> ---
> drivers/net/bnxt/bnxt_ethdev.c | 3 +++
> drivers/net/bnxt/bnxt_irq.c | 7 +++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 878b9f5..f222c79 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -342,8 +342,11 @@ static int bnxt_init_chip(struct bnxt *bp)
>
> /* enable uio/vfio intr/eventfd mapping */
> rc = rte_intr_enable(intr_handle);
> +#ifndef RTE_EXEC_ENV_FREEBSD
> + /* In FreeBSD OS, nic_uio driver does not support interrupts */
> if (rc)
> goto err_free;
> +#endif
>
> rc = bnxt_get_hwrm_link_config(bp, &new);
> if (rc) {
> diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
> index 57365d7..b5f30bb 100644
> --- a/drivers/net/bnxt/bnxt_irq.c
> +++ b/drivers/net/bnxt/bnxt_irq.c
> @@ -152,6 +152,13 @@ int bnxt_request_int(struct bnxt *bp)
> if (!rc)
> irq->requested = 1;
> }
> + #ifdef RTE_EXEC_ENV_FREEBSD
> + /**
> + * In FreeBSD OS, nic_uio does not support interrupts and
> + * interrupt register callback will fail.
> + */
> + rc = 0;
> + #endif
>
> return rc;
> }
>
More information about the stable
mailing list