tg3: Move napi_add calls below tg3_get_invariants
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 13 Nov 2009 13:03:42 +0000 (13:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2009 06:14:45 +0000 (22:14 -0800)
commit78f90dcf184b8225a24217605c4289f1986451a3
treeee0559bf41211975701c8f2cc310ef8ec7303fe2
parent35f2d7d0d7c222a580da0ed91c8d70c54267620a
tg3: Move napi_add calls below tg3_get_invariants

tg3_get_invariants(), among other things, discovers whether or not
the device is MSI-X capable and how many interrupts it supports.
This discovery needs to happen before registering NAPI instances with
netdev.  This patch moves the code block that calls napi_add later in
tg3_init_one() so that tg3_get_invariants() has a chance to run first.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c