IB/mad: Add dev_notice messages for various umad/mad registration failures
Registration failures can be difficult to debug from userspace. This gives more visibility. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
7ef5d4b046
commit
9ad13a4234
2 changed files with 57 additions and 9 deletions
|
@ -616,6 +616,8 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
|
|||
mutex_lock(&file->mutex);
|
||||
|
||||
if (!file->port->ib_dev) {
|
||||
dev_notice(file->port->dev,
|
||||
"ib_umad_reg_agent: invalid device\n");
|
||||
ret = -EPIPE;
|
||||
goto out;
|
||||
}
|
||||
|
@ -626,6 +628,9 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
|
|||
}
|
||||
|
||||
if (ureq.qpn != 0 && ureq.qpn != 1) {
|
||||
dev_notice(file->port->dev,
|
||||
"ib_umad_reg_agent: invalid QPN %d specified\n",
|
||||
ureq.qpn);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -634,6 +639,9 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
|
|||
if (!__get_agent(file, agent_id))
|
||||
goto found;
|
||||
|
||||
dev_notice(file->port->dev,
|
||||
"ib_umad_reg_agent: Max Agents (%u) reached\n",
|
||||
IB_UMAD_MAX_AGENTS);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue