diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-09-01 08:47:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-02 03:43:22 -0400 |
commit | f19af9c2cc015e42dfe4bd5c383e32066ec2801c (patch) | |
tree | 8b6b51c7f54013433ab14c48ce78754061e9b0a9 /drivers | |
parent | 6cdee2f96a97f6da26bd3759c3f8823332fbb438 (diff) |
tg3: inline tg3_cond_int()
This patch inlines the code of tg3_cond_int() into the function's only
callsite. This prep work makes the following patch cleaner.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 9d5c1786c664..65ff286b508a 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -618,18 +618,9 @@ static void tg3_disable_ints(struct tg3 *tp) | |||
618 | tw32_mailbox_f(tp->napi[0].int_mbox, 0x00000001); | 618 | tw32_mailbox_f(tp->napi[0].int_mbox, 0x00000001); |
619 | } | 619 | } |
620 | 620 | ||
621 | static inline void tg3_cond_int(struct tg3 *tp) | ||
622 | { | ||
623 | if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) && | ||
624 | (tp->napi[0].hw_status->status & SD_STATUS_UPDATED)) | ||
625 | tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl | GRC_LCLCTRL_SETINT); | ||
626 | else | ||
627 | tw32(HOSTCC_MODE, tp->coalesce_mode | | ||
628 | (HOSTCC_MODE_ENABLE | HOSTCC_MODE_NOW)); | ||
629 | } | ||
630 | |||
631 | static void tg3_enable_ints(struct tg3 *tp) | 621 | static void tg3_enable_ints(struct tg3 *tp) |
632 | { | 622 | { |
623 | u32 coal_now; | ||
633 | struct tg3_napi *tnapi = &tp->napi[0]; | 624 | struct tg3_napi *tnapi = &tp->napi[0]; |
634 | tp->irq_sync = 0; | 625 | tp->irq_sync = 0; |
635 | wmb(); | 626 | wmb(); |
@@ -639,7 +630,16 @@ static void tg3_enable_ints(struct tg3 *tp) | |||
639 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); | 630 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); |
640 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) | 631 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) |
641 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); | 632 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); |
642 | tg3_cond_int(tp); | 633 | |
634 | coal_now = HOSTCC_MODE_NOW; | ||
635 | |||
636 | /* Force an initial interrupt */ | ||
637 | if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) && | ||
638 | (tp->napi[0].hw_status->status & SD_STATUS_UPDATED)) | ||
639 | tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl | GRC_LCLCTRL_SETINT); | ||
640 | else | ||
641 | tw32(HOSTCC_MODE, tp->coalesce_mode | | ||
642 | HOSTCC_MODE_ENABLE | coal_now); | ||
643 | } | 643 | } |
644 | 644 | ||
645 | static inline unsigned int tg3_has_work(struct tg3_napi *tnapi) | 645 | static inline unsigned int tg3_has_work(struct tg3_napi *tnapi) |