diff options
author | Dai Haruki <dai.haruki@freescale.com> | 2008-12-16 18:29:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-16 18:29:52 -0500 |
commit | b46a8454cd304b5376ba00d3457a612720e47269 (patch) | |
tree | cf6a119d3903b519b9540585684ba1eb2ef130d6 /drivers/net/gianfar.h | |
parent | b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 (diff) |
gianfar: Optimize interrupt coalescing configuration
Store the interrupt coalescing values in the form in which they will be
written to the interrupt coalescing registers. This puts a little overhead
into the ethtool configuration, and takes it out of the interrupt handler
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r-- | drivers/net/gianfar.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index ca7f0a6a68c5..449f508a5640 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -189,6 +189,12 @@ extern const char gfar_driver_version[]; | |||
189 | #define mk_ic_value(count, time) (IC_ICEN | \ | 189 | #define mk_ic_value(count, time) (IC_ICEN | \ |
190 | mk_ic_icft(count) | \ | 190 | mk_ic_icft(count) | \ |
191 | mk_ic_ictt(time)) | 191 | mk_ic_ictt(time)) |
192 | #define get_icft_value(ic) (((unsigned long)ic & IC_ICFT_MASK) >> \ | ||
193 | IC_ICFT_SHIFT) | ||
194 | #define get_ictt_value(ic) ((unsigned long)ic & IC_ICTT_MASK) | ||
195 | |||
196 | #define DEFAULT_TXIC mk_ic_value(DEFAULT_TXCOUNT, DEFAULT_TXTIME) | ||
197 | #define DEFAULT_RXIC mk_ic_value(DEFAULT_RXCOUNT, DEFAULT_RXTIME) | ||
192 | 198 | ||
193 | #define RCTRL_PAL_MASK 0x001f0000 | 199 | #define RCTRL_PAL_MASK 0x001f0000 |
194 | #define RCTRL_VLEX 0x00002000 | 200 | #define RCTRL_VLEX 0x00002000 |
@@ -694,8 +700,7 @@ struct gfar_private { | |||
694 | 700 | ||
695 | /* Configuration info for the coalescing features */ | 701 | /* Configuration info for the coalescing features */ |
696 | unsigned char txcoalescing; | 702 | unsigned char txcoalescing; |
697 | unsigned short txcount; | 703 | unsigned long txic; |
698 | unsigned short txtime; | ||
699 | 704 | ||
700 | /* Buffer descriptor pointers */ | 705 | /* Buffer descriptor pointers */ |
701 | struct txbd8 *tx_bd_base; /* First tx buffer descriptor */ | 706 | struct txbd8 *tx_bd_base; /* First tx buffer descriptor */ |
@@ -717,8 +722,7 @@ struct gfar_private { | |||
717 | 722 | ||
718 | /* RX Coalescing values */ | 723 | /* RX Coalescing values */ |
719 | unsigned char rxcoalescing; | 724 | unsigned char rxcoalescing; |
720 | unsigned short rxcount; | 725 | unsigned long rxic; |
721 | unsigned short rxtime; | ||
722 | 726 | ||
723 | struct rxbd8 *rx_bd_base; /* First Rx buffers */ | 727 | struct rxbd8 *rx_bd_base; /* First Rx buffers */ |
724 | struct rxbd8 *cur_rx; /* Next free rx ring entry */ | 728 | struct rxbd8 *cur_rx; /* Next free rx ring entry */ |