diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/enic/enic_res.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/enic/enic_res.c')
-rw-r--r-- | drivers/net/enic/enic_res.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 32111144efc9..02839bf0fe8b 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c | |||
@@ -66,21 +66,21 @@ int enic_get_vnic_config(struct enic *enic) | |||
66 | GET_CONFIG(wq_desc_count); | 66 | GET_CONFIG(wq_desc_count); |
67 | GET_CONFIG(rq_desc_count); | 67 | GET_CONFIG(rq_desc_count); |
68 | GET_CONFIG(mtu); | 68 | GET_CONFIG(mtu); |
69 | GET_CONFIG(intr_timer); | ||
70 | GET_CONFIG(intr_timer_type); | 69 | GET_CONFIG(intr_timer_type); |
71 | GET_CONFIG(intr_mode); | 70 | GET_CONFIG(intr_mode); |
71 | GET_CONFIG(intr_timer_usec); | ||
72 | 72 | ||
73 | c->wq_desc_count = | 73 | c->wq_desc_count = |
74 | min_t(u32, ENIC_MAX_WQ_DESCS, | 74 | min_t(u32, ENIC_MAX_WQ_DESCS, |
75 | max_t(u32, ENIC_MIN_WQ_DESCS, | 75 | max_t(u32, ENIC_MIN_WQ_DESCS, |
76 | c->wq_desc_count)); | 76 | c->wq_desc_count)); |
77 | c->wq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */ | 77 | c->wq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */ |
78 | 78 | ||
79 | c->rq_desc_count = | 79 | c->rq_desc_count = |
80 | min_t(u32, ENIC_MAX_RQ_DESCS, | 80 | min_t(u32, ENIC_MAX_RQ_DESCS, |
81 | max_t(u32, ENIC_MIN_RQ_DESCS, | 81 | max_t(u32, ENIC_MIN_RQ_DESCS, |
82 | c->rq_desc_count)); | 82 | c->rq_desc_count)); |
83 | c->rq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */ | 83 | c->rq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */ |
84 | 84 | ||
85 | if (c->mtu == 0) | 85 | if (c->mtu == 0) |
86 | c->mtu = 1500; | 86 | c->mtu = 1500; |
@@ -88,15 +88,17 @@ int enic_get_vnic_config(struct enic *enic) | |||
88 | max_t(u16, ENIC_MIN_MTU, | 88 | max_t(u16, ENIC_MIN_MTU, |
89 | c->mtu)); | 89 | c->mtu)); |
90 | 90 | ||
91 | c->intr_timer = min_t(u16, VNIC_INTR_TIMER_MAX, c->intr_timer); | 91 | c->intr_timer_usec = min_t(u32, |
92 | INTR_COALESCE_HW_TO_USEC(VNIC_INTR_TIMER_MAX), | ||
93 | c->intr_timer_usec); | ||
92 | 94 | ||
93 | printk(KERN_INFO PFX "vNIC MAC addr %pM wq/rq %d/%d\n", | 95 | printk(KERN_INFO PFX "vNIC MAC addr %pM wq/rq %d/%d\n", |
94 | enic->mac_addr, c->wq_desc_count, c->rq_desc_count); | 96 | enic->mac_addr, c->wq_desc_count, c->rq_desc_count); |
95 | printk(KERN_INFO PFX "vNIC mtu %d csum tx/rx %d/%d tso/lro %d/%d " | 97 | printk(KERN_INFO PFX "vNIC mtu %d csum tx/rx %d/%d tso/lro %d/%d " |
96 | "intr timer %d\n", | 98 | "intr timer %d usec\n", |
97 | c->mtu, ENIC_SETTING(enic, TXCSUM), | 99 | c->mtu, ENIC_SETTING(enic, TXCSUM), |
98 | ENIC_SETTING(enic, RXCSUM), ENIC_SETTING(enic, TSO), | 100 | ENIC_SETTING(enic, RXCSUM), ENIC_SETTING(enic, TSO), |
99 | ENIC_SETTING(enic, LRO), c->intr_timer); | 101 | ENIC_SETTING(enic, LRO), c->intr_timer_usec); |
100 | 102 | ||
101 | return 0; | 103 | return 0; |
102 | } | 104 | } |
@@ -303,7 +305,7 @@ void enic_init_vnic_resources(struct enic *enic) | |||
303 | 305 | ||
304 | for (i = 0; i < enic->intr_count; i++) { | 306 | for (i = 0; i < enic->intr_count; i++) { |
305 | vnic_intr_init(&enic->intr[i], | 307 | vnic_intr_init(&enic->intr[i], |
306 | enic->config.intr_timer, | 308 | INTR_COALESCE_USEC_TO_HW(enic->config.intr_timer_usec), |
307 | enic->config.intr_timer_type, | 309 | enic->config.intr_timer_type, |
308 | mask_on_assertion); | 310 | mask_on_assertion); |
309 | } | 311 | } |