Commit f33213ec authored by Markus Lidel's avatar Markus Lidel Committed by Linus Torvalds

[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: default avatarMarkus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9e87545f
...@@ -44,8 +44,8 @@ config I2O_EXT_ADAPTEC_DMA64 ...@@ -44,8 +44,8 @@ config I2O_EXT_ADAPTEC_DMA64
config I2O_CONFIG config I2O_CONFIG
tristate "I2O Configuration support" tristate "I2O Configuration support"
depends on PCI && I2O depends on I2O
help ---help---
Say Y for support of the configuration interface for the I2O adapters. Say Y for support of the configuration interface for the I2O adapters.
If you have a RAID controller from Adaptec and you want to use the If you have a RAID controller from Adaptec and you want to use the
raidutils to manage your RAID array, you have to say Y here. raidutils to manage your RAID array, you have to say Y here.
...@@ -74,7 +74,7 @@ config I2O_BUS ...@@ -74,7 +74,7 @@ config I2O_BUS
config I2O_BLOCK config I2O_BLOCK
tristate "I2O Block OSM" tristate "I2O Block OSM"
depends on I2O depends on I2O
help ---help---
Include support for the I2O Block OSM. The Block OSM presents disk Include support for the I2O Block OSM. The Block OSM presents disk
and other structured block devices to the operating system. If you and other structured block devices to the operating system. If you
are using an RAID controller, you could access the array only by are using an RAID controller, you could access the array only by
...@@ -87,7 +87,7 @@ config I2O_BLOCK ...@@ -87,7 +87,7 @@ config I2O_BLOCK
config I2O_SCSI config I2O_SCSI
tristate "I2O SCSI OSM" tristate "I2O SCSI OSM"
depends on I2O && SCSI depends on I2O && SCSI
help ---help---
Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel
I2O controller. You can use both the SCSI and Block OSM together if I2O controller. You can use both the SCSI and Block OSM together if
you wish. To access a RAID array, you must use the Block OSM driver. you wish. To access a RAID array, you must use the Block OSM driver.
...@@ -99,7 +99,7 @@ config I2O_SCSI ...@@ -99,7 +99,7 @@ config I2O_SCSI
config I2O_PROC config I2O_PROC
tristate "I2O /proc support" tristate "I2O /proc support"
depends on I2O depends on I2O
help ---help---
If you say Y here and to "/proc file system support", you will be If you say Y here and to "/proc file system support", you will be
able to read I2O related information from the virtual directory able to read I2O related information from the virtual directory
/proc/i2o. /proc/i2o.
......
...@@ -443,7 +443,6 @@ static struct class_interface i2o_device_class_interface = { ...@@ -443,7 +443,6 @@ static struct class_interface i2o_device_class_interface = {
* Note that the minimum sized reslist is 8 bytes and contains * Note that the minimum sized reslist is 8 bytes and contains
* ResultCount, ErrorInfoSize, BlockStatus and BlockSize. * ResultCount, ErrorInfoSize, BlockStatus and BlockSize.
*/ */
static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist,
int oplen, void *reslist, int reslen) int oplen, void *reslist, int reslen)
{ {
......
...@@ -117,10 +117,9 @@ int i2o_driver_register(struct i2o_driver *drv) ...@@ -117,10 +117,9 @@ int i2o_driver_register(struct i2o_driver *drv)
i2o_driver_notify_controller_add(drv, c); i2o_driver_notify_controller_add(drv, c);
list_for_each_entry(i2o_dev, &c->devices, list) list_for_each_entry(i2o_dev, &c->devices, list)
i2o_driver_notify_device_add(drv, i2o_dev); i2o_driver_notify_device_add(drv, i2o_dev);
} }
rc = driver_register(&drv->driver); rc = driver_register(&drv->driver);
if (rc) if (rc)
destroy_workqueue(drv->event_queue); destroy_workqueue(drv->event_queue);
......
...@@ -152,7 +152,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long ...@@ -152,7 +152,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long
list_add(&wait->list, &i2o_exec_wait_list); list_add(&wait->list, &i2o_exec_wait_list);
wait_event_interruptible_timeout(wq, wait->complete, wait_event_interruptible_timeout(wq, wait->complete,
timeout * HZ); timeout * HZ);
wait->wq = NULL; wait->wq = NULL;
} }
......
...@@ -940,7 +940,6 @@ static void i2o_block_request_fn(struct request_queue *q) ...@@ -940,7 +940,6 @@ static void i2o_block_request_fn(struct request_queue *q)
INIT_WORK(&dreq->work, i2o_block_delayed_request_fn, INIT_WORK(&dreq->work, i2o_block_delayed_request_fn,
dreq); dreq);
osm_info("transfer error\n");
if (!queue_delayed_work(i2o_block_driver.event_queue, if (!queue_delayed_work(i2o_block_driver.event_queue,
&dreq->work, &dreq->work,
I2O_BLOCK_RETRY_TIME)) I2O_BLOCK_RETRY_TIME))
...@@ -1042,8 +1041,8 @@ static struct i2o_block_device *i2o_block_device_alloc(void) ...@@ -1042,8 +1041,8 @@ static struct i2o_block_device *i2o_block_device_alloc(void)
static int i2o_block_probe(struct device *dev) static int i2o_block_probe(struct device *dev)
{ {
struct i2o_device *i2o_dev = to_i2o_device(dev); struct i2o_device *i2o_dev = to_i2o_device(dev);
struct i2o_block_device *i2o_blk_dev;
struct i2o_controller *c = i2o_dev->iop; struct i2o_controller *c = i2o_dev->iop;
struct i2o_block_device *i2o_blk_dev;
struct gendisk *gd; struct gendisk *gd;
struct request_queue *queue; struct request_queue *queue;
static int unit = 0; static int unit = 0;
......
...@@ -64,40 +64,38 @@ ...@@ -64,40 +64,38 @@
/* I2O Block OSM mempool struct */ /* I2O Block OSM mempool struct */
struct i2o_block_mempool { struct i2o_block_mempool {
kmem_cache_t *slab; kmem_cache_t *slab;
mempool_t *pool; mempool_t *pool;
}; };
/* I2O Block device descriptor */ /* I2O Block device descriptor */
struct i2o_block_device { struct i2o_block_device {
struct i2o_device *i2o_dev; /* pointer to I2O device */ struct i2o_device *i2o_dev; /* pointer to I2O device */
struct gendisk *gd; struct gendisk *gd;
spinlock_t lock; /* queue lock */ spinlock_t lock; /* queue lock */
struct list_head open_queue; /* list of transfered, but unfinished struct list_head open_queue; /* list of transfered, but unfinished
requests */ requests */
unsigned int open_queue_depth; /* number of requests in the queue */ unsigned int open_queue_depth; /* number of requests in the queue */
int rcache; /* read cache flags */ int rcache; /* read cache flags */
int wcache; /* write cache flags */ int wcache; /* write cache flags */
int flags; int flags;
u16 power; /* power state */ u16 power; /* power state */
int media_change_flag; /* media changed flag */ int media_change_flag; /* media changed flag */
}; };
/* I2O Block device request */ /* I2O Block device request */
struct i2o_block_request struct i2o_block_request {
{
struct list_head queue; struct list_head queue;
struct request *req; /* corresponding request */ struct request *req; /* corresponding request */
struct i2o_block_device *i2o_blk_dev; /* I2O block device */ struct i2o_block_device *i2o_blk_dev; /* I2O block device */
struct device *dev; /* device used for DMA */ struct device *dev; /* device used for DMA */
int sg_nents; /* number of SG elements */ int sg_nents; /* number of SG elements */
struct scatterlist sg_table[I2O_MAX_PHYS_SEGMENTS]; /* SG table */ struct scatterlist sg_table[I2O_MAX_PHYS_SEGMENTS]; /* SG table */
}; };
/* I2O Block device delayed request */ /* I2O Block device delayed request */
struct i2o_block_delayed_request struct i2o_block_delayed_request {
{
struct work_struct work; struct work_struct work;
struct request_queue *queue; struct request_queue *queue;
}; };
......
...@@ -368,9 +368,9 @@ static int i2o_cfg_swul(unsigned long arg) ...@@ -368,9 +368,9 @@ static int i2o_cfg_swul(unsigned long arg)
i2o_dma_free(&c->pdev->dev, &buffer); i2o_dma_free(&c->pdev->dev, &buffer);
return_ret: return_ret:
return ret; return ret;
return_fault: return_fault:
ret = -EFAULT; ret = -EFAULT;
goto return_ret; goto return_ret;
}; };
...@@ -519,7 +519,8 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp) ...@@ -519,7 +519,8 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp)
#ifdef CONFIG_I2O_EXT_ADAPTEC #ifdef CONFIG_I2O_EXT_ADAPTEC
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long arg) static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
unsigned long arg)
{ {
struct i2o_cmd_passthru32 __user *cmd; struct i2o_cmd_passthru32 __user *cmd;
struct i2o_controller *c; struct i2o_controller *c;
...@@ -646,8 +647,9 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar ...@@ -646,8 +647,9 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) { flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
// TODO 64bit fix // TODO 64bit fix
if (copy_from_user if (copy_from_user
(p->virt, (void __user *)(unsigned long)sg[i].addr_bus, (p->virt,
sg_size)) { (void __user *)(unsigned long)sg[i].
addr_bus, sg_size)) {
printk(KERN_DEBUG printk(KERN_DEBUG
"%s: Could not copy SG buf %d FROM user\n", "%s: Could not copy SG buf %d FROM user\n",
c->name, i); c->name, i);
...@@ -738,11 +740,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar ...@@ -738,11 +740,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
return rcode; return rcode;
} }
static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
unsigned long arg)
{ {
int ret; int ret;
lock_kernel(); lock_kernel();
switch (cmd) { switch (cmd) {
case I2OGETIOPS: case I2OGETIOPS:
ret = i2o_cfg_ioctl(NULL, file, cmd, arg); ret = i2o_cfg_ioctl(NULL, file, cmd, arg);
break; break;
...@@ -1136,6 +1139,7 @@ static int __init i2o_config_old_init(void) ...@@ -1136,6 +1139,7 @@ static int __init i2o_config_old_init(void)
osm_err("can't register device.\n"); osm_err("can't register device.\n");
return -EBUSY; return -EBUSY;
} }
return 0; return 0;
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
*/ */
#define OSM_NAME "proc-osm" #define OSM_NAME "proc-osm"
#define OSM_VERSION "$Rev$" #define OSM_VERSION "1.145"
#define OSM_DESCRIPTION "I2O ProcFS OSM" #define OSM_DESCRIPTION "I2O ProcFS OSM"
#define I2O_MAX_MODULES 4 #define I2O_MAX_MODULES 4
......
This diff is collapsed.
...@@ -179,7 +179,10 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c) ...@@ -179,7 +179,10 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
return -ENOMEM; return -ENOMEM;
} }
if (i2o_dma_alloc(dev, &c->out_queue, MSG_POOL_SIZE, GFP_KERNEL)) { if (i2o_dma_alloc
(dev, &c->out_queue,
I2O_MAX_OUTBOUND_MSG_FRAMES * I2O_OUTBOUND_MSG_FRAME_SIZE *
sizeof(u32), GFP_KERNEL)) {
i2o_pci_free(c); i2o_pci_free(c);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -156,8 +156,8 @@ struct i2o_controller { ...@@ -156,8 +156,8 @@ struct i2o_controller {
struct pci_dev *pdev; /* PCI device */ struct pci_dev *pdev; /* PCI device */
unsigned int promise:1; /* Promise controller */ unsigned int promise:1; /* Promise controller */
unsigned int adaptec:1; /* DPT / Adaptec controller */ unsigned int adaptec:1; /* DPT / Adaptec controller */
unsigned int raptor:1; /* split bar */ unsigned int raptor:1; /* split bar */
unsigned int no_quiesce:1; /* dont quiesce before reset */ unsigned int no_quiesce:1; /* dont quiesce before reset */
unsigned int short_req:1; /* use small block sizes */ unsigned int short_req:1; /* use small block sizes */
...@@ -174,7 +174,7 @@ struct i2o_controller { ...@@ -174,7 +174,7 @@ struct i2o_controller {
/* Dynamic LCT related data */ /* Dynamic LCT related data */
struct i2o_dma status; /* status of IOP */ struct i2o_dma status; /* IOP status block */
struct i2o_dma hrt; /* HW Resource Table */ struct i2o_dma hrt; /* HW Resource Table */
i2o_lct *lct; /* Logical Config Table */ i2o_lct *lct; /* Logical Config Table */
...@@ -186,7 +186,7 @@ struct i2o_controller { ...@@ -186,7 +186,7 @@ struct i2o_controller {
struct i2o_io in_queue; /* inbound message queue Host->IOP */ struct i2o_io in_queue; /* inbound message queue Host->IOP */
struct i2o_dma out_queue; /* outbound message queue IOP->Host */ struct i2o_dma out_queue; /* outbound message queue IOP->Host */
unsigned int battery:1; /* Has a battery backup */ unsigned int battery:1; /* Has a battery backup */
unsigned int io_alloc:1; /* An I/O resource was allocated */ unsigned int io_alloc:1; /* An I/O resource was allocated */
unsigned int mem_alloc:1; /* A memory resource was allocated */ unsigned int mem_alloc:1; /* A memory resource was allocated */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment