2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/net/ethernet
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
..
3com Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
8390 Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
adaptec netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:41:20 -05:00
adi adi: adapt to eth_hw_addr_random() and changes in arch/blackfin 2012-02-19 19:03:04 -05:00
aeroflex ethernet: unify return value of .ndo_set_mac_address if address is invalid 2012-02-23 17:03:20 -05:00
alteon Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
amd Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
apple netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
atheros atl1: fix kernel panic in case of DMA errors 2012-04-13 13:34:20 -04:00
broadcom tg3: Avoid panic from reserved statblk field access 2012-04-25 14:41:41 -04:00
brocade Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-03-21 13:36:41 -07:00
cadence net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
calxeda net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
chelsio cxgb3: Don't call cxgb_vlan_mode until q locks are initialized 2012-04-30 22:08:44 -04:00
cirrus Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
cisco enic: Fix addr valid check in enic_set_vf_mac 2012-03-08 00:28:19 -08:00
davicom net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
dec dec/tulip/de4x5: print MAC via printk format specifier 2012-02-24 15:40:59 -05:00
dlink dl2k: Clean up rio_ioctl 2012-04-26 05:36:39 -04:00
emulex be2net: fix programming of VLAN tags for VF 2012-03-19 16:52:17 -04:00
faraday net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
fujitsu Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hp netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:52:27 -05:00
i825xx Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ibm ehea: fix promiscuous mode 2012-04-26 05:07:45 -04:00
icplus netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:52:27 -05:00
intel ixgbe: fix calling skb_put on nonlinear skb assertion bug 2012-04-30 18:54:52 -07:00
marvell sky2: copy received packets on inefficient unaligned architecture 2012-04-04 18:14:04 -04:00
mellanox mlx4: allocate just enough pages instead of always 4 pages 2012-04-04 20:34:29 -04:00
micrel ks8851: Fix request_irq/free_irq mismatch 2012-04-21 15:55:31 -04:00
microchip net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
myricom drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
natsemi Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
neterion Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nuvoton netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
nvidia Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nxp net: lpc_eth: Fix rename of dev_hw_addr_random 2012-04-01 16:47:12 -04:00
octeon octeon: fix PHY name to match MDIO bus name 2012-02-13 16:04:09 -05:00
oki-semi net/pch_gbe: supports eg20t ptp clock 2012-03-09 13:55:38 -08:00
packetengines Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-05 21:16:26 -05:00
pasemi ethernet: unify return value of .ndo_set_mac_address if address is invalid 2012-02-23 17:03:20 -05:00
qlogic qlcnic: Bug fix for LRO 2012-03-23 14:51:31 -04:00
racal netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
rdc net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
realtek 8139cp: set intr mask after its handler is registered 2012-04-13 13:41:52 -04:00
renesas net: sh_eth: fix endian check for architecture independent 2012-04-01 23:22:11 -04:00
seeq Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sfc MTD merge for 3.4 2012-03-30 17:31:56 -07:00
sgi net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery 2011-12-27 13:17:34 -05:00
silan
sis net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
smsc drivers/net: Do not free an IRQ if its request failed 2012-04-21 16:41:11 -04:00
stmicro stmmac: re-add IFF_UNICAST_FLT for dwmac1000 2012-04-04 18:38:31 -04:00
sun Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
tehuti netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
ti tlan: add cast needed for proper 64 bit operation 2012-04-25 14:24:33 -04:00
tile drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing 2012-04-02 13:17:37 -04:00
toshiba net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
tundra Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
via via-rhine: fix wait-bit inversion. 2012-04-01 23:09:36 -04:00
xilinx drivers/net/ethernet/xilinx/axi ethernet: Correct Copyright 2012-04-13 13:58:42 -04:00
xircom Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
xscale xscale/ixp2000/ixpdev: print MAC via printk format specifier 2012-02-24 15:41:00 -05:00
dnet.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
dnet.h
ethoc.c ethoc: set addr_assign_type if random_ether_addr() used 2012-02-17 15:58:06 -05:00
fealnx.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:48:09 -05:00
jme.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-26 21:55:51 -05:00
jme.h jme: Fix FIFO flush issue 2012-02-22 14:44:41 -05:00
Kconfig lpc32xx: Added ethernet driver 2012-03-12 17:08:34 -07:00
korina.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
lantiq_etop.c ethernet: Fix typo in lantiq_etop.c 2012-02-19 19:02:42 -05:00
Makefile lpc32xx: Added ethernet driver 2012-03-12 17:08:34 -07:00
mipsnet.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
netx-eth.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
s6gmac.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00