patch-2.3.24 linux/drivers/i2o/i2o_block.c

Next file: linux/drivers/i2o/i2o_config.c
Previous file: linux/drivers/char/serial.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/drivers/i2o/i2o_block.c linux/drivers/i2o/i2o_block.c
@@ -703,7 +703,7 @@
 		msg[2] = i2ob_context|0x80000000;
 		msg[3] = (u32)query_done;
 		msg[4] = 60<<16;
-		i2o_post_wait(dev->controller, dev->tid, msg, 20, query_done,2);
+		i2o_post_wait(dev->controller, msg, 20, 2);
 		/*
 		 *	Unlock the media
 		 */
@@ -712,7 +712,7 @@
 		msg[2] = i2ob_context|0x80000000;
 		msg[3] = (u32)query_done;
 		msg[4] = -1;
-		i2o_post_wait(dev->controller, dev->tid, msg, 20, query_done,2);
+		i2o_post_wait(dev->controller, msg, 20, 2);
 	
 		/*
  		 * Now unclaim the device.
@@ -766,7 +766,7 @@
 		msg[3] = (u32)query_done;
 		msg[4] = -1;
 		msg[5] = 0;
-		i2o_post_wait(dev->controller, dev->tid, msg, 24, query_done,2);
+		i2o_post_wait(dev->controller, msg, 24, 2);
 		/*
 		 *	Lock the media
 		 */
@@ -775,7 +775,7 @@
 		msg[2] = i2ob_context|0x80000000;
 		msg[3] = (u32)query_done;
 		msg[4] = -1;
-		i2o_post_wait(dev->controller, dev->tid, msg, 20, query_done,2);
+		i2o_post_wait(dev->controller, msg, 20, 2);
 	}		
 	MOD_INC_USE_COUNT;
 	return 0;
@@ -788,8 +788,8 @@
 static int i2ob_query_device(struct i2ob_device *dev, int table, 
 	int field, void *buf, int buflen)
 {
-	return i2o_query_scalar(dev->controller, dev->tid, i2ob_context,
-		table, field, buf, buflen, &dev->done_flag);
+	return i2o_query_scalar(dev->controller, dev->tid,
+		table, field, buf, buflen);
 }
 
 
@@ -891,7 +891,10 @@
 
 		for(d=c->devices;d!=NULL;d=d->next)
 		{
-			if(d->class!=I2O_CLASS_RANDOM_BLOCK_STORAGE)
+			if(d->lct_data->class_id!=I2O_CLASS_RANDOM_BLOCK_STORAGE)
+				continue;
+
+			if(d->lct_data->user_tid != 0xFFF)
 				continue;
 
 			if(unit<MAX_I2OB<<4)
@@ -903,7 +906,7 @@
 				struct i2ob_device *dev=&i2ob_dev[unit];
 				dev->i2odev = d; 
 				dev->controller = c;
-				dev->tid = d->id;
+				dev->tid = d->lct_data->tid;
  
 				/*
 				 * Insure the device can be claimed
@@ -930,9 +933,10 @@
 			else
 			{
 				if(!warned++)
-					printk("i2o_block: too many controllers, registering only %d.\n", unit>>4);
+					printk("i2o_block: too many device, registering only %d.\n", unit>>4);
 			}
 		}
+		i2o_unlock_controller(c);
 	}
 	i2ob_devices = unit;
 }
@@ -981,7 +985,7 @@
 			msg[2] = i2ob_context|0x80000000;
 			msg[3] = (u32)query_done;
 			msg[4] = 60<<16;
-			i2o_post_wait(dev->controller, dev->tid, msg, 20, query_done,2);
+			i2o_post_wait(dev->controller, msg, 20, 2);
 			/*
 			 *	Unlock the media
 			 */
@@ -990,7 +994,7 @@
 			msg[2] = i2ob_context|0x80000000;
 			msg[3] = (u32)query_done;
 			msg[4] = -1;
-			i2o_post_wait(dev->controller, dev->tid, msg, 20, query_done,2);
+			i2o_post_wait(dev->controller, msg, 20, 2);
 		}
 	}	
 	return NOTIFY_DONE;
@@ -1058,7 +1062,7 @@
 {
 	int i;
 
-	printk(KERN_INFO "I2O block device OSM v0.07. (C) 1999 Red Hat Software.\n");
+	printk(KERN_INFO "I2O Block Storage OSM v0.07. (C) 1999 Red Hat Software.\n");
 	
 	/*
 	 *	Register the block device interfaces

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)