Spin_lock_irqsave deadlock

Hello,
I found that ath79_register_wmac function calls cause kernel deadlocks,this function calls ath79_device_reset_clear, which reads as follows:

void ath79_device_reset_clear(u32 mask)
{
	unsigned long flags;
	u32 reg;
	u32 t;

	if (soc_is_ar71xx())
		reg = AR71XX_RESET_REG_RESET_MODULE;
	else if (soc_is_ar724x())
		reg = AR724X_RESET_REG_RESET_MODULE;
	else if (soc_is_ar913x())
		reg = AR913X_RESET_REG_RESET_MODULE;
	else if (soc_is_ar933x())
		reg = AR933X_RESET_REG_RESET_MODULE;
	else if (soc_is_ar934x())
		reg = AR934X_RESET_REG_RESET_MODULE;
	else if (soc_is_qca953x())
		reg = QCA953X_RESET_REG_RESET_MODULE;
	else if (soc_is_qca955x())
		reg = QCA955X_RESET_REG_RESET_MODULE;
	else if (soc_is_qca956x() || soc_is_tp9343())
		reg = QCA956X_RESET_REG_RESET_MODULE;
	else
		panic("Reset register not defined for this SOC");

	spin_lock_irqsave(&ath79_device_reset_lock, flags);
	t = ath79_reset_rr(reg);
	ath79_reset_wr(reg, t & ~mask);
	spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
}

After several debugging, it was found that after the execution of spin_lock_irqsave, there was a chance for deadlock to occur in the kernel.
This problem is very difficult to reproduce, so I hope to pass theoretical analysis first, and I hope you can give me some Suggestions
Thanks

cat target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | grep -C23 INIT_DELAYED_WORK