diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2006-12-11 17:47:00 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-05 16:58:43 -0500 |
commit | 356bd1460d1e1c4e433e4114fdac02139bddf17c (patch) | |
tree | 677c17fddfb7c66f29134c33f64463f15fc43824 /drivers/net/chelsio/tp.c | |
parent | b7d58394e65c7d90486026614a6ae26d82dd7756 (diff) |
chelsio: spaces, tabs and friends
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/chelsio/tp.c')
-rw-r--r-- | drivers/net/chelsio/tp.c | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/drivers/net/chelsio/tp.c b/drivers/net/chelsio/tp.c index 0ca0b6e19e43..6222d585e447 100644 --- a/drivers/net/chelsio/tp.c +++ b/drivers/net/chelsio/tp.c | |||
@@ -17,39 +17,36 @@ struct petp { | |||
17 | static void tp_init(adapter_t * ap, const struct tp_params *p, | 17 | static void tp_init(adapter_t * ap, const struct tp_params *p, |
18 | unsigned int tp_clk) | 18 | unsigned int tp_clk) |
19 | { | 19 | { |
20 | if (t1_is_asic(ap)) { | 20 | u32 val; |
21 | u32 val; | ||
22 | |||
23 | val = F_TP_IN_CSPI_CPL | F_TP_IN_CSPI_CHECK_IP_CSUM | | ||
24 | F_TP_IN_CSPI_CHECK_TCP_CSUM | F_TP_IN_ESPI_ETHERNET; | ||
25 | if (!p->pm_size) | ||
26 | val |= F_OFFLOAD_DISABLE; | ||
27 | else | ||
28 | val |= F_TP_IN_ESPI_CHECK_IP_CSUM | | ||
29 | F_TP_IN_ESPI_CHECK_TCP_CSUM; | ||
30 | writel(val, ap->regs + A_TP_IN_CONFIG); | ||
31 | writel(F_TP_OUT_CSPI_CPL | | ||
32 | F_TP_OUT_ESPI_ETHERNET | | ||
33 | F_TP_OUT_ESPI_GENERATE_IP_CSUM | | ||
34 | F_TP_OUT_ESPI_GENERATE_TCP_CSUM, | ||
35 | ap->regs + A_TP_OUT_CONFIG); | ||
36 | writel(V_IP_TTL(64) | | ||
37 | F_PATH_MTU /* IP DF bit */ | | ||
38 | V_5TUPLE_LOOKUP(p->use_5tuple_mode) | | ||
39 | V_SYN_COOKIE_PARAMETER(29), | ||
40 | ap->regs + A_TP_GLOBAL_CONFIG); | ||
41 | /* | ||
42 | * Enable pause frame deadlock prevention. | ||
43 | */ | ||
44 | if (is_T2(ap) && ap->params.nports > 1) { | ||
45 | u32 drop_ticks = DROP_MSEC * (tp_clk / 1000); | ||
46 | |||
47 | writel(F_ENABLE_TX_DROP | F_ENABLE_TX_ERROR | | ||
48 | V_DROP_TICKS_CNT(drop_ticks) | | ||
49 | V_NUM_PKTS_DROPPED(DROP_PKTS_CNT), | ||
50 | ap->regs + A_TP_TX_DROP_CONFIG); | ||
51 | } | ||
52 | 21 | ||
22 | if (!t1_is_asic(ap)) | ||
23 | return; | ||
24 | |||
25 | val = F_TP_IN_CSPI_CPL | F_TP_IN_CSPI_CHECK_IP_CSUM | | ||
26 | F_TP_IN_CSPI_CHECK_TCP_CSUM | F_TP_IN_ESPI_ETHERNET; | ||
27 | if (!p->pm_size) | ||
28 | val |= F_OFFLOAD_DISABLE; | ||
29 | else | ||
30 | val |= F_TP_IN_ESPI_CHECK_IP_CSUM | F_TP_IN_ESPI_CHECK_TCP_CSUM; | ||
31 | writel(val, ap->regs + A_TP_IN_CONFIG); | ||
32 | writel(F_TP_OUT_CSPI_CPL | | ||
33 | F_TP_OUT_ESPI_ETHERNET | | ||
34 | F_TP_OUT_ESPI_GENERATE_IP_CSUM | | ||
35 | F_TP_OUT_ESPI_GENERATE_TCP_CSUM, ap->regs + A_TP_OUT_CONFIG); | ||
36 | writel(V_IP_TTL(64) | | ||
37 | F_PATH_MTU /* IP DF bit */ | | ||
38 | V_5TUPLE_LOOKUP(p->use_5tuple_mode) | | ||
39 | V_SYN_COOKIE_PARAMETER(29), ap->regs + A_TP_GLOBAL_CONFIG); | ||
40 | /* | ||
41 | * Enable pause frame deadlock prevention. | ||
42 | */ | ||
43 | if (is_T2(ap) && ap->params.nports > 1) { | ||
44 | u32 drop_ticks = DROP_MSEC * (tp_clk / 1000); | ||
45 | |||
46 | writel(F_ENABLE_TX_DROP | F_ENABLE_TX_ERROR | | ||
47 | V_DROP_TICKS_CNT(drop_ticks) | | ||
48 | V_NUM_PKTS_DROPPED(DROP_PKTS_CNT), | ||
49 | ap->regs + A_TP_TX_DROP_CONFIG); | ||
53 | } | 50 | } |
54 | } | 51 | } |
55 | 52 | ||
@@ -61,6 +58,7 @@ void t1_tp_destroy(struct petp *tp) | |||
61 | struct petp *__devinit t1_tp_create(adapter_t * adapter, struct tp_params *p) | 58 | struct petp *__devinit t1_tp_create(adapter_t * adapter, struct tp_params *p) |
62 | { | 59 | { |
63 | struct petp *tp = kzalloc(sizeof(*tp), GFP_KERNEL); | 60 | struct petp *tp = kzalloc(sizeof(*tp), GFP_KERNEL); |
61 | |||
64 | if (!tp) | 62 | if (!tp) |
65 | return NULL; | 63 | return NULL; |
66 | 64 | ||