linux/drivers/net/ethernet/chelsio/cxgb3
Roland Dreier 60158e6464 cxgb3: Don't call cxgb_vlan_mode until q locks are initialized
The driver calls cxgb_vlan_mode() from init_one().  This calls into
synchronize_rx(), which locks all the q locks, but the q locks are not
initialized until cxgb_up() -> setup_sge_qsets().  So move the call to
cxgb_vlan_mode() into cxgb_up(), after the call to setup_sge_qsets().
We also move the body of these functions up higher to avoid having to
a forward declaration.

This was found because of the lockdep warning:

    INFO: trying to register non-static key.
    the code is fine but needs lockdep annotation.
    turning off the locking correctness validator.
    Pid: 323, comm: work_for_cpu Not tainted 3.4.0-rc5 #28
    Call Trace:
     [<ffffffff8106e767>] register_lock_class+0x108/0x2d0
     [<ffffffff8106ff42>] __lock_acquire+0xd3/0xd06
     [<ffffffff81070fd0>] lock_acquire+0xbf/0xfe
     [<ffffffff813862a6>] _raw_spin_lock_irq+0x36/0x45
     [<ffffffffa01e71aa>] cxgb_vlan_mode+0x96/0xcb [cxgb3]
     [<ffffffffa01f90eb>] init_one+0x8c4/0x980 [cxgb3]
     [<ffffffff811fcbf0>] local_pci_probe+0x3f/0x70
     [<ffffffff81042206>] do_work_for_cpu+0x10/0x22
     [<ffffffff810482de>] kthread+0xa1/0xa9
     [<ffffffff8138e234>] kernel_thread_helper+0x4/0x10

Contrary to what lockdep says, the code is not fine: we are locking an
uninitialized spinlock.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-30 22:08:44 -04:00
..
Makefile
adapter.h
ael1002.c
aq100x.c
common.h
cxgb3_ctl_defs.h
cxgb3_defs.h
cxgb3_ioctl.h
cxgb3_main.c cxgb3: Don't call cxgb_vlan_mode until q locks are initialized 2012-04-30 22:08:44 -04:00
cxgb3_offload.c cxgb3: Handle NULL dst neighbour in cxgb3_offload.c 2011-12-05 15:20:19 -05:00
cxgb3_offload.h
firmware_exports.h
l2t.c cxgb3: Rework t3_l2t_get to take a dst_entry instead of a neighbour. 2011-12-05 15:20:19 -05:00
l2t.h cxgb3: Rework t3_l2t_get to take a dst_entry instead of a neighbour. 2011-12-05 15:20:19 -05:00
mc5.c
regs.h
sge.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
sge_defs.h
t3_cpl.h
t3_hw.c
t3cdev.h
version.h cxgb3: update firmware version 2012-02-15 15:48:19 -05:00
vsc8211.c
xgmac.c