Fixed FoE request states.
authorFlorian Pose <fp@igh-essen.com>
Fri, 30 Jan 2009 10:56:06 +0000
changeset 1349 9baba3568df4
parent 1348 8db0f72ace11
child 1350 cd278db5a872
Fixed FoE request states.
master/cdev.c
master/foe_request.h
master/fsm_master.c
--- a/master/cdev.c	Fri Jan 30 10:50:21 2009 +0000
+++ b/master/cdev.c	Fri Jan 30 10:56:06 2009 +0000
@@ -2454,7 +2454,7 @@
     }
 
     // wait until master FSM has finished processing
-    wait_event(master->foe_queue, request.req.state != EC_REQUEST_BUSY);
+    wait_event(master->foe_queue, request.req.state != EC_INT_REQUEST_BUSY);
 
     data.result = request.req.result;
     data.error_code = request.req.error_code;
@@ -2464,7 +2464,7 @@
 				request.req.data_size, request.req.result);
 	}
 
-    if (request.req.state != EC_REQUEST_SUCCESS) {
+    if (request.req.state != EC_INT_REQUEST_SUCCESS) {
         data.data_size = 0;
         retval = -EIO;
     } else {
@@ -2564,12 +2564,12 @@
     }
 
     // wait until master FSM has finished processing
-    wait_event(master->foe_queue, request.req.state != EC_REQUEST_BUSY);
+    wait_event(master->foe_queue, request.req.state != EC_INT_REQUEST_BUSY);
 
     data.result = request.req.result;
     data.error_code = request.req.error_code;
 
-    retval = request.req.state == EC_REQUEST_SUCCESS ? 0 : -EIO;
+    retval = request.req.state == EC_INT_REQUEST_SUCCESS ? 0 : -EIO;
 
     if (__copy_to_user((void __user *) arg, &data, sizeof(data))) {
         retval = -EFAULT;
--- a/master/foe_request.h	Fri Jan 30 10:50:21 2009 +0000
+++ b/master/foe_request.h	Fri Jan 30 10:56:06 2009 +0000
@@ -63,7 +63,7 @@
     ec_direction_t dir; /**< Direction. EC_DIR_OUTPUT means downloading to
                           the slave, EC_DIR_INPUT means uploading from the
                           slave. */
-    ec_request_state_t state; /**< FoE request state. */
+    ec_internal_request_state_t state; /**< FoE request state. */
     unsigned long jiffies_start; /**< Jiffies, when the request was issued. */
     unsigned long jiffies_sent; /**< Jiffies, when the upload/download
                                      request was sent. */
--- a/master/fsm_master.c	Fri Jan 30 10:50:21 2009 +0000
+++ b/master/fsm_master.c	Fri Jan 30 10:56:06 2009 +0000
@@ -490,7 +490,7 @@
         request = list_entry(master->foe_requests.next,
                 ec_master_foe_request_t, list);
         list_del_init(&request->list); // dequeue
-        request->req.state = EC_REQUEST_BUSY;
+        request->req.state = EC_INT_REQUEST_BUSY;
         slave = request->slave;
 
         if (master->debug_level)