aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_stats.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2007-12-06 03:28:02 -0500
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:36 -0500
commit755807a296f77ca7c31dc000afdfe1e5172bbf72 (patch)
tree0df244c6d024ec0b7085b2d405b3836f2809b4d6 /drivers/infiniband/hw/ipath/ipath_stats.c
parentd8274869d742c3d8082e1428de47e54d12104928 (diff)
IB/ipath: Changes for fields moving from devdata to portdata
This patch moves some arrays that were defined per-device to be variables defined in the per context data structure, thus avoiding extra kzalloc() calls. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_stats.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_stats.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c
index fd897652da6a..d2725cd11bdc 100644
--- a/drivers/infiniband/hw/ipath/ipath_stats.c
+++ b/drivers/infiniband/hw/ipath/ipath_stats.c
@@ -238,7 +238,7 @@ static void ipath_chk_errormask(struct ipath_devdata *dd)
238void ipath_get_faststats(unsigned long opaque) 238void ipath_get_faststats(unsigned long opaque)
239{ 239{
240 struct ipath_devdata *dd = (struct ipath_devdata *) opaque; 240 struct ipath_devdata *dd = (struct ipath_devdata *) opaque;
241 u32 val; 241 int i;
242 static unsigned cnt; 242 static unsigned cnt;
243 unsigned long flags; 243 unsigned long flags;
244 u64 traffic_wds; 244 u64 traffic_wds;
@@ -322,12 +322,11 @@ void ipath_get_faststats(unsigned long opaque)
322 322
323 /* limit qfull messages to ~one per minute per port */ 323 /* limit qfull messages to ~one per minute per port */
324 if ((++cnt & 0x10)) { 324 if ((++cnt & 0x10)) {
325 for (val = dd->ipath_cfgports - 1; ((int)val) >= 0; 325 for (i = (int) dd->ipath_cfgports; --i >= 0; ) {
326 val--) { 326 struct ipath_portdata *pd = dd->ipath_pd[i];
327 if (dd->ipath_lastegrheads[val] != -1) 327
328 dd->ipath_lastegrheads[val] = -1; 328 if (pd && pd->port_lastrcvhdrqtail != -1)
329 if (dd->ipath_lastrcvhdrqtails[val] != -1) 329 pd->port_lastrcvhdrqtail = -1;
330 dd->ipath_lastrcvhdrqtails[val] = -1;
331 } 330 }
332 } 331 }
333 332