master/master.c
changeset 492 9c58efb2c72d
parent 484 9fde4a17b820
child 493 b17c95eac6b2
equal deleted inserted replaced
491:07a7c5951ebc 492:9c58efb2c72d
   127 
   127 
   128     INIT_LIST_HEAD(&master->domains);
   128     INIT_LIST_HEAD(&master->domains);
   129     master->debug_level = 0;
   129     master->debug_level = 0;
   130 
   130 
   131     master->stats.timeouts = 0;
   131     master->stats.timeouts = 0;
       
   132     master->stats.starved = 0;
   132     master->stats.corrupted = 0;
   133     master->stats.corrupted = 0;
   133     master->stats.skipped = 0;
   134     master->stats.skipped = 0;
   134     master->stats.unmatched = 0;
   135     master->stats.unmatched = 0;
   135     master->stats.output_jiffies = 0;
   136     master->stats.output_jiffies = 0;
   136 
   137 
   707 
   708 
   708         if (master->stats.timeouts) {
   709         if (master->stats.timeouts) {
   709             EC_WARN("%i datagram%s TIMED OUT!\n", master->stats.timeouts,
   710             EC_WARN("%i datagram%s TIMED OUT!\n", master->stats.timeouts,
   710                     master->stats.timeouts == 1 ? "" : "s");
   711                     master->stats.timeouts == 1 ? "" : "s");
   711             master->stats.timeouts = 0;
   712             master->stats.timeouts = 0;
       
   713         }
       
   714         if (master->stats.starved) {
       
   715             EC_WARN("%i datagram%s STARVED!\n", master->stats.starved,
       
   716                     master->stats.starved == 1 ? "" : "s");
       
   717             master->stats.starved = 0;
   712         }
   718         }
   713         if (master->stats.corrupted) {
   719         if (master->stats.corrupted) {
   714             EC_WARN("%i frame%s CORRUPTED!\n", master->stats.corrupted,
   720             EC_WARN("%i frame%s CORRUPTED!\n", master->stats.corrupted,
   715                     master->stats.corrupted == 1 ? "" : "s");
   721                     master->stats.corrupted == 1 ? "" : "s");
   716             master->stats.corrupted = 0;
   722             master->stats.corrupted = 0;
  1436             case EC_DATAGRAM_QUEUED:
  1442             case EC_DATAGRAM_QUEUED:
  1437                 if (master->device->cycles_isr
  1443                 if (master->device->cycles_isr
  1438                     - datagram->cycles_queued > cycles_timeout) {
  1444                     - datagram->cycles_queued > cycles_timeout) {
  1439                     list_del_init(&datagram->queue);
  1445                     list_del_init(&datagram->queue);
  1440                     datagram->state = EC_DATAGRAM_TIMED_OUT;
  1446                     datagram->state = EC_DATAGRAM_TIMED_OUT;
  1441                     master->stats.timeouts++;
  1447                     master->stats.starved++;
  1442                     ec_master_output_stats(master);
  1448                     ec_master_output_stats(master);
  1443                 }
  1449                 }
  1444                 break;
  1450                 break;
  1445             case EC_DATAGRAM_SENT:
  1451             case EC_DATAGRAM_SENT:
  1446                 if (master->device->cycles_isr
  1452                 if (master->device->cycles_isr