Commit 37bd9ed
ixgbe: initialize aci.lock before it's used
Currently aci.lock is initialized too late. A bunch of ACI callbacks
using the lock are called prior it's initialized.
Commit 337369f ("locking/mutex: Add MUTEX_WARN_ON() into fast path")
highlights that issue what results in call trace.
[ 4.092899] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
[ 4.092910] WARNING: CPU: 0 PID: 578 at kernel/locking/mutex.c:154 mutex_lock+0x6d/0x80
[ 4.098757] Call Trace:
[ 4.098847] <TASK>
[ 4.098922] ixgbe_aci_send_cmd+0x8c/0x1e0 [ixgbe]
[ 4.099108] ? hrtimer_try_to_cancel+0x18/0x110
[ 4.099277] ixgbe_aci_get_fw_ver+0x52/0xa0 [ixgbe]
[ 4.099460] ixgbe_check_fw_error+0x1fc/0x2f0 [ixgbe]
[ 4.099650] ? usleep_range_state+0x69/0xd0
[ 4.099811] ? usleep_range_state+0x8c/0xd0
[ 4.099964] ixgbe_probe+0x3b0/0x12d0 [ixgbe]
[ 4.100132] local_pci_probe+0x43/0xa0
[ 4.100267] work_for_cpu_fn+0x13/0x20
[ 4.101647] </TASK>
Move aci.lock mutex initialization to ixgbe_sw_init() before any ACI
command is sent. Along with that move also related SWFW semaphore in
order to reduce size of ixgbe_probe() and that way all locks are
initialized in ixgbe_sw_init().
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Fixes: 4600cdf ("ixgbe: Enable link management in E610 device")
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: NipaLocal <nipa@local>1 parent faf6a52 commit 37bd9ed
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6978 | 6978 | | |
6979 | 6979 | | |
6980 | 6980 | | |
| 6981 | + | |
| 6982 | + | |
| 6983 | + | |
| 6984 | + | |
| 6985 | + | |
| 6986 | + | |
| 6987 | + | |
6981 | 6988 | | |
6982 | 6989 | | |
6983 | 6990 | | |
| |||
11648 | 11655 | | |
11649 | 11656 | | |
11650 | 11657 | | |
11651 | | - | |
11652 | | - | |
11653 | | - | |
11654 | | - | |
11655 | 11658 | | |
11656 | 11659 | | |
11657 | 11660 | | |
| |||
11855 | 11858 | | |
11856 | 11859 | | |
11857 | 11860 | | |
11858 | | - | |
11859 | | - | |
11860 | 11861 | | |
11861 | 11862 | | |
11862 | 11863 | | |
| |||
12016 | 12017 | | |
12017 | 12018 | | |
12018 | 12019 | | |
| 12020 | + | |
12019 | 12021 | | |
12020 | 12022 | | |
12021 | | - | |
12022 | 12023 | | |
12023 | 12024 | | |
12024 | 12025 | | |
| |||
0 commit comments