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

Next file: linux/drivers/i2o/i2o_core.c
Previous file: linux/drivers/i2o/i2o_block.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/drivers/i2o/i2o_config.c linux/drivers/i2o/i2o_config.c
@@ -317,14 +317,14 @@
 		return -ENOMEM;
 	}
 
-        len = i2o_issue_params(i2o_cmd, c, kcmd.tid, cfg_handler.context,
-        			ops, kcmd.oplen, res, 65536, &i2o_cfg_token);
+        len = i2o_issue_params(i2o_cmd, c, kcmd.tid,
+        			ops, kcmd.oplen, res, 65536);
         i2o_unlock_controller(c);
 	kfree(ops);
         
-	if (len < 0) {
+	if (len) {
 		kfree(res);
-		return len; /* -DetailedStatus */
+		return len; /* -DetailedStatus || -ETIMEDOUT */
 	}
 
 	put_user(len, kcmd.reslen);
@@ -413,8 +413,8 @@
 		msg[8] = virt_to_phys(query);
 	}
 
-	token = i2o_post_wait(c, cmd->tid, msg, 9*4, &i2o_cfg_token, 10);
-	if(token != I2O_POST_WAIT_OK)
+	token = i2o_post_wait(c, msg, 9*4, 10);
+	if(token)
 	{
 		i2o_unlock_controller(c);
 		kfree(res);
@@ -531,8 +531,8 @@
 		// Yes...that's one minute, but the spec states that
 		// transfers take a long time, and I've seen just how
 		// long they can take.
-		token = i2o_post_wait(c, ADAPTER_TID, msg, sizeof(msg), &i2o_cfg_token,60);
-		if (token != I2O_POST_WAIT_OK )	// Something very wrong
+		token = i2o_post_wait(c, msg, sizeof(msg), 60);
+		if (token)	// Something very wrong
 		{
 			i2o_unlock_controller(c);
 			printk("Timeout downloading software");
@@ -547,8 +547,8 @@
 	msg[4] |= (u32)maxfrag;
 	msg[7] = (0xD0000000 | diff);
 	__copy_from_user(buffer, kxfer.buf, 8192);
-	token = i2o_post_wait(c, ADAPTER_TID, msg, sizeof(msg), &i2o_cfg_token,60);
-	if( token != I2O_POST_WAIT_OK )	// Something very wrong
+	token = i2o_post_wait(c, msg, sizeof(msg), 60);
+	if(token)	// Something very wrong
 	{
 		i2o_unlock_controller(c);
 		printk("Timeout downloading software");
@@ -588,10 +588,10 @@
         msg[2] = (u32)i2o_cfg_context;
         msg[3] = 0;
 
-        token = i2o_post_wait(c, ADAPTER_TID, msg, sizeof(msg),&i2o_cfg_token, 10);
+        token = i2o_post_wait(c, msg, sizeof(msg), 10);
         i2o_unlock_controller(c);
 
-        if (token != I2O_POST_WAIT_OK)
+        if (token)
         {
                 printk("Can't validate configuration, ErrorStatus = %d\n",
                 	token);

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