From: Matt Carlson Date: Wed, 31 Aug 2011 11:44:51 +0000 (+0000) Subject: tg3: Eliminate tg3_stop_fw() prototype X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~675 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c0d39b4569b69c7cd9475a216daa2fac4fefa399;p=users%2Fjedix%2Flinux-maple.git tg3: Eliminate tg3_stop_fw() prototype This patch moves tg3_stop_fw() earlier in the file to eliminate its prototype. (cherry picked from commit 8d5a89b3da78fd4cb17b261bf9d3b016c2120cac) Signed-off-by: Matt Carlson Reviewed-by: Benjamin Li Reviewed-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e004a4fb3d1e..b55d168777a2 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1395,6 +1395,22 @@ static void tg3_ump_link_report(struct tg3 *tp) tg3_generate_fw_event(tp); } +/* tp->lock is held. */ +static void tg3_stop_fw(struct tg3 *tp) +{ + if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) { + /* Wait for RX cpu to ACK the previous event. */ + tg3_wait_for_event_ack(tp); + + tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); + + tg3_generate_fw_event(tp); + + /* Wait for RX cpu to ACK this event. */ + tg3_wait_for_event_ack(tp); + } +} + static void tg3_link_report(struct tg3 *tp) { if (!netif_carrier_ok(tp->dev)) { @@ -7430,8 +7446,6 @@ static void tg3_restore_pci_state(struct tg3 *tp) } } -static void tg3_stop_fw(struct tg3 *); - /* tp->lock is held. */ static int tg3_chip_reset(struct tg3 *tp) { @@ -7678,22 +7692,6 @@ static int tg3_chip_reset(struct tg3 *tp) return 0; } -/* tp->lock is held. */ -static void tg3_stop_fw(struct tg3 *tp) -{ - if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) { - /* Wait for RX cpu to ACK the previous event. */ - tg3_wait_for_event_ack(tp); - - tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); - - tg3_generate_fw_event(tp); - - /* Wait for RX cpu to ACK this event. */ - tg3_wait_for_event_ack(tp); - } -} - /* tp->lock is held. */ static int tg3_halt(struct tg3 *tp, int kind, int silent) {