Changeset 33d19a7 in mainline
- Timestamp:
- 2011-05-18T10:40:34Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68b9f148
- Parents:
- c7b5826
- Location:
- uspace/drv/ohci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/batch.c
rc7b5826 r33d19a7 151 151 152 152 /* NOTE: OHCI is capable of handling buffer that crosses page boundaries 153 * it is, however, not capable of handling buffer that accupies more154 * than two pages (the first page is compute teusing start pointer, the155 * other using end pointer)*/153 * it is, however, not capable of handling buffer that occupies more 154 * than two pages (the first page is computed using start pointer, the 155 * other using the end pointer) */ 156 156 if (setup_size + buffer_size > 0) { 157 157 data->device_buffer = malloc32(setup_size + buffer_size); … … 180 180 ohci_transfer_batch_t *data = instance->private_data; 181 181 assert(data); 182 size_t tds = data->td_count;183 182 usb_log_debug("Batch(%p) checking %zu td(s) for completion.\n", 184 instance, tds);183 instance, data->td_count); 185 184 usb_log_debug("ED: %x:%x:%x:%x.\n", 186 185 data->ed->status, data->ed->td_head, data->ed->td_tail, … … 188 187 size_t i = 0; 189 188 instance->transfered_size = instance->buffer_size; 190 for (; i < tds; ++i) {189 for (; i < data->td_count; ++i) { 191 190 assert(data->tds[i] != NULL); 192 191 usb_log_debug("TD %zu: %x:%x:%x:%x.\n", i, … … 213 212 assert(hcd_ep); 214 213 hcd_ep->td = data->tds[i]; 215 if (i > 0) 216 instance->transfered_size -= td_remain_size(data->tds[i - 1]); 214 assert(i > 0); 215 for (--i;i < data->td_count; ++i) 216 instance->transfered_size -= td_remain_size(data->tds[i]); 217 217 218 218 /* Clear possible ED HALT */ -
uspace/drv/ohci/hw_struct/transfer_descriptor.h
rc7b5826 r33d19a7 41 41 #include "completion_codes.h" 42 42 43 /* OHCI TDs can handle up to 8KB buffers */ 44 #define OHCI_TD_MAX_TRANSFER (8 * 1024) 43 /* OHCI TDs can handle up to 8KB buffers, however, it can use max 2 pages. 44 * Using 4KB buffers guarantees the page count condition. 45 * (OHCI assumes 4KB pages) */ 46 #define OHCI_TD_MAX_TRANSFER (4 * 1024) 45 47 46 48 typedef struct td {
Note:
See TracChangeset
for help on using the changeset viewer.