Changeset a752c78c in mainline for uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.c
- Timestamp:
- 2014-01-25T07:07:54Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23e5471
- Parents:
- 6602e97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.c
r6602e97 ra752c78c 34 34 35 35 #include <assert.h> 36 #include <errno.h> 36 37 #include <macros.h> 37 38 #include <mem.h> … … 40 41 41 42 #include "../utils/malloc32.h" 42 //#include "completion_codes.h"43 43 #include "mem_access.h" 44 44 #include "transfer_descriptor.h" 45 46 47 int td_error(const td_t *td) 48 { 49 assert(td); 50 const uint32_t status = EHCI_MEM32_RD(td->status); 51 if (status & TD_STATUS_HALTED_FLAG) { 52 if (status & TD_STATUS_TRANS_ERR_FLAG) 53 return EIO; 54 if (status & TD_STATUS_BABBLE_FLAG) 55 return EIO; 56 if (status & TD_STATUS_BUFF_ERROR_FLAG) 57 return EOVERFLOW; 58 return ESTALL; 59 } 60 if (status & TD_STATUS_ACTIVE_FLAG) 61 return EINPROGRESS; 62 return EOK; 63 } 45 64 46 65 /** USB direction to EHCI TD values translation table */
Note:
See TracChangeset
for help on using the changeset viewer.