{
int ret = 0;
- gasket_nodev_error("check_and_invoke_callback %p", cb_function);
+ gasket_log_debug(gasket_dev, "check_and_invoke_callback %p",
+ cb_function);
if (cb_function) {
mutex_lock(&gasket_dev->mutex);
ret = cb_function(gasket_dev);
int ret = 0;
if (cb_function) {
- gasket_log_info(
+ gasket_log_debug(
gasket_dev, "Invoking device-specific callback.");
ret = cb_function(gasket_dev);
}
if (file->f_mode & FMODE_WRITE) {
ownership->write_open_count--;
if (ownership->write_open_count == 0) {
- gasket_log_info(gasket_dev, "Device is now free");
+ gasket_log_debug(gasket_dev, "Device is now free");
ownership->is_owned = 0;
ownership->owner = 0;
}
}
- gasket_log_info(
+ gasket_log_debug(
gasket_dev, "New open count (owning tgid %u): %d",
ownership->owner, ownership->write_open_count);
mutex_unlock(&gasket_dev->mutex);
/* Never allow non-sysadmins to access to a dead device. */
if (gasket_dev->status != GASKET_STATUS_ALIVE) {
- gasket_log_info(gasket_dev, "Device is dead.");
+ gasket_log_debug(gasket_dev, "Device is dead.");
return false;
}
requested_permissions =
(vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
if (requested_permissions & ~(bar_permissions)) {
- gasket_log_info(
+ gasket_log_debug(
gasket_dev,
"Attempting to map a region with requested permissions "
"0x%x, but region has permissions 0x%x.",
/* Do not allow a non-owner to write. */
if ((vma->vm_flags & VM_WRITE) &&
!gasket_owned_by_current_tgid(&gasket_dev->dev_info)) {
- gasket_log_info(
+ gasket_log_debug(
gasket_dev,
"Attempting to mmap a region for write without owning "
"device.");
status = gasket_check_and_invoke_callback_nolock(
gasket_dev, driver_desc->device_status_cb);
if (status != GASKET_STATUS_ALIVE) {
- gasket_log_info(gasket_dev, "Hardware reported status %d.",
- status);
+ gasket_log_debug(gasket_dev, "Hardware reported status %d.",
+ status);
return status;
}
status = gasket_interrupt_system_status(gasket_dev);
if (status != GASKET_STATUS_ALIVE) {
- gasket_log_info(gasket_dev,
- "Interrupt system reported status %d.", status);
+ gasket_log_debug(gasket_dev,
+ "Interrupt system reported status %d.",
+ status);
return status;
}
status = gasket_page_table_system_status(
gasket_dev->page_table[i]);
if (status != GASKET_STATUS_ALIVE) {
- gasket_log_info(
+ gasket_log_debug(
gasket_dev, "Page table %d reported status %d.",
i, status);
return status;
gasket_dev = (struct gasket_dev *)filp->private_data;
driver_desc = gasket_dev->internal_desc->driver_desc;
if (!driver_desc) {
- gasket_log_error(
+ gasket_log_debug(
gasket_dev,
"Unable to find device descriptor for file %s",
d_path(&filp->f_path, path, 256));
/* Perform a device reset of the requested type. */
ret = driver_desc->device_reset_cb(gasket_dev, reset_type);
if (ret) {
- gasket_log_error(
+ gasket_log_debug(
gasket_dev, "Device reset cb returned %d.", ret);
return ret;
}
ret = gasket_interrupt_reinit(gasket_dev);
if (ret) {
- gasket_log_error(
+ gasket_log_debug(
gasket_dev, "Unable to reinit interrupts: %d.", ret);
return ret;
}
/* Get current device health. */
gasket_dev->status = gasket_get_hw_status(gasket_dev);
if (gasket_dev->status == GASKET_STATUS_DEAD) {
- gasket_log_error(gasket_dev, "Device reported as dead.");
+ gasket_log_debug(gasket_dev, "Device reported as dead.");
return -EINVAL;
}
}
break;
default:
- gasket_log_error(
+ gasket_log_debug(
gasket_dev, "Unknown attribute: %s", attr->attr.name);
ret = 0;
break;
msleep(delay_ms);
retries++;
}
- gasket_log_error(gasket_dev, "%s timeout: reg %llx timeout (%llu ms)",
+ gasket_log_debug(gasket_dev, "%s timeout: reg %llx timeout (%llu ms)",
__func__, offset, max_retries * delay_ms);
return -ETIMEDOUT;
}