Changeset cd1cec3b in mainline


Ignore:
Timestamp:
2011-04-08T11:31:30Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4fd3faf
Parents:
6a32665d
Message:

Separate batch_finish with internal and external errors

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/root_hub.c

    r6a32665d rcd1cec3b  
    761761                opResult = EINVAL;
    762762        }
    763         usb_transfer_batch_finish(request, opResult);
     763        usb_transfer_batch_finish_error(request, opResult);
    764764        return EOK;
    765765}
  • uspace/drv/uhci-hcd/hc.c

    r6a32665d rcd1cec3b  
    381381                        case USB_TRANSFER_INTERRUPT:
    382382                        case USB_TRANSFER_ISOCHRONOUS: {
    383 /*
    384                                 int ret = bandwidth_free(&instance->bandwidth,
    385                                     batch->target.address,
    386                                     batch->target.endpoint,
    387                                     batch->direction);
    388                                 if (ret != EOK)
    389                                         usb_log_warning("Failed(%d) to free "
    390                                             "reserved bw: %s.\n", ret,
    391                                             str_error(ret));
    392 */
    393383                                }
    394384                        default:
    395385                                break;
    396386                        }
    397                         batch->next_step(batch);
     387                        usb_transfer_batch_finish(batch);
    398388                }
    399389        }
  • uspace/drv/uhci-hcd/transfer_list.c

    r6a32665d rcd1cec3b  
    176176                    list_get_instance(current, usb_transfer_batch_t, link);
    177177                transfer_list_remove_batch(instance, batch);
    178                 usb_transfer_batch_finish(batch, EIO);
     178                usb_transfer_batch_finish_error(batch, EIO);
    179179        }
    180180        fibril_mutex_unlock(&instance->guard);
  • uspace/lib/usb/include/usb/host/batch.h

    r6a32665d rcd1cec3b  
    9292void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
    9393void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);
    94 void usb_transfer_batch_finish(usb_transfer_batch_t *instance, int error);
     94void usb_transfer_batch_finish(usb_transfer_batch_t *instance);
     95
     96static inline void usb_transfer_batch_finish_error(
     97    usb_transfer_batch_t *instance, int error)
     98{
     99        assert(instance);
     100        instance->error = error;
     101        usb_transfer_batch_finish(instance);
     102}
    95103
    96104#endif
  • uspace/lib/usb/src/host/batch.c

    r6a32665d rcd1cec3b  
    8686 *
    8787 */
    88 void usb_transfer_batch_finish(usb_transfer_batch_t *instance, int error)
     88void usb_transfer_batch_finish(usb_transfer_batch_t *instance)
    8989{
    9090        assert(instance);
    91         instance->error = error;
    9291        instance->next_step(instance);
    9392}
Note: See TracChangeset for help on using the changeset viewer.