mad.c (d4bbf7e7759afc172e2bfbc5c416324590049cdd) | mad.c (f9baff509f8a05a79626defdbdf4f4aa4efd373b) |
---|---|
1/* 2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 95 unchanged lines hidden (view full) --- 104 105 op_modifier |= 0x4; 106 107 in_modifier |= in_wc->slid << 16; 108 } 109 110 err = mlx4_cmd_box(dev->dev, inmailbox->dma, outmailbox->dma, 111 in_modifier, op_modifier, | 1/* 2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 95 unchanged lines hidden (view full) --- 104 105 op_modifier |= 0x4; 106 107 in_modifier |= in_wc->slid << 16; 108 } 109 110 err = mlx4_cmd_box(dev->dev, inmailbox->dma, outmailbox->dma, 111 in_modifier, op_modifier, |
112 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); | 112 MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C, 113 MLX4_CMD_NATIVE); |
113 114 if (!err) 115 memcpy(response_mad, outmailbox->buf, 256); 116 117 mlx4_free_cmd_mailbox(dev->dev, inmailbox); 118 mlx4_free_cmd_mailbox(dev->dev, outmailbox); 119 120 return err; --- 204 unchanged lines hidden (view full) --- 325 if (in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_PERF_MGMT) 326 return -EINVAL; 327 328 mailbox = mlx4_alloc_cmd_mailbox(dev->dev); 329 if (IS_ERR(mailbox)) 330 return IB_MAD_RESULT_FAILURE; 331 332 err = mlx4_cmd_box(dev->dev, 0, mailbox->dma, inmod, 0, | 114 115 if (!err) 116 memcpy(response_mad, outmailbox->buf, 256); 117 118 mlx4_free_cmd_mailbox(dev->dev, inmailbox); 119 mlx4_free_cmd_mailbox(dev->dev, outmailbox); 120 121 return err; --- 204 unchanged lines hidden (view full) --- 326 if (in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_PERF_MGMT) 327 return -EINVAL; 328 329 mailbox = mlx4_alloc_cmd_mailbox(dev->dev); 330 if (IS_ERR(mailbox)) 331 return IB_MAD_RESULT_FAILURE; 332 333 err = mlx4_cmd_box(dev->dev, 0, mailbox->dma, inmod, 0, |
333 MLX4_CMD_QUERY_IF_STAT, MLX4_CMD_TIME_CLASS_C); | 334 MLX4_CMD_QUERY_IF_STAT, MLX4_CMD_TIME_CLASS_C, 335 MLX4_CMD_WRAPPED); |
334 if (err) 335 err = IB_MAD_RESULT_FAILURE; 336 else { 337 memset(out_mad->data, 0, sizeof out_mad->data); 338 mode = ((struct mlx4_counter *)mailbox->buf)->counter_mode; 339 switch (mode & 0xf) { 340 case 0: 341 edit_counter(mailbox->buf, --- 89 unchanged lines hidden --- | 336 if (err) 337 err = IB_MAD_RESULT_FAILURE; 338 else { 339 memset(out_mad->data, 0, sizeof out_mad->data); 340 mode = ((struct mlx4_counter *)mailbox->buf)->counter_mode; 341 switch (mode & 0xf) { 342 case 0: 343 edit_counter(mailbox->buf, --- 89 unchanged lines hidden --- |