Test Patch: Further I2O cleanups
Mix of some stuff I was sitting on pending Markus work and some other newer stuff. This kills all but one virt_to_bus/bus_to_virt use, fixes some writes to PCI ioremap space not done via writel, removes a chunk of code that we can make the scsi layer do for us. It also has some further hackery to try and get promise hw to work properly.
drivers/message/i2o/i2o_block.c +3 -4
@@ -422,8 +422,6 @@ static inline void i2ob_unhook_request(sstatic inline void i2ob_end_request (struct request *req) { -/* FIXME - pci unmap the request */ -/* * Loop until all of the buffers that are linked * to this request have been marked updated and
@@ -1134,7 +1132,8 @@ static int i2ob_install_device(struct i2 dev->flags = flags;/* Keep the type info */ blk_queue_max_sectors (q,96 );/* 256 might be nicer but many controllers -explode on 65536 or higher */ +explode on 65536 bytes or higher +as they don't know how to map them to scsi */ blk_queue_max_phys_segments (q, segments);blk_queue_max_hw_segments (q, segments);
@@ -1268,7 +1267,7 @@ static void i2ob_scan(int bios)continue ;/* -* The device list connected to the I2O Controller is doubly linked +* The device list connected to the I2O Controller is doubly linked * Here we traverse the end of the list , and start claiming devices * from that end. This assures that within an I2O controller atleast * the newly created volumes get claimed after the older ones, thus
drivers/message/i2o/i2o_config.c +5 -5
@@ -802,7 +802,7 @@ static int ioctl_evt_reg(unsigned long a msg[0 ] =FOUR_WORD_MSG_SIZE |SGL_OFFSET_0 ; msg[1 ] =I2O_CMD_UTIL_EVT_REGISTER <<24 |HOST_TID <<12 | kdesc.tid; msg[2 ] = (u32 )i2o_cfg_context; - msg[3 ] = (u32 )fp->private_data; + msg[3 ] = (u32 )(unsigned long )fp->private_data; msg[4 ] = kdesc.evt_mask;i2o_post_this (iop, msg,20 );
@@ -812,7 +812,7 @@ static int ioctl_evt_reg(unsigned long astatic int ioctl_evt_get (unsigned long arg,struct file *fp) { -u32 id = (u32 )fp->private_data; +u32 id = (u32 )(unsigned long )fp->private_data;struct i2o_cfg_info *p =NULL ;struct i2o_evt_get __user *uget = (void __user *)arg;struct i2o_evt_get kget;
@@ -1016,7 +1016,7 @@ static int cfg_open(struct inode *inode, file->private_data = (void *)(i2o_cfg_info_id++); tmp->fp = file; tmp->fasync =NULL ; - tmp->q_id = (u32 )file->private_data; + tmp->q_id = (u32 )(unsigned long )file->private_data; tmp->q_len =0 ; tmp->q_in =0 ; tmp->q_out =0 ;
@@ -1032,7 +1032,7 @@ static int cfg_open(struct inode *inode,static int cfg_release (struct inode *inode,struct file *file) { -u32 id = (u32 )file->private_data; +u32 id = (u32 )(unsigned long )file->private_data;struct i2o_cfg_info *p1, *p2;unsigned long flags;
@@ -1066,7 +1066,7 @@ static int cfg_release(struct inode *inostatic int cfg_fasync (int fd,struct file *fp,int on) { -u32 id = (u32 )fp->private_data; +u32 id = (u32 )(unsigned long )fp->private_data;struct i2o_cfg_info *p;for (p = open_files; p; p = p->next)
drivers/message/i2o/i2o_core.c +190 -63
411 lines not on this page · raw message
drivers/message/i2o/i2o_scsi.c +34 -101
220 lines not on this page · raw message
include/linux/i2o.h +4 -1
@@ -341,6 +341,9 @@ extern int i2o_activate_controller(strucextern void i2o_run_queue (struct i2o_controller *);extern int i2o_delete_controller (struct i2o_controller *); +extern void *i2o_send_to_virt (struct i2o_controller *,u32 ); +extern void *i2o_receive_to_virt (struct i2o_controller *,u32 ); +#if BITS_PER_LONG ==64 extern u32 i2o_context_list_add (void *,struct i2o_controller *);extern void *i2o_context_list_get (u32 ,struct i2o_controller *);
@@ -679,7 +682,7 @@ static inline u32 i2o_context_list_remov#define ADAPTER_TID 0#define HOST_TID 1 -#define MSG_FRAME_SIZE 64/* i2o_scsi assumes >= 32 */ +#define MSG_FRAME_SIZE 32/* (dwords) i2o_scsi assumes >= 32 */ #define REPLY_FRAME_SIZE 17#define SG_TABLESIZE 30#define NMBR_MSG_FRAMES 128