{
struct i2o_controller *c = dev->controller;
int tid = dev->tid;
- unsigned long msg;
- unsigned long mptr;
+ void *msg;
+ void *mptr;
u64 offset;
struct request *req = ireq->req;
int count = req->nr_sectors<<9;
// printk(KERN_INFO "i2ob_send called\n");
/* Map the message to a virtual address */
- msg = c->mem_offset + m;
+ msg = c->msg_virt + m;
sgnum = i2ob_build_sglist(dev, ireq);
/* Now flush the message by making it a NOP */
m[0]&=0x00FFFFFF;
m[0]|=(I2O_CMD_UTIL_NOP)<<24;
- i2o_post_message(c, ((unsigned long)m) - c->mem_offset);
+ i2o_post_message(c, (unsigned long) m - (unsigned long) c->msg_virt);
return;
}
{
struct gendisk *disk = inode->i_bdev->bd_disk;
struct i2ob_device *dev = disk->private_data;
+ void __user *argp = (void __user *)arg;
/* Anyone capable of this syscall can do *real bad* things */
i2o_block_biosparam(get_capacity(disk),
&g.cylinders, &g.heads, &g.sectors);
g.start = get_start_sect(inode->i_bdev);
- return copy_to_user((void *)arg,&g, sizeof(g))?-EFAULT:0;
+ return copy_to_user(argp, &g, sizeof(g))?-EFAULT:0;
}
case BLKI2OGRSTRAT:
- return put_user(dev->rcache, (int *)arg);
+ return put_user(dev->rcache, (int __user *)argp);
case BLKI2OGWSTRAT:
- return put_user(dev->wcache, (int *)arg);
+ return put_user(dev->wcache, (int __user *)argp);
case BLKI2OSRSTRAT:
if(arg<0||arg>CACHE_SMARTFETCH)
return -EINVAL;