aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorMarkus Lidel <Markus.Lidel@shadowconnect.com>2005-06-24 01:02:23 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:05:29 -0400
commitf33213ecf49c98da4e85121b592c3bea8057c2e6 (patch)
treeda7e51e7204625f21371eac23a931f4fe479e9db /drivers/message
parent9e87545f06930c1d294423a8091d1077e7444a47 (diff)
[PATCH] I2O: Lindent run and replacement of printk through osm printing functions
Lindent run and replaced printk() through the corresponding osm_*() function Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/i2o/Kconfig10
-rw-r--r--drivers/message/i2o/device.c1
-rw-r--r--drivers/message/i2o/driver.c3
-rw-r--r--drivers/message/i2o/exec-osm.c2
-rw-r--r--drivers/message/i2o/i2o_block.c3
-rw-r--r--drivers/message/i2o/i2o_block.h28
-rw-r--r--drivers/message/i2o/i2o_config.c20
-rw-r--r--drivers/message/i2o/i2o_proc.c2
-rw-r--r--drivers/message/i2o/iop.c128
-rw-r--r--drivers/message/i2o/pci.c5
10 files changed, 96 insertions, 106 deletions
diff --git a/drivers/message/i2o/Kconfig b/drivers/message/i2o/Kconfig
index 94b6d676c5cb..06e8eb19a05c 100644
--- a/drivers/message/i2o/Kconfig
+++ b/drivers/message/i2o/Kconfig
@@ -44,8 +44,8 @@ config I2O_EXT_ADAPTEC_DMA64
44 44
45config I2O_CONFIG 45config I2O_CONFIG
46 tristate "I2O Configuration support" 46 tristate "I2O Configuration support"
47 depends on PCI && I2O 47 depends on I2O
48 help 48 ---help---
49 Say Y for support of the configuration interface for the I2O adapters. 49 Say Y for support of the configuration interface for the I2O adapters.
50 If you have a RAID controller from Adaptec and you want to use the 50 If you have a RAID controller from Adaptec and you want to use the
51 raidutils to manage your RAID array, you have to say Y here. 51 raidutils to manage your RAID array, you have to say Y here.
@@ -74,7 +74,7 @@ config I2O_BUS
74config I2O_BLOCK 74config I2O_BLOCK
75 tristate "I2O Block OSM" 75 tristate "I2O Block OSM"
76 depends on I2O 76 depends on I2O
77 help 77 ---help---
78 Include support for the I2O Block OSM. The Block OSM presents disk 78 Include support for the I2O Block OSM. The Block OSM presents disk
79 and other structured block devices to the operating system. If you 79 and other structured block devices to the operating system. If you
80 are using an RAID controller, you could access the array only by 80 are using an RAID controller, you could access the array only by
@@ -87,7 +87,7 @@ config I2O_BLOCK
87config I2O_SCSI 87config I2O_SCSI
88 tristate "I2O SCSI OSM" 88 tristate "I2O SCSI OSM"
89 depends on I2O && SCSI 89 depends on I2O && SCSI
90 help 90 ---help---
91 Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel 91 Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel
92 I2O controller. You can use both the SCSI and Block OSM together if 92 I2O controller. You can use both the SCSI and Block OSM together if
93 you wish. To access a RAID array, you must use the Block OSM driver. 93 you wish. To access a RAID array, you must use the Block OSM driver.
@@ -99,7 +99,7 @@ config I2O_SCSI
99config I2O_PROC 99config I2O_PROC
100 tristate "I2O /proc support" 100 tristate "I2O /proc support"
101 depends on I2O 101 depends on I2O
102 help 102 ---help---
103 If you say Y here and to "/proc file system support", you will be 103 If you say Y here and to "/proc file system support", you will be
104 able to read I2O related information from the virtual directory 104 able to read I2O related information from the virtual directory
105 /proc/i2o. 105 /proc/i2o.
diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c
index 0ee342ea29bc..d8d6e89a91cc 100644
--- a/drivers/message/i2o/device.c
+++ b/drivers/message/i2o/device.c
@@ -443,7 +443,6 @@ static struct class_interface i2o_device_class_interface = {
443 * Note that the minimum sized reslist is 8 bytes and contains 443 * Note that the minimum sized reslist is 8 bytes and contains
444 * ResultCount, ErrorInfoSize, BlockStatus and BlockSize. 444 * ResultCount, ErrorInfoSize, BlockStatus and BlockSize.
445 */ 445 */
446
447static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, 446static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist,
448 int oplen, void *reslist, int reslen) 447 int oplen, void *reslist, int reslen)
449{ 448{
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index c32f9dbc5744..739bfdef0c6d 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -117,10 +117,9 @@ int i2o_driver_register(struct i2o_driver *drv)
117 117
118 i2o_driver_notify_controller_add(drv, c); 118 i2o_driver_notify_controller_add(drv, c);
119 list_for_each_entry(i2o_dev, &c->devices, list) 119 list_for_each_entry(i2o_dev, &c->devices, list)
120 i2o_driver_notify_device_add(drv, i2o_dev); 120 i2o_driver_notify_device_add(drv, i2o_dev);
121 } 121 }
122 122
123
124 rc = driver_register(&drv->driver); 123 rc = driver_register(&drv->driver);
125 if (rc) 124 if (rc)
126 destroy_workqueue(drv->event_queue); 125 destroy_workqueue(drv->event_queue);
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c
index ffe0cecfa060..1b7389876e70 100644
--- a/drivers/message/i2o/exec-osm.c
+++ b/drivers/message/i2o/exec-osm.c
@@ -152,7 +152,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long
152 list_add(&wait->list, &i2o_exec_wait_list); 152 list_add(&wait->list, &i2o_exec_wait_list);
153 153
154 wait_event_interruptible_timeout(wq, wait->complete, 154 wait_event_interruptible_timeout(wq, wait->complete,
155 timeout * HZ); 155 timeout * HZ);
156 156
157 wait->wq = NULL; 157 wait->wq = NULL;
158 } 158 }
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index 28b3918dbc16..f283b5bafdd3 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -940,7 +940,6 @@ static void i2o_block_request_fn(struct request_queue *q)
940 INIT_WORK(&dreq->work, i2o_block_delayed_request_fn, 940 INIT_WORK(&dreq->work, i2o_block_delayed_request_fn,
941 dreq); 941 dreq);
942 942
943 osm_info("transfer error\n");
944 if (!queue_delayed_work(i2o_block_driver.event_queue, 943 if (!queue_delayed_work(i2o_block_driver.event_queue,
945 &dreq->work, 944 &dreq->work,
946 I2O_BLOCK_RETRY_TIME)) 945 I2O_BLOCK_RETRY_TIME))
@@ -1042,8 +1041,8 @@ static struct i2o_block_device *i2o_block_device_alloc(void)
1042static int i2o_block_probe(struct device *dev) 1041static int i2o_block_probe(struct device *dev)
1043{ 1042{
1044 struct i2o_device *i2o_dev = to_i2o_device(dev); 1043 struct i2o_device *i2o_dev = to_i2o_device(dev);
1045 struct i2o_block_device *i2o_blk_dev;
1046 struct i2o_controller *c = i2o_dev->iop; 1044 struct i2o_controller *c = i2o_dev->iop;
1045 struct i2o_block_device *i2o_blk_dev;
1047 struct gendisk *gd; 1046 struct gendisk *gd;
1048 struct request_queue *queue; 1047 struct request_queue *queue;
1049 static int unit = 0; 1048 static int unit = 0;
diff --git a/drivers/message/i2o/i2o_block.h b/drivers/message/i2o/i2o_block.h
index e45cc40ce384..4fdaa5bda412 100644
--- a/drivers/message/i2o/i2o_block.h
+++ b/drivers/message/i2o/i2o_block.h
@@ -64,40 +64,38 @@
64 64
65/* I2O Block OSM mempool struct */ 65/* I2O Block OSM mempool struct */
66struct i2o_block_mempool { 66struct i2o_block_mempool {
67 kmem_cache_t *slab; 67 kmem_cache_t *slab;
68 mempool_t *pool; 68 mempool_t *pool;
69}; 69};
70 70
71/* I2O Block device descriptor */ 71/* I2O Block device descriptor */
72struct i2o_block_device { 72struct i2o_block_device {
73 struct i2o_device *i2o_dev; /* pointer to I2O device */ 73 struct i2o_device *i2o_dev; /* pointer to I2O device */
74 struct gendisk *gd; 74 struct gendisk *gd;
75 spinlock_t lock; /* queue lock */ 75 spinlock_t lock; /* queue lock */
76 struct list_head open_queue; /* list of transfered, but unfinished 76 struct list_head open_queue; /* list of transfered, but unfinished
77 requests */ 77 requests */
78 unsigned int open_queue_depth; /* number of requests in the queue */ 78 unsigned int open_queue_depth; /* number of requests in the queue */
79 79
80 int rcache; /* read cache flags */ 80 int rcache; /* read cache flags */
81 int wcache; /* write cache flags */ 81 int wcache; /* write cache flags */
82 int flags; 82 int flags;
83 u16 power; /* power state */ 83 u16 power; /* power state */
84 int media_change_flag; /* media changed flag */ 84 int media_change_flag; /* media changed flag */
85}; 85};
86 86
87/* I2O Block device request */ 87/* I2O Block device request */
88struct i2o_block_request 88struct i2o_block_request {
89{
90 struct list_head queue; 89 struct list_head queue;
91 struct request *req; /* corresponding request */ 90 struct request *req; /* corresponding request */
92 struct i2o_block_device *i2o_blk_dev; /* I2O block device */ 91 struct i2o_block_device *i2o_blk_dev; /* I2O block device */
93 struct device *dev; /* device used for DMA */ 92 struct device *dev; /* device used for DMA */
94 int sg_nents; /* number of SG elements */ 93 int sg_nents; /* number of SG elements */
95 struct scatterlist sg_table[I2O_MAX_PHYS_SEGMENTS]; /* SG table */ 94 struct scatterlist sg_table[I2O_MAX_PHYS_SEGMENTS]; /* SG table */
96}; 95};
97 96
98/* I2O Block device delayed request */ 97/* I2O Block device delayed request */
99struct i2o_block_delayed_request 98struct i2o_block_delayed_request {
100{
101 struct work_struct work; 99 struct work_struct work;
102 struct request_queue *queue; 100 struct request_queue *queue;
103}; 101};
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 8160a1f6c73a..8ebc86ff1002 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -368,9 +368,9 @@ static int i2o_cfg_swul(unsigned long arg)
368 368
369 i2o_dma_free(&c->pdev->dev, &buffer); 369 i2o_dma_free(&c->pdev->dev, &buffer);
370 370
371return_ret: 371 return_ret:
372 return ret; 372 return ret;
373return_fault: 373 return_fault:
374 ret = -EFAULT; 374 ret = -EFAULT;
375 goto return_ret; 375 goto return_ret;
376}; 376};
@@ -519,7 +519,8 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp)
519 519
520#ifdef CONFIG_I2O_EXT_ADAPTEC 520#ifdef CONFIG_I2O_EXT_ADAPTEC
521#ifdef CONFIG_COMPAT 521#ifdef CONFIG_COMPAT
522static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long arg) 522static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
523 unsigned long arg)
523{ 524{
524 struct i2o_cmd_passthru32 __user *cmd; 525 struct i2o_cmd_passthru32 __user *cmd;
525 struct i2o_controller *c; 526 struct i2o_controller *c;
@@ -646,8 +647,9 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
646 flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) { 647 flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
647 // TODO 64bit fix 648 // TODO 64bit fix
648 if (copy_from_user 649 if (copy_from_user
649 (p->virt, (void __user *)(unsigned long)sg[i].addr_bus, 650 (p->virt,
650 sg_size)) { 651 (void __user *)(unsigned long)sg[i].
652 addr_bus, sg_size)) {
651 printk(KERN_DEBUG 653 printk(KERN_DEBUG
652 "%s: Could not copy SG buf %d FROM user\n", 654 "%s: Could not copy SG buf %d FROM user\n",
653 c->name, i); 655 c->name, i);
@@ -738,11 +740,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
738 return rcode; 740 return rcode;
739} 741}
740 742
741static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) 743static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
744 unsigned long arg)
742{ 745{
743 int ret; 746 int ret;
744 lock_kernel(); 747 lock_kernel();
745 switch (cmd) { 748 switch (cmd) {
746 case I2OGETIOPS: 749 case I2OGETIOPS:
747 ret = i2o_cfg_ioctl(NULL, file, cmd, arg); 750 ret = i2o_cfg_ioctl(NULL, file, cmd, arg);
748 break; 751 break;
@@ -1136,6 +1139,7 @@ static int __init i2o_config_old_init(void)
1136 osm_err("can't register device.\n"); 1139 osm_err("can't register device.\n");
1137 return -EBUSY; 1140 return -EBUSY;
1138 } 1141 }
1142
1139 return 0; 1143 return 0;
1140} 1144}
1141 1145
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index e5b74452c495..d559a1758363 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#define OSM_NAME "proc-osm" 30#define OSM_NAME "proc-osm"
31#define OSM_VERSION "$Rev$" 31#define OSM_VERSION "1.145"
32#define OSM_DESCRIPTION "I2O ProcFS OSM" 32#define OSM_DESCRIPTION "I2O ProcFS OSM"
33 33
34#define I2O_MAX_MODULES 4 34#define I2O_MAX_MODULES 4
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
index c32022bc2a21..42f8b810d6e5 100644
--- a/drivers/message/i2o/iop.c
+++ b/drivers/message/i2o/iop.c
@@ -117,13 +117,13 @@ u32 i2o_cntxt_list_add(struct i2o_controller * c, void *ptr)
117 unsigned long flags; 117 unsigned long flags;
118 118
119 if (!ptr) 119 if (!ptr)
120 printk(KERN_ERR "%s: couldn't add NULL pointer to context list!" 120 osm_err("%s: couldn't add NULL pointer to context list!\n",
121 "\n", c->name); 121 c->name);
122 122
123 entry = kmalloc(sizeof(*entry), GFP_ATOMIC); 123 entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
124 if (!entry) { 124 if (!entry) {
125 printk(KERN_ERR "%s: Could not allocate memory for context " 125 osm_err("%s: Could not allocate memory for context list element"
126 "list element\n", c->name); 126 "\n", c->name);
127 return 0; 127 return 0;
128 } 128 }
129 129
@@ -142,7 +142,7 @@ u32 i2o_cntxt_list_add(struct i2o_controller * c, void *ptr)
142 142
143 spin_unlock_irqrestore(&c->context_list_lock, flags); 143 spin_unlock_irqrestore(&c->context_list_lock, flags);
144 144
145 pr_debug("%s: Add context to list %p -> %d\n", c->name, ptr, context); 145 osm_debug("%s: Add context to list %p -> %d\n", c->name, ptr, context);
146 146
147 return entry->context; 147 return entry->context;
148}; 148};
@@ -174,11 +174,11 @@ u32 i2o_cntxt_list_remove(struct i2o_controller * c, void *ptr)
174 spin_unlock_irqrestore(&c->context_list_lock, flags); 174 spin_unlock_irqrestore(&c->context_list_lock, flags);
175 175
176 if (!context) 176 if (!context)
177 printk(KERN_WARNING "%s: Could not remove nonexistent ptr " 177 osm_warn("%s: Could not remove nonexistent ptr %p\n", c->name,
178 "%p\n", c->name, ptr); 178 ptr);
179 179
180 pr_debug("%s: remove ptr from context list %d -> %p\n", c->name, 180 osm_debug("%s: remove ptr from context list %d -> %p\n", c->name,
181 context, ptr); 181 context, ptr);
182 182
183 return context; 183 return context;
184}; 184};
@@ -208,11 +208,10 @@ void *i2o_cntxt_list_get(struct i2o_controller *c, u32 context)
208 spin_unlock_irqrestore(&c->context_list_lock, flags); 208 spin_unlock_irqrestore(&c->context_list_lock, flags);
209 209
210 if (!ptr) 210 if (!ptr)
211 printk(KERN_WARNING "%s: context id %d not found\n", c->name, 211 osm_warn("%s: context id %d not found\n", c->name, context);
212 context);
213 212
214 pr_debug("%s: get ptr from context list %d -> %p\n", c->name, context, 213 osm_debug("%s: get ptr from context list %d -> %p\n", c->name, context,
215 ptr); 214 ptr);
216 215
217 return ptr; 216 return ptr;
218}; 217};
@@ -240,11 +239,11 @@ u32 i2o_cntxt_list_get_ptr(struct i2o_controller * c, void *ptr)
240 spin_unlock_irqrestore(&c->context_list_lock, flags); 239 spin_unlock_irqrestore(&c->context_list_lock, flags);
241 240
242 if (!context) 241 if (!context)
243 printk(KERN_WARNING "%s: Could not find nonexistent ptr " 242 osm_warn("%s: Could not find nonexistent ptr %p\n", c->name,
244 "%p\n", c->name, ptr); 243 ptr);
245 244
246 pr_debug("%s: get context id from context list %p -> %d\n", c->name, 245 osm_debug("%s: get context id from context list %p -> %d\n", c->name,
247 ptr, context); 246 ptr, context);
248 247
249 return context; 248 return context;
250}; 249};
@@ -324,10 +323,9 @@ static int i2o_iop_quiesce(struct i2o_controller *c)
324 323
325 /* Long timeout needed for quiesce if lots of devices */ 324 /* Long timeout needed for quiesce if lots of devices */
326 if ((rc = i2o_msg_post_wait(c, m, 240))) 325 if ((rc = i2o_msg_post_wait(c, m, 240)))
327 printk(KERN_INFO "%s: Unable to quiesce (status=%#x).\n", 326 osm_info("%s: Unable to quiesce (status=%#x).\n", c->name, -rc);
328 c->name, -rc);
329 else 327 else
330 pr_debug("%s: Quiesced.\n", c->name); 328 osm_debug("%s: Quiesced.\n", c->name);
331 329
332 i2o_status_get(c); // Entered READY state 330 i2o_status_get(c); // Entered READY state
333 331
@@ -365,10 +363,9 @@ static int i2o_iop_enable(struct i2o_controller *c)
365 363
366 /* How long of a timeout do we need? */ 364 /* How long of a timeout do we need? */
367 if ((rc = i2o_msg_post_wait(c, m, 240))) 365 if ((rc = i2o_msg_post_wait(c, m, 240)))
368 printk(KERN_ERR "%s: Could not enable (status=%#x).\n", 366 osm_err("%s: Could not enable (status=%#x).\n", c->name, -rc);
369 c->name, -rc);
370 else 367 else
371 pr_debug("%s: Enabled.\n", c->name); 368 osm_debug("%s: Enabled.\n", c->name);
372 369
373 i2o_status_get(c); // entered OPERATIONAL state 370 i2o_status_get(c); // entered OPERATIONAL state
374 371
@@ -432,10 +429,9 @@ static int i2o_iop_clear(struct i2o_controller *c)
432 &msg->u.head[1]); 429 &msg->u.head[1]);
433 430
434 if ((rc = i2o_msg_post_wait(c, m, 30))) 431 if ((rc = i2o_msg_post_wait(c, m, 30)))
435 printk(KERN_INFO "%s: Unable to clear (status=%#x).\n", 432 osm_info("%s: Unable to clear (status=%#x).\n", c->name, -rc);
436 c->name, -rc);
437 else 433 else
438 pr_debug("%s: Cleared.\n", c->name); 434 osm_debug("%s: Cleared.\n", c->name);
439 435
440 /* Enable all IOPs */ 436 /* Enable all IOPs */
441 i2o_iop_enable_all(); 437 i2o_iop_enable_all();
@@ -570,14 +566,13 @@ static int i2o_iop_reset(struct i2o_controller *c)
570 * can't read one in the given ammount of time, we assume the 566 * can't read one in the given ammount of time, we assume the
571 * IOP could not reboot properly. 567 * IOP could not reboot properly.
572 */ 568 */
573 pr_debug("%s: Reset in progress, waiting for reboot...\n", 569 osm_debug("%s: Reset in progress, waiting for reboot...\n",
574 c->name); 570 c->name);
575 571
576 m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET); 572 m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET);
577 while (m == I2O_QUEUE_EMPTY) { 573 while (m == I2O_QUEUE_EMPTY) {
578 if (time_after(jiffies, timeout)) { 574 if (time_after(jiffies, timeout)) {
579 printk(KERN_ERR "%s: IOP reset timeout.\n", 575 osm_err("%s: IOP reset timeout.\n", c->name);
580 c->name);
581 rc = -ETIMEDOUT; 576 rc = -ETIMEDOUT;
582 goto exit; 577 goto exit;
583 } 578 }
@@ -635,29 +630,29 @@ static int i2o_iop_activate(struct i2o_controller *c)
635 630
636 rc = i2o_status_get(c); 631 rc = i2o_status_get(c);
637 if (rc) { 632 if (rc) {
638 printk(KERN_INFO "%s: Unable to obtain status, " 633 osm_info("%s: Unable to obtain status, attempting a reset.\n",
639 "attempting a reset.\n", c->name); 634 c->name);
640 rc = i2o_iop_reset(c); 635 rc = i2o_iop_reset(c);
641 if (rc) 636 if (rc)
642 return rc; 637 return rc;
643 } 638 }
644 639
645 if (sb->i2o_version > I2OVER15) { 640 if (sb->i2o_version > I2OVER15) {
646 printk(KERN_ERR "%s: Not running version 1.5 of the I2O " 641 osm_err("%s: Not running version 1.5 of the I2O Specification."
647 "Specification.\n", c->name); 642 "\n", c->name);
648 return -ENODEV; 643 return -ENODEV;
649 } 644 }
650 645
651 switch (sb->iop_state) { 646 switch (sb->iop_state) {
652 case ADAPTER_STATE_FAULTED: 647 case ADAPTER_STATE_FAULTED:
653 printk(KERN_CRIT "%s: hardware fault\n", c->name); 648 osm_err("%s: hardware fault\n", c->name);
654 return -EFAULT; 649 return -EFAULT;
655 650
656 case ADAPTER_STATE_READY: 651 case ADAPTER_STATE_READY:
657 case ADAPTER_STATE_OPERATIONAL: 652 case ADAPTER_STATE_OPERATIONAL:
658 case ADAPTER_STATE_HOLD: 653 case ADAPTER_STATE_HOLD:
659 case ADAPTER_STATE_FAILED: 654 case ADAPTER_STATE_FAILED:
660 pr_debug("%s: already running, trying to reset...\n", c->name); 655 osm_debug("%s: already running, trying to reset...\n", c->name);
661 rc = i2o_iop_reset(c); 656 rc = i2o_iop_reset(c);
662 if (rc) 657 if (rc)
663 return rc; 658 return rc;
@@ -707,20 +702,18 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
707 res->flags = IORESOURCE_MEM; 702 res->flags = IORESOURCE_MEM;
708 res->start = 0; 703 res->start = 0;
709 res->end = 0; 704 res->end = 0;
710 printk(KERN_INFO "%s: requires private memory resources.\n", 705 osm_info("%s: requires private memory resources.\n", c->name);
711 c->name);
712 root = pci_find_parent_resource(c->pdev, res); 706 root = pci_find_parent_resource(c->pdev, res);
713 if (root == NULL) 707 if (root == NULL)
714 printk(KERN_WARNING "%s: Can't find parent resource!\n", 708 osm_warn("%s: Can't find parent resource!\n", c->name);
715 c->name);
716 if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ 709 if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */
717 NULL, NULL) >= 0) { 710 NULL, NULL) >= 0) {
718 c->mem_alloc = 1; 711 c->mem_alloc = 1;
719 sb->current_mem_size = 1 + res->end - res->start; 712 sb->current_mem_size = 1 + res->end - res->start;
720 sb->current_mem_base = res->start; 713 sb->current_mem_base = res->start;
721 printk(KERN_INFO "%s: allocated %ld bytes of PCI memory" 714 osm_info("%s: allocated %ld bytes of PCI memory at "
722 " at 0x%08lX.\n", c->name, 715 "0x%08lX.\n", c->name,
723 1 + res->end - res->start, res->start); 716 1 + res->end - res->start, res->start);
724 } 717 }
725 } 718 }
726 719
@@ -730,20 +723,18 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
730 res->flags = IORESOURCE_IO; 723 res->flags = IORESOURCE_IO;
731 res->start = 0; 724 res->start = 0;
732 res->end = 0; 725 res->end = 0;
733 printk(KERN_INFO "%s: requires private memory resources.\n", 726 osm_info("%s: requires private memory resources.\n", c->name);
734 c->name);
735 root = pci_find_parent_resource(c->pdev, res); 727 root = pci_find_parent_resource(c->pdev, res);
736 if (root == NULL) 728 if (root == NULL)
737 printk(KERN_WARNING "%s: Can't find parent resource!\n", 729 osm_warn("%s: Can't find parent resource!\n", c->name);
738 c->name);
739 if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ 730 if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */
740 NULL, NULL) >= 0) { 731 NULL, NULL) >= 0) {
741 c->io_alloc = 1; 732 c->io_alloc = 1;
742 sb->current_io_size = 1 + res->end - res->start; 733 sb->current_io_size = 1 + res->end - res->start;
743 sb->current_mem_base = res->start; 734 sb->current_mem_base = res->start;
744 printk(KERN_INFO "%s: allocated %ld bytes of PCI I/O at" 735 osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX"
745 " 0x%08lX.\n", c->name, 736 ".\n", c->name, 1 + res->end - res->start,
746 1 + res->end - res->start, res->start); 737 res->start);
747 } 738 }
748 } 739 }
749 740
@@ -787,10 +778,10 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
787 PCI_DMA_TODEVICE); 778 PCI_DMA_TODEVICE);
788 779
789 if (rc < 0) 780 if (rc < 0)
790 printk(KERN_ERR "%s: Unable to set SysTab (status=%#x).\n", 781 osm_err("%s: Unable to set SysTab (status=%#x).\n", c->name,
791 c->name, -rc); 782 -rc);
792 else 783 else
793 pr_debug("%s: SysTab set.\n", c->name); 784 osm_debug("%s: SysTab set.\n", c->name);
794 785
795 i2o_status_get(c); // Entered READY state 786 i2o_status_get(c); // Entered READY state
796 787
@@ -814,7 +805,7 @@ static int i2o_iop_online(struct i2o_controller *c)
814 return rc; 805 return rc;
815 806
816 /* In READY state */ 807 /* In READY state */
817 pr_debug("%s: Attempting to enable...\n", c->name); 808 osm_debug("%s: Attempting to enable...\n", c->name);
818 rc = i2o_iop_enable(c); 809 rc = i2o_iop_enable(c);
819 if (rc) 810 if (rc)
820 return rc; 811 return rc;
@@ -833,7 +824,7 @@ void i2o_iop_remove(struct i2o_controller *c)
833{ 824{
834 struct i2o_device *dev, *tmp; 825 struct i2o_device *dev, *tmp;
835 826
836 pr_debug("%s: deleting controller\n", c->name); 827 osm_debug("%s: deleting controller\n", c->name);
837 828
838 i2o_driver_notify_controller_remove_all(c); 829 i2o_driver_notify_controller_remove_all(c);
839 830
@@ -882,8 +873,7 @@ static int i2o_systab_build(void)
882 873
883 systab = i2o_systab.virt = kmalloc(i2o_systab.len, GFP_KERNEL); 874 systab = i2o_systab.virt = kmalloc(i2o_systab.len, GFP_KERNEL);
884 if (!systab) { 875 if (!systab) {
885 printk(KERN_ERR "i2o: unable to allocate memory for System " 876 osm_err("unable to allocate memory for System Table\n");
886 "Table\n");
887 return -ENOMEM; 877 return -ENOMEM;
888 } 878 }
889 memset(systab, 0, i2o_systab.len); 879 memset(systab, 0, i2o_systab.len);
@@ -895,8 +885,8 @@ static int i2o_systab_build(void)
895 i2o_status_block *sb; 885 i2o_status_block *sb;
896 886
897 if (count >= num_controllers) { 887 if (count >= num_controllers) {
898 printk(KERN_ERR "i2o: controller added while building " 888 osm_err("controller added while building system table"
899 "system table\n"); 889 "\n");
900 break; 890 break;
901 } 891 }
902 892
@@ -910,9 +900,8 @@ static int i2o_systab_build(void)
910 * it is techninically not part of the I2O subsystem... 900 * it is techninically not part of the I2O subsystem...
911 */ 901 */
912 if (unlikely(i2o_status_get(c))) { 902 if (unlikely(i2o_status_get(c))) {
913 printk(KERN_ERR "%s: Deleting b/c could not get status" 903 osm_err("%s: Deleting b/c could not get status while "
914 " while attempting to build system table\n", 904 "attempting to build system table\n", c->name);
915 c->name);
916 i2o_iop_remove(c); 905 i2o_iop_remove(c);
917 continue; // try the next one 906 continue; // try the next one
918 } 907 }
@@ -994,7 +983,7 @@ int i2o_status_get(struct i2o_controller *c)
994 timeout = jiffies + I2O_TIMEOUT_STATUS_GET * HZ; 983 timeout = jiffies + I2O_TIMEOUT_STATUS_GET * HZ;
995 while (status_block[87] != 0xFF) { 984 while (status_block[87] != 0xFF) {
996 if (time_after(jiffies, timeout)) { 985 if (time_after(jiffies, timeout)) {
997 printk(KERN_ERR "%s: Get status timeout.\n", c->name); 986 osm_err("%s: Get status timeout.\n", c->name);
998 return -ETIMEDOUT; 987 return -ETIMEDOUT;
999 } 988 }
1000 989
@@ -1043,8 +1032,8 @@ static int i2o_hrt_get(struct i2o_controller *c)
1043 rc = i2o_msg_post_wait_mem(c, m, 20, &c->hrt); 1032 rc = i2o_msg_post_wait_mem(c, m, 20, &c->hrt);
1044 1033
1045 if (rc < 0) { 1034 if (rc < 0) {
1046 printk(KERN_ERR "%s: Unable to get HRT (status=%#x)\n", 1035 osm_err("%s: Unable to get HRT (status=%#x)\n", c->name,
1047 c->name, -rc); 1036 -rc);
1048 return rc; 1037 return rc;
1049 } 1038 }
1050 1039
@@ -1058,8 +1047,8 @@ static int i2o_hrt_get(struct i2o_controller *c)
1058 return i2o_parse_hrt(c); 1047 return i2o_parse_hrt(c);
1059 } 1048 }
1060 1049
1061 printk(KERN_ERR "%s: Unable to get HRT after %d tries, giving up\n", 1050 osm_err("%s: Unable to get HRT after %d tries, giving up\n", c->name,
1062 c->name, I2O_HRT_GET_TRIES); 1051 I2O_HRT_GET_TRIES);
1063 1052
1064 return -EBUSY; 1053 return -EBUSY;
1065} 1054}
@@ -1073,7 +1062,6 @@ void i2o_iop_free(struct i2o_controller *c)
1073 kfree(c); 1062 kfree(c);
1074}; 1063};
1075 1064
1076
1077/** 1065/**
1078 * i2o_iop_release - release the memory for a I2O controller 1066 * i2o_iop_release - release the memory for a I2O controller
1079 * @dev: I2O controller which should be released 1067 * @dev: I2O controller which should be released
@@ -1109,8 +1097,8 @@ struct i2o_controller *i2o_iop_alloc(void)
1109 1097
1110 c = kmalloc(sizeof(*c), GFP_KERNEL); 1098 c = kmalloc(sizeof(*c), GFP_KERNEL);
1111 if (!c) { 1099 if (!c) {
1112 printk(KERN_ERR "i2o: Insufficient memory to allocate a I2O " 1100 osm_err("i2o: Insufficient memory to allocate a I2O controller."
1113 "controller.\n"); 1101 "\n");
1114 return ERR_PTR(-ENOMEM); 1102 return ERR_PTR(-ENOMEM);
1115 } 1103 }
1116 memset(c, 0, sizeof(*c)); 1104 memset(c, 0, sizeof(*c));
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 442e34506b90..9971430e5184 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -179,7 +179,10 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
179 return -ENOMEM; 179 return -ENOMEM;
180 } 180 }
181 181
182 if (i2o_dma_alloc(dev, &c->out_queue, MSG_POOL_SIZE, GFP_KERNEL)) { 182 if (i2o_dma_alloc
183 (dev, &c->out_queue,
184 I2O_MAX_OUTBOUND_MSG_FRAMES * I2O_OUTBOUND_MSG_FRAME_SIZE *
185 sizeof(u32), GFP_KERNEL)) {
183 i2o_pci_free(c); 186 i2o_pci_free(c);
184 return -ENOMEM; 187 return -ENOMEM;
185 } 188 }