]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Initiallize bp->ptp_lock first before using it
authorMichael Chan <michael.chan@broadcom.com>
Tue, 3 May 2022 01:13:11 +0000 (21:13 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 May 2022 00:41:32 +0000 (17:41 -0700)
commite8e3e235315a3efbb7491304e935f88bebde6bcc
tree09dcdefbc52d4d480fa016def61f7ab21f241abf
parent538838aff8be09f67b13862916b79abd06370fbe
bnxt_en: Initiallize bp->ptp_lock first before using it

bnxt_ptp_init() calls bnxt_ptp_init_rtc() which will acquire the ptp_lock
spinlock.  The spinlock is not initialized until later.  Move the
bnxt_ptp_init_rtc() call after the spinlock is initialized.

Fixes: e9c5c7cbd596 ("bnxt_en: Add driver support to use Real Time Counter for PTP")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c