Ignore:
Timestamp:
2011-04-17T19:17:55Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63517c2, cfbbe1d3
Parents:
ef354b6 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

new report structure fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hw_struct/completion_codes.h

    ref354b6 re50cd7f  
    3535#define DRV_OHCI_HW_STRUCT_COMPLETION_CODES_H
    3636
     37#include <errno.h>
     38
    3739#define CC_NOERROR (0x0)
    3840#define CC_CRC (0x1)
     
    5052#define CC_NOACCESS2 (0xf)
    5153
     54inline static int cc_to_rc(int cc)
     55{
     56        switch (cc) {
     57        case CC_NOERROR:
     58                return EOK;
     59
     60        case CC_CRC:
     61                return EBADCHECKSUM;
     62
     63        case CC_PIDUNEXPECTED:
     64        case CC_PIDFAIL:
     65        case CC_BITSTUFF:
     66                return EIO;
     67
     68        case CC_TOGGLE:
     69        case CC_STALL:
     70                return ESTALL;
     71
     72        case CC_NORESPONSE:
     73                return ETIMEOUT;
     74
     75        case CC_DATAOVERRRUN:
     76        case CC_DATAUNDERRRUN:
     77        case CC_BUFFEROVERRRUN:
     78        case CC_BUFFERUNDERRUN:
     79                return EOVERFLOW;
     80
     81        case CC_NOACCESS1:
     82        case CC_NOACCESS2:
     83        default:
     84                return ENOTSUP;
     85        }
     86}
     87
    5288#endif
    5389/**
Note: See TracChangeset for help on using the changeset viewer.