Changeset ad86349 in mainline
- Timestamp:
- 2011-04-15T15:14:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a13ed97
- Parents:
- 27eb1fe
- Location:
- uspace/drv/ohci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/batch.c
r27eb1fe rad86349 147 147 data->ed->next); 148 148 size_t i = 0; 149 instance->transfered_size = instance->buffer_size; 149 150 for (; i < tds; ++i) { 150 151 assert(data->tds[i] != NULL); … … 156 157 } 157 158 instance->error = td_error(data->tds[i]); 158 /* FIXME: calculate real transfered size */159 instance->transfered_size = instance->buffer_size;160 159 if (instance->error != EOK) { 161 160 usb_log_debug("Batch(%p) found error TD(%d):%x.\n", … … 174 173 assert(hcd_ep); 175 174 hcd_ep->td = data->tds[i]; 175 if (i > 0) 176 instance->transfered_size -= td_remain_size(data->tds[i - 1]); 177 176 178 /* Clear possible ED HALT */ 177 179 data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG; -
uspace/drv/ohci/hw_struct/transfer_descriptor.c
r27eb1fe rad86349 52 52 instance->status |= togg[toggle] << TD_STATUS_T_SHIFT; 53 53 } 54 if (dir == USB_DIRECTION_IN) { 55 instance->status |= TD_STATUS_ROUND_FLAG; 56 } 54 57 if (buffer != NULL) { 55 58 assert(size != 0); -
uspace/drv/ohci/hw_struct/transfer_descriptor.h
r27eb1fe rad86349 59 59 #define TD_STATUS_T_0 (0x2) 60 60 #define TD_STATUS_T_1 (0x3) 61 #define TD_STATUS_T_ED (0) 61 62 #define TD_STATUS_EC_MASK (0x3) /* error count */ 62 63 #define TD_STATUS_EC_SHIFT (26) … … 102 103 return cc_to_rc(cc); 103 104 } 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 } 104 113 #endif 105 114 /**
Note:
See TracChangeset
for help on using the changeset viewer.