Changes in / [ab6fdad3:cbdb6457] in mainline


Ignore:
Location:
uspace/drv
Files:
1 added
3 edited

Legend:

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

    rab6fdad3 rcbdb6457  
    147147            data->ed->next);
    148148        size_t i = 0;
    149         instance->transfered_size = instance->buffer_size;
    150149        for (; i < tds; ++i) {
    151150                assert(data->tds[i] != NULL);
     
    157156                }
    158157                instance->error = td_error(data->tds[i]);
     158                /* FIXME: calculate real transfered size */
     159                instance->transfered_size = instance->buffer_size;
    159160                if (instance->error != EOK) {
    160161                        usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
     
    173174        assert(hcd_ep);
    174175        hcd_ep->td = data->tds[i];
    175         if (i > 0)
    176                 instance->transfered_size -= td_remain_size(data->tds[i - 1]);
    177 
    178176        /* Clear possible ED HALT */
    179177        data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     
    240238{
    241239        assert(instance);
    242         instance->next_step = usb_transfer_batch_call_out_and_dispose;
     240        instance->next_step = usb_transfer_batch_call_in_and_dispose;
    243241        batch_data(instance);
    244         usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance);
     242        usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);
    245243}
    246244/*----------------------------------------------------------------------------*/
  • uspace/drv/ohci/hw_struct/transfer_descriptor.c

    rab6fdad3 rcbdb6457  
    5252                instance->status |= togg[toggle] << TD_STATUS_T_SHIFT;
    5353        }
    54         if (dir == USB_DIRECTION_IN) {
    55                 instance->status |= TD_STATUS_ROUND_FLAG;
    56         }
    5754        if (buffer != NULL) {
    5855                assert(size != 0);
  • uspace/drv/ohci/hw_struct/transfer_descriptor.h

    rab6fdad3 rcbdb6457  
    5959#define TD_STATUS_T_0 (0x2)
    6060#define TD_STATUS_T_1 (0x3)
    61 #define TD_STATUS_T_ED (0)
    6261#define TD_STATUS_EC_MASK (0x3) /* error count */
    6362#define TD_STATUS_EC_SHIFT (26)
     
    103102        return cc_to_rc(cc);
    104103}
    105 
    106 static inline size_t td_remain_size(td_t *instance)
    107 {
    108         assert(instance);
    109         if (instance->cbp == 0)
    110                 return 0;
    111         return instance->be - instance->cbp + 1;
    112 }
    113104#endif
    114105/**
Note: See TracChangeset for help on using the changeset viewer.