master/fsm_coe.c
changeset 461 b9eda9235173
parent 459 f0da52cf6b5b
child 476 fd7c0ee645f8
equal deleted inserted replaced
460:719ba8ccc509 461:b9eda9235173
   393     sdo_count = (rec_size - 8) / 2;
   393     sdo_count = (rec_size - 8) / 2;
   394 
   394 
   395     for (i = 0; i < sdo_count; i++) {
   395     for (i = 0; i < sdo_count; i++) {
   396         sdo_index = EC_READ_U16(data + 8 + i * 2);
   396         sdo_index = EC_READ_U16(data + 8 + i * 2);
   397         if (!sdo_index) {
   397         if (!sdo_index) {
   398             EC_WARN("SDO dictionary of slave %i contains index 0x0000.\n",
   398             if (slave->master->debug_level)
   399                     slave->ring_position);
   399                 EC_WARN("SDO dictionary of slave %i contains index 0x0000.\n",
       
   400                         slave->ring_position);
   400             continue;
   401             continue;
   401         }
   402         }
   402 
   403 
   403         if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_ATOMIC))) {
   404         if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_ATOMIC))) {
   404             EC_ERR("Failed to allocate memory for SDO!\n");
   405             EC_ERR("Failed to allocate memory for SDO!\n");
  1189 
  1190 
  1190     data_size = rec_size - 10;
  1191     data_size = rec_size - 10;
  1191     expedited = EC_READ_U8(data + 2) & 0x02;
  1192     expedited = EC_READ_U8(data + 2) & 0x02;
  1192 
  1193 
  1193     if (expedited) {
  1194     if (expedited) {
  1194         EC_WARN("Received expedited response upon normal request!\n");
  1195         if (master->debug_level)
       
  1196             EC_WARN("Received expedited response upon normal request!\n");
  1195 
  1197 
  1196         size_specified = EC_READ_U8(data + 2) & 0x01;
  1198         size_specified = EC_READ_U8(data + 2) & 0x01;
  1197         if (size_specified) {
  1199         if (size_specified) {
  1198             complete_size = 4 - ((EC_READ_U8(data + 2) & 0x0C) >> 2);
  1200             complete_size = 4 - ((EC_READ_U8(data + 2) & 0x0C) >> 2);
  1199         }
  1201         }