Skip to content
Snippets Groups Projects
Commit d52e28a8 authored by Florian Pose's avatar Florian Pose
Browse files

Improved phy debugging.

parent 20397496
No related branches found
No related tags found
No related merge requests found
...@@ -339,9 +339,7 @@ int ec_fsm_master_action_process_phy( ...@@ -339,9 +339,7 @@ int ec_fsm_master_action_process_phy(
ec_phy_request_t *request; ec_phy_request_t *request;
// search the first request to be processed // search the first request to be processed
while (1) { while (!list_empty(&master->phy_requests)) {
if (list_empty(&master->phy_requests))
break;
// get first request // get first request
request = list_entry(master->phy_requests.next, request = list_entry(master->phy_requests.next,
...@@ -351,8 +349,10 @@ int ec_fsm_master_action_process_phy( ...@@ -351,8 +349,10 @@ int ec_fsm_master_action_process_phy(
// found pending request; process it! // found pending request; process it!
if (master->debug_level) if (master->debug_level)
EC_DBG("Processing phy request for slave %u...\n", EC_DBG("Processing phy request for slave %u, "
request->slave->ring_position); "offset 0x%04x, length %u...\n",
request->slave->ring_position,
request->offset, request->length);
fsm->phy_request = request; fsm->phy_request = request;
if (request->dir == EC_DIR_INPUT) { if (request->dir == EC_DIR_INPUT) {
...@@ -361,8 +361,9 @@ int ec_fsm_master_action_process_phy( ...@@ -361,8 +361,9 @@ int ec_fsm_master_action_process_phy(
ec_datagram_zero(fsm->datagram); ec_datagram_zero(fsm->datagram);
} else { } else {
if (request->length > fsm->datagram->mem_size) { if (request->length > fsm->datagram->mem_size) {
EC_ERR("Request length (%u) exceeds maximum datagram size (%u)!\n", EC_ERR("Request length (%u) exceeds maximum "
request->length, fsm->datagram->mem_size); "datagram size (%u)!\n", request->length,
fsm->datagram->mem_size);
request->state = EC_INT_REQUEST_FAILURE; request->state = EC_INT_REQUEST_FAILURE;
wake_up(&master->phy_queue); wake_up(&master->phy_queue);
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment