Changeset dab3112 in mainline
- Timestamp:
- 2011-10-16T16:14:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0fe2ff1
- Parents:
- d5abaf4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.c
rd5abaf4 rdab3112 172 172 ohci_batch->usb_batch->transfered_size = 173 173 ohci_batch->usb_batch->buffer_size; 174 /* Assume we will leave the last td behind */ 174 175 /* Assume we will leave the last(unused) TD behind */ 175 176 ohci_batch->leave_td = ohci_batch->td_count; 176 177 … … 234 235 assert(ohci_ep); 235 236 ohci_ep->td = ohci_batch->tds[ohci_batch->leave_td]; 236 #if 0 237 assert(i > 0); 238 ohci_batch->usb_batch->transfered_size = 239 ohci_batch->usb_batch->buffer_size; 240 for (--i;i < ohci_batch->td_count; ++i) { 241 ohci_batch->usb_batch->transfered_size 242 -= td_remain_size(ohci_batch->tds[i]); 243 } 244 #endif 245 /* Just make sure that we are leaving the right TD behind */ 237 238 /* Make sure that we are leaving the right TD behind */ 246 239 const uint32_t pa = addr_to_phys(ohci_ep->td); 247 240 assert(pa == (ohci_batch->ed->td_head & ED_TDHEAD_PTR_MASK)); … … 288 281 const usb_direction_t status_dir = reverse_dir[dir]; 289 282 290 /* setup stage */283 /* Setup stage */ 291 284 td_init( 292 285 ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH, … … 297 290 buffer += ohci_batch->usb_batch->setup_size; 298 291 299 /* data stage */292 /* Data stage */ 300 293 size_t td_current = 1; 301 294 size_t remain_size = ohci_batch->usb_batch->buffer_size; … … 321 314 } 322 315 323 /* status stage */316 /* Status stage */ 324 317 assert(td_current == ohci_batch->td_count - 1); 325 318 td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
Note:
See TracChangeset
for help on using the changeset viewer.