summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoechr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/aoe/aoechr.c')
-rw-r--r--drivers/block/aoe/aoechr.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 1bc1cf9603f..e22b4c9520a 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */
+/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */
/*
* aoechr.c
* AoE character device driver
@@ -15,7 +15,6 @@ enum {
MINOR_INTERFACES,
MINOR_REVALIDATE,
MSGSZ = 2048,
- NARGS = 10,
NMSG = 100, /* message backlog to retain */
};
@@ -56,9 +55,8 @@ static int
interfaces(const char __user *str, size_t size)
{
if (set_aoe_iflist(str, size)) {
- printk(KERN_CRIT
- "%s: could not set interface list: %s\n",
- __FUNCTION__, "too many interfaces");
+ printk(KERN_ERR
+ "aoe: could not set interface list: too many interfaces\n");
return -EINVAL;
}
return 0;
@@ -81,8 +79,7 @@ revalidate(const char __user *str, size_t size)
/* should be e%d.%d format */
n = sscanf(buf, "e%d.%d", &major, &minor);
if (n != 2) {
- printk(KERN_ERR "aoe: %s: invalid device specification\n",
- __FUNCTION__);
+ printk(KERN_ERR "aoe: invalid device specification\n");
return -EINVAL;
}
d = aoedev_by_aoeaddr(major, minor);
@@ -90,6 +87,7 @@ revalidate(const char __user *str, size_t size)
return -EINVAL;
spin_lock_irqsave(&d->lock, flags);
+ d->flags &= ~DEVFL_MAXBCNT;
d->flags |= DEVFL_PAUSE;
spin_unlock_irqrestore(&d->lock, flags);
aoecmd_cfg(major, minor);
@@ -116,7 +114,7 @@ bail: spin_unlock_irqrestore(&emsgs_lock, flags);
mp = kmalloc(n, GFP_ATOMIC);
if (mp == NULL) {
- printk(KERN_CRIT "aoe: aoechr_error: allocation failure, len=%ld\n", n);
+ printk(KERN_ERR "aoe: allocation failure, len=%ld\n", n);
goto bail;
}
@@ -141,7 +139,7 @@ aoechr_write(struct file *filp, const char __user *buf, size_t cnt, loff_t *offp
switch ((unsigned long) filp->private_data) {
default:
- printk(KERN_INFO "aoe: aoechr_write: can't write to that file.\n");
+ printk(KERN_INFO "aoe: can't write to that file.\n");
break;
case MINOR_DISCOVER:
ret = discover();
@@ -250,7 +248,7 @@ aoechr_init(void)
n = register_chrdev(AOE_MAJOR, "aoechr", &aoe_fops);
if (n < 0) {
- printk(KERN_ERR "aoe: aoechr_init: can't register char device\n");
+ printk(KERN_ERR "aoe: can't register char device\n");
return n;
}
sema_init(&emsgs_sema, 0);