aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/message/i2o
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r--drivers/message/i2o/i2o_block.c8
-rw-r--r--drivers/message/i2o/i2o_config.c14
-rw-r--r--drivers/message/i2o/i2o_proc.c12
-rw-r--r--drivers/message/i2o/iop.c7
-rw-r--r--drivers/message/i2o/pci.c1
5 files changed, 20 insertions, 22 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index d505b68cd372..fc593fbab696 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -51,6 +51,7 @@
51 */ 51 */
52 52
53#include <linux/module.h> 53#include <linux/module.h>
54#include <linux/slab.h>
54#include <linux/i2o.h> 55#include <linux/i2o.h>
55 56
56#include <linux/mempool.h> 57#include <linux/mempool.h>
@@ -940,7 +941,7 @@ static const struct block_device_operations i2o_block_fops = {
940 * Allocate memory for the i2o_block_device struct, gendisk and request 941 * Allocate memory for the i2o_block_device struct, gendisk and request
941 * queue and initialize them as far as no additional information is needed. 942 * queue and initialize them as far as no additional information is needed.
942 * 943 *
943 * Returns a pointer to the allocated I2O Block device on succes or a 944 * Returns a pointer to the allocated I2O Block device on success or a
944 * negative error code on failure. 945 * negative error code on failure.
945 */ 946 */
946static struct i2o_block_device *i2o_block_device_alloc(void) 947static struct i2o_block_device *i2o_block_device_alloc(void)
@@ -1065,9 +1066,8 @@ static int i2o_block_probe(struct device *dev)
1065 queue = gd->queue; 1066 queue = gd->queue;
1066 queue->queuedata = i2o_blk_dev; 1067 queue->queuedata = i2o_blk_dev;
1067 1068
1068 blk_queue_max_phys_segments(queue, I2O_MAX_PHYS_SEGMENTS); 1069 blk_queue_max_hw_sectors(queue, max_sectors);
1069 blk_queue_max_sectors(queue, max_sectors); 1070 blk_queue_max_segments(queue, i2o_sg_tablesize(c, body_size));
1070 blk_queue_max_hw_segments(queue, i2o_sg_tablesize(c, body_size));
1071 1071
1072 osm_debug("max sectors = %d\n", queue->max_sectors); 1072 osm_debug("max sectors = %d\n", queue->max_sectors);
1073 osm_debug("phys segments = %d\n", queue->max_phys_segments); 1073 osm_debug("phys segments = %d\n", queue->max_phys_segments);
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index efba7021948a..11073fa3d9f4 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -33,6 +33,7 @@
33#include <linux/miscdevice.h> 33#include <linux/miscdevice.h>
34#include <linux/smp_lock.h> 34#include <linux/smp_lock.h>
35#include <linux/compat.h> 35#include <linux/compat.h>
36#include <linux/slab.h>
36 37
37#include <asm/uaccess.h> 38#include <asm/uaccess.h>
38 39
@@ -40,8 +41,7 @@
40 41
41#define SG_TABLESIZE 30 42#define SG_TABLESIZE 30
42 43
43static int i2o_cfg_ioctl(struct inode *, struct file *, unsigned int, 44static long i2o_cfg_ioctl(struct file *, unsigned int, unsigned long);
44 unsigned long);
45 45
46static spinlock_t i2o_config_lock; 46static spinlock_t i2o_config_lock;
47 47
@@ -751,7 +751,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
751 lock_kernel(); 751 lock_kernel();
752 switch (cmd) { 752 switch (cmd) {
753 case I2OGETIOPS: 753 case I2OGETIOPS:
754 ret = i2o_cfg_ioctl(NULL, file, cmd, arg); 754 ret = i2o_cfg_ioctl(file, cmd, arg);
755 break; 755 break;
756 case I2OPASSTHRU32: 756 case I2OPASSTHRU32:
757 ret = i2o_cfg_passthru32(file, cmd, arg); 757 ret = i2o_cfg_passthru32(file, cmd, arg);
@@ -984,11 +984,11 @@ out:
984/* 984/*
985 * IOCTL Handler 985 * IOCTL Handler
986 */ 986 */
987static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, 987static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
988 unsigned long arg)
989{ 988{
990 int ret; 989 int ret;
991 990
991 lock_kernel();
992 switch (cmd) { 992 switch (cmd) {
993 case I2OGETIOPS: 993 case I2OGETIOPS:
994 ret = i2o_cfg_getiops(arg); 994 ret = i2o_cfg_getiops(arg);
@@ -1044,7 +1044,7 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,
1044 osm_debug("unknown ioctl called!\n"); 1044 osm_debug("unknown ioctl called!\n");
1045 ret = -EINVAL; 1045 ret = -EINVAL;
1046 } 1046 }
1047 1047 unlock_kernel();
1048 return ret; 1048 return ret;
1049} 1049}
1050 1050
@@ -1118,7 +1118,7 @@ static int cfg_release(struct inode *inode, struct file *file)
1118static const struct file_operations config_fops = { 1118static const struct file_operations config_fops = {
1119 .owner = THIS_MODULE, 1119 .owner = THIS_MODULE,
1120 .llseek = no_llseek, 1120 .llseek = no_llseek,
1121 .ioctl = i2o_cfg_ioctl, 1121 .unlocked_ioctl = i2o_cfg_ioctl,
1122#ifdef CONFIG_COMPAT 1122#ifdef CONFIG_COMPAT
1123 .compat_ioctl = i2o_cfg_compat_ioctl, 1123 .compat_ioctl = i2o_cfg_compat_ioctl,
1124#endif 1124#endif
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 7045c45da9b1..07dbeaf9df99 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -40,6 +40,7 @@
40#include <linux/kernel.h> 40#include <linux/kernel.h>
41#include <linux/pci.h> 41#include <linux/pci.h>
42#include <linux/i2o.h> 42#include <linux/i2o.h>
43#include <linux/slab.h>
43#include <linux/proc_fs.h> 44#include <linux/proc_fs.h>
44#include <linux/seq_file.h> 45#include <linux/seq_file.h>
45#include <linux/init.h> 46#include <linux/init.h>
@@ -111,10 +112,7 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
111 break; 112 break;
112 113
113 case I2O_SNFORMAT_LAN48_MAC: /* LAN-48 MAC Address */ 114 case I2O_SNFORMAT_LAN48_MAC: /* LAN-48 MAC Address */
114 seq_printf(seq, 115 seq_printf(seq, "LAN-48 MAC address @ %pM", &serialno[2]);
115 "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X",
116 serialno[2], serialno[3],
117 serialno[4], serialno[5], serialno[6], serialno[7]);
118 break; 116 break;
119 117
120 case I2O_SNFORMAT_WAN: /* WAN MAC Address */ 118 case I2O_SNFORMAT_WAN: /* WAN MAC Address */
@@ -126,10 +124,8 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
126 case I2O_SNFORMAT_LAN64_MAC: /* LAN-64 MAC Address */ 124 case I2O_SNFORMAT_LAN64_MAC: /* LAN-64 MAC Address */
127 /* FIXME: Figure out what a LAN-64 address really looks like?? */ 125 /* FIXME: Figure out what a LAN-64 address really looks like?? */
128 seq_printf(seq, 126 seq_printf(seq,
129 "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X", 127 "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
130 serialno[8], serialno[9], 128 serialno[8], serialno[9], &serialno[2]);
131 serialno[2], serialno[3],
132 serialno[4], serialno[5], serialno[6], serialno[7]);
133 break; 129 break;
134 130
135 case I2O_SNFORMAT_DDM: /* I2O DDM */ 131 case I2O_SNFORMAT_DDM: /* I2O DDM */
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
index 27cf4af0e13d..090d2a3a6548 100644
--- a/drivers/message/i2o/iop.c
+++ b/drivers/message/i2o/iop.c
@@ -29,6 +29,7 @@
29#include <linux/i2o.h> 29#include <linux/i2o.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/sched.h> 31#include <linux/sched.h>
32#include <linux/slab.h>
32#include "core.h" 33#include "core.h"
33 34
34#define OSM_NAME "i2o" 35#define OSM_NAME "i2o"
@@ -132,7 +133,7 @@ u32 i2o_cntxt_list_add(struct i2o_controller * c, void *ptr)
132 * Removes a previously added pointer from the context list and returns 133 * Removes a previously added pointer from the context list and returns
133 * the matching context id. 134 * the matching context id.
134 * 135 *
135 * Returns context id on succes or 0 on failure. 136 * Returns context id on success or 0 on failure.
136 */ 137 */
137u32 i2o_cntxt_list_remove(struct i2o_controller * c, void *ptr) 138u32 i2o_cntxt_list_remove(struct i2o_controller * c, void *ptr)
138{ 139{
@@ -198,7 +199,7 @@ void *i2o_cntxt_list_get(struct i2o_controller *c, u32 context)
198 * @c: controller to which the context list belong 199 * @c: controller to which the context list belong
199 * @ptr: pointer to which the context id should be fetched 200 * @ptr: pointer to which the context id should be fetched
200 * 201 *
201 * Returns context id which matches to the pointer on succes or 0 on 202 * Returns context id which matches to the pointer on success or 0 on
202 * failure. 203 * failure.
203 */ 204 */
204u32 i2o_cntxt_list_get_ptr(struct i2o_controller * c, void *ptr) 205u32 i2o_cntxt_list_get_ptr(struct i2o_controller * c, void *ptr)
@@ -539,7 +540,7 @@ static int i2o_iop_reset(struct i2o_controller *c)
539 * which is indeterminate. We need to wait until the IOP has 540 * which is indeterminate. We need to wait until the IOP has
540 * rebooted before we can let the system talk to it. We read 541 * rebooted before we can let the system talk to it. We read
541 * the inbound Free_List until a message is available. If we 542 * the inbound Free_List until a message is available. If we
542 * can't read one in the given ammount of time, we assume the 543 * can't read one in the given amount of time, we assume the
543 * IOP could not reboot properly. 544 * IOP could not reboot properly.
544 */ 545 */
545 osm_debug("%s: Reset in progress, waiting for reboot...\n", 546 osm_debug("%s: Reset in progress, waiting for reboot...\n",
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 35ba2ae38b42..73e4658af53c 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/interrupt.h> 31#include <linux/interrupt.h>
32#include <linux/slab.h>
32#include <linux/i2o.h> 33#include <linux/i2o.h>
33#include "core.h" 34#include "core.h"
34 35