]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlx4_core: Add func name to common error strings to locate uniquely
authorMukesh Kacker <mukesh.kacker@oracle.com>
Sun, 12 Feb 2017 00:42:56 +0000 (16:42 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 30 May 2017 05:33:44 +0000 (22:33 -0700)
We add function names (and where needed line numbers) to
some repeated error strings so we can identify the failure
location uniquely for ease of debugging.

Orabug: 25440329

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
drivers/net/ethernet/mellanox/mlx4/cmd.c

index c9e08d3437ee5962bc357e57827df01163122baf..382e8354fdb4a24fec52055eb4e5fbc72d516306 100644 (file)
@@ -371,8 +371,8 @@ static int mlx4_comm_cmd_wait(struct mlx4_dev *dev, u8 vhcr_cmd,
 
        err = context->result;
        if (err && context->fw_status != CMD_STAT_MULTI_FUNC_REQ) {
-               mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n",
-                        vhcr_cmd, context->fw_status);
+               mlx4_err(dev, "%s: command 0x%x failed: fw status = 0x%x\n",
+                        __func__, vhcr_cmd, context->fw_status);
                if (mlx4_closing_cmd_fatal_error(op, context->fw_status))
                        goto out_reset;
        }
@@ -669,8 +669,8 @@ static int mlx4_cmd_poll(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
                           __raw_readl(hcr + HCR_STATUS_OFFSET)) >> 24;
        err = mlx4_status_to_errno(stat);
        if (err) {
-               mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n",
-                        op, stat);
+               mlx4_err(dev, "%s: command 0x%x failed: fw status = 0x%x\n",
+                        __func__, op, stat);
                if (mlx4_closing_cmd_fatal_error(op, stat))
                        goto out_reset;
                goto out;
@@ -766,11 +766,11 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
                    (in_modifier == 1 || in_modifier == 2) &&
                    op_modifier == MLX4_SET_PORT_IB_OPCODE &&
                    context->fw_status == CMD_STAT_BAD_SIZE)
-                       mlx4_dbg(dev, "command 0x%x failed: fw status = 0x%x\n",
-                                op, context->fw_status);
+                       mlx4_dbg(dev, "%s(%d): command 0x%x failed: fw status = 0x%x\n",
+                                __func__, __LINE__, op, context->fw_status);
                else
-                       mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n",
-                                op, context->fw_status);
+                       mlx4_err(dev, "%s(%d): command 0x%x failed: fw status = 0x%x\n",
+                                __func__, __LINE__, op, context->fw_status);
                if (dev->persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR)
                        err = mlx4_internal_err_ret_value(dev, op, op_modifier);
                else if (mlx4_closing_cmd_fatal_error(op, context->fw_status))