/* Set attributes (cache operations) Stores the attributes for cache operation to be used in Define Extend (DE).  */
static int dasd_eckd_set_attrib(struct dasd_device *device, void __user *argp)
/* Set attributes (cache operations) Stores the attributes for cache operation to be used in Define Extend (DE).  */
static int dasd_eckd_set_attrib(struct dasd_device *device, void __user *argp)
{
	struct dasd_eckd_private *private =
		(struct dasd_eckd_private *)device->private;
	struct attrib_data_t attrib;
	if (!capable(CAP_SYS_ADMIN))
		return -EACCES;
	if (!argp)
		return -EINVAL;
	if (copy_from_user(&attrib, argp, sizeof(struct attrib_data_t)))
		return -EFAULT;
	private->attrib = attrib;
	dev_info(&device->cdev->dev,
		 "The DASD cache mode was set to %x (%i cylinder prestage)\n",
		 private->attrib.operation, private->attrib.nr_cyl);
	return 0;
}