Skip to content

Commit 611e1b0

Browse files
michichkuba-moo
authored andcommitted
octeon_ep: initialize mbox mutexes
The two mbox-related mutexes are destroyed in octep_ctrl_mbox_uninit(), but the corresponding mutex_init calls were missing. A "DEBUG_LOCKS_WARN_ON(lock->magic != lock)" warning was emitted with CONFIG_DEBUG_MUTEXES on. Initialize the two mutexes in octep_ctrl_mbox_init(). Fixes: 577f0d1 ("octeon_ep: add separate mailbox command and response queues") Signed-off-by: Michal Schmidt <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 37b61cd commit 611e1b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
9898
writeq(OCTEP_CTRL_MBOX_STATUS_INIT,
9999
OCTEP_CTRL_MBOX_INFO_HOST_STATUS(mbox->barmem));
100100

101+
mutex_init(&mbox->h2fq_lock);
102+
mutex_init(&mbox->f2hq_lock);
103+
101104
mbox->h2fq.sz = readl(OCTEP_CTRL_MBOX_H2FQ_SZ(mbox->barmem));
102105
mbox->h2fq.hw_prod = OCTEP_CTRL_MBOX_H2FQ_PROD(mbox->barmem);
103106
mbox->h2fq.hw_cons = OCTEP_CTRL_MBOX_H2FQ_CONS(mbox->barmem);

0 commit comments

Comments
 (0)