diff --git a/drivers/misc/nvsciipc/nvsciipc.c b/drivers/misc/nvsciipc/nvsciipc.c index 2304685c..3c9daff8 100644 --- a/drivers/misc/nvsciipc/nvsciipc.c +++ b/drivers/misc/nvsciipc/nvsciipc.c @@ -226,7 +226,8 @@ static int nvsciipc_ioctl_validate_auth_token(struct nvsciipc *ctx, int32_t ret = 0; if ((ctx->num_eps == 0) || (ctx->set_db_f != true)) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); ret = -EPERM; goto exit; } @@ -263,7 +264,8 @@ static int nvsciipc_ioctl_map_vuid(struct nvsciipc *ctx, unsigned int cmd, int32_t ret = 0; if ((ctx->num_eps == 0) || (ctx->set_db_f != true)) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); ret = -EPERM; goto exit; } @@ -300,7 +302,8 @@ static int nvsciipc_ioctl_get_db_by_name(struct nvsciipc *ctx, unsigned int cmd, int i; if ((ctx->num_eps == 0) || (ctx->set_db_f != true)) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); return -EPERM; } @@ -320,6 +323,7 @@ static int nvsciipc_ioctl_get_db_by_name(struct nvsciipc *ctx, unsigned int cmd, } if (i == ctx->num_eps) { + INFO("%s: no entry (%s)\n", __func__, get_db.ep_name); return -ENOENT; } else if (copy_to_user((void __user *)arg, &get_db, _IOC_SIZE(cmd))) { @@ -337,7 +341,8 @@ static int nvsciipc_ioctl_get_db_by_vuid(struct nvsciipc *ctx, unsigned int cmd, int i; if ((ctx->num_eps == 0) || (ctx->set_db_f != true)) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); return -EPERM; } @@ -356,6 +361,7 @@ static int nvsciipc_ioctl_get_db_by_vuid(struct nvsciipc *ctx, unsigned int cmd, } if (i == ctx->num_eps) { + INFO("%s: no entry (0x%llx)\n", __func__, get_db.vuid); return -ENOENT; } else if (copy_to_user((void __user *)arg, &get_db, _IOC_SIZE(cmd))) { @@ -373,7 +379,8 @@ static int nvsciipc_ioctl_get_vuid(struct nvsciipc *ctx, unsigned int cmd, int i; if ((ctx->num_eps == 0) || (ctx->set_db_f != true)) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); return -EPERM; } @@ -392,6 +399,7 @@ static int nvsciipc_ioctl_get_vuid(struct nvsciipc *ctx, unsigned int cmd, } if (i == ctx->num_eps) { + INFO("%s: no entry (%s)\n", __func__, get_vuid.ep_name); return -ENOENT; } else if (copy_to_user((void __user *)arg, &get_vuid, _IOC_SIZE(cmd))) { @@ -410,6 +418,8 @@ static int nvsciipc_ioctl_set_db(struct nvsciipc *ctx, unsigned int cmd, int ret = 0; int i; + INFO("set_db start\n"); + #if defined(CONFIG_ANDROID) if ((current_cred()->uid.val != SYSTEM_GID) && (current_cred()->uid.val != 0)) { @@ -511,6 +521,8 @@ static int nvsciipc_ioctl_set_db(struct nvsciipc *ctx, unsigned int cmd, ctx->set_db_f = true; + INFO("set_db done\n"); + return ret; ptr_error: @@ -540,7 +552,8 @@ static int nvsciipc_ioctl_get_dbsize(struct nvsciipc *ctx, unsigned int cmd, int32_t ret = 0; if (ctx->set_db_f != true) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); ret = -EPERM; goto exit; } @@ -635,7 +648,8 @@ static ssize_t nvsciipc_dbg_read(struct file *filp, char __user *buf, } if (ctx->set_db_f != true) { - ERR("need to set endpoint database first\n"); + ERR("%s[%d] need to set endpoint database first\n", __func__, + get_current()->pid); return -EPERM; }