/* Base number for all Gasket-common IOCTLs */
#define GASKET_IOCTL_BASE 0xDC
-/* Reset the device using the specified reset type. */
-#define GASKET_IOCTL_RESET _IOW(GASKET_IOCTL_BASE, 0, unsigned long)
+/* Reset the device. */
+#define GASKET_IOCTL_RESET _IO(GASKET_IOCTL_BASE, 0)
/* Associate the specified [event]fd with the specified interrupt. */
#define GASKET_IOCTL_SET_EVENTFD \
#ifndef __GASKET_CONSTANTS_H__
#define __GASKET_CONSTANTS_H__
-#define GASKET_FRAMEWORK_VERSION "1.1.1"
+#define GASKET_FRAMEWORK_VERSION "1.1.2"
/*
* The maximum number of simultaneous device types supported by the framework.
ownership->owner = 0;
/* Forces chip reset before we unmap the page tables. */
- driver_desc->device_reset_cb(gasket_dev, 0);
+ driver_desc->device_reset_cb(gasket_dev);
for (i = 0; i < driver_desc->num_page_tables; ++i) {
gasket_page_table_unmap_all(gasket_dev->page_table[i]);
}
EXPORT_SYMBOL(gasket_num_name_lookup);
-int gasket_reset(struct gasket_dev *gasket_dev, uint reset_type)
+int gasket_reset(struct gasket_dev *gasket_dev)
{
int ret;
mutex_lock(&gasket_dev->mutex);
- ret = gasket_reset_nolock(gasket_dev, reset_type);
+ ret = gasket_reset_nolock(gasket_dev);
mutex_unlock(&gasket_dev->mutex);
return ret;
}
EXPORT_SYMBOL(gasket_reset);
-int gasket_reset_nolock(struct gasket_dev *gasket_dev, uint reset_type)
+int gasket_reset_nolock(struct gasket_dev *gasket_dev)
{
int ret;
int i;
if (!driver_desc->device_reset_cb)
return 0;
- /* Perform a device reset of the requested type. */
- ret = driver_desc->device_reset_cb(gasket_dev, reset_type);
+ ret = driver_desc->device_reset_cb(gasket_dev);
if (ret) {
dev_dbg(gasket_dev->dev, "Device reset cb returned %d.\n",
ret);
/*
* device_reset_cb: Reset the hardware in question.
* @dev: Pointer to the gasket_dev structure for this device.
- * @type: Integer representing reset type. (All
- * Gasket resets have an integer representing their type
- * defined in (device)_ioctl.h; the specific resets are
- * device-dependent, but are handled in the device-specific
- * callback anyways.)
*
* Called by reset ioctls. This function should not
* lock the gasket_dev mutex. It should return 0 on success
* and an error on failure.
*/
- int (*device_reset_cb)(struct gasket_dev *dev, uint reset_type);
+ int (*device_reset_cb)(struct gasket_dev *dev);
};
/*
/*
* Reset the Gasket device.
* @gasket_dev: Gasket device struct.
- * @reset_type: Uint representing requested reset type. Should be
- * valid in the underlying callback.
*
* Calls device_reset_cb. Returns 0 on success and an error code othewrise.
* gasket_reset_nolock will not lock the mutex, gasket_reset will.
*
*/
-int gasket_reset(struct gasket_dev *gasket_dev, uint reset_type);
-int gasket_reset_nolock(struct gasket_dev *gasket_dev, uint reset_type);
+int gasket_reset(struct gasket_dev *gasket_dev);
+int gasket_reset_nolock(struct gasket_dev *gasket_dev);
/*
* Memory management functions. These will likely be spun off into their own
*/
switch (cmd) {
case GASKET_IOCTL_RESET:
- trace_gasket_ioctl_integer_data(arg);
- retval = gasket_reset(gasket_dev, arg);
+ retval = gasket_reset(gasket_dev);
break;
case GASKET_IOCTL_SET_EVENTFD:
retval = gasket_set_event_fd(gasket_dev, argp);