From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Corinna Vinschen <vinschen@redhat.com>,
Hariprasad Kelam <hkelam@marvell.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Naama Meir <naamax.meir@linux.intel.com>,
netdev@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH 1/2] Revert "igc: fix a log entry using uninitialized netdev"
Date: Sat, 1 Jun 2024 08:06:00 +0300 [thread overview]
Message-ID: <20240601050601.1782063-2-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20240601050601.1782063-1-mika.westerberg@linux.intel.com>
This reverts commit 86167183a17e03ec77198897975e9fdfbd53cb0b.
The commit in question moved call to igc_ptp_init() to happen after
igc_reset() which calls igc_ptp_reset() with the spinlock not yet
initialized so we get following splat:
BUG: spinlock bad magic on CPU#4, udevd/249
lock: 0xffff98f317e6d4b0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 4 PID: 249 Comm: udevd Not tainted 6.10.0-rc1+ #1312
Call Trace:
<TASK>
dump_stack_lvl+0x6c/0x90
dump_stack+0x10/0x20
spin_bug+0x8c/0xc0
do_raw_spin_lock+0x6c/0xc0
_raw_spin_lock_irqsave+0x30/0x40
igc_ptp_clear_tx_tstamp+0x2e/0xc0 [igc]
igc_ptp_set_timestamp_mode+0x191/0x280 [igc]
igc_ptp_reset+0x33/0x230 [igc]
igc_reset+0xba/0x100 [igc]
igc_probe+0x7d1/0xa10 [igc]
It is likely that there are other things igc_ptp_init() does that are
required by igc_ptp_reset(), so for this reason revert the commit in
question.
Fixes: 86167183a17e ("igc: fix a log entry using uninitialized netdev")
Cc: Corinna Vinschen <vinschen@redhat.com>
Cc: Hariprasad Kelam <hkelam@marvell.com>
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 12f004f46082..ace2fbfd87d6 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7028,6 +7028,8 @@ static int igc_probe(struct pci_dev *pdev,
device_set_wakeup_enable(&adapter->pdev->dev,
adapter->flags & IGC_FLAG_WOL_SUPPORTED);
+ igc_ptp_init(adapter);
+
igc_tsn_clear_schedule(adapter);
/* reset the hardware with the new settings */
@@ -7049,9 +7051,6 @@ static int igc_probe(struct pci_dev *pdev,
/* Check if Media Autosense is enabled */
adapter->ei = *ei;
- /* do hw tstamp init after resetting */
- igc_ptp_init(adapter);
-
/* print pcie link status and MAC address */
pcie_print_link_status(pdev);
netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr);
--
2.43.0
next prev parent reply other threads:[~2024-06-01 5:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 5:05 [PATCH 0/2] igc: fix BUG() during the driver probe Mika Westerberg
2024-06-01 5:06 ` Mika Westerberg [this message]
2024-06-01 6:16 ` [PATCH 1/2] Revert "igc: fix a log entry using uninitialized netdev" Linux regression tracking (Thorsten Leemhuis)
2024-06-01 5:06 ` [PATCH 2/2] igc: Use PCI device pointer in logging in igc_ptp_init() Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240601050601.1782063-2-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkelam@marvell.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=naamax.meir@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vinicius.gomes@intel.com \
--cc=vinschen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).