u8 __iomem *hcr = priv->cmd.hcr;
int err = 0;
u64 end;
+ u8 status;
down(&priv->cmd.poll_sem);
(u64) be32_to_cpu((__force __be32)
__raw_readl(hcr + HCR_OUT_PARAM_OFFSET + 4));
- err = mlx4_status_to_errno((u8)(be32_to_cpu((__force __be32)
- __raw_readl(hcr + HCR_STATUS_OFFSET)) >> 24));
+ status = (u8)(be32_to_cpu((__force __be32)__raw_readl(hcr + HCR_STATUS_OFFSET)) >> 24);
+ err = mlx4_status_to_errno(status);
+ if (status)
+ mlx4_err(dev, "Command failed: op %#hx, status %d, errno %d.\n",
+ op, status, err);
out:
up(&priv->cmd.poll_sem);
return;
context->result = mlx4_status_to_errno(status);
+
+ if (status)
+ mlx4_err(dev, "Command failed: token %#hx, status %d, errno %d.\n",
+ token, status, context->result);
context->out_param = out_param;
complete(&context->done);
if (wait_for_completion_timeout(&context->done, msecs_to_jiffies(timeout))) {
if (!context->done.done) {
- static int spam_limit = 10;
+ static int spam_limit = 5;
err = -EBUSY;
if (spam_limit-- > 0)
mlx4_err(dev, "mlx4_cmd_wait: Command %02x completed with timeout after %d secs \n",