Ignore:
File:
1 edited

Legend:

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

    rf1be95c8 rfc9f88d  
    3535#define DRV_OHCI_HW_STRUCT_COMPLETION_CODES_H
    3636
    37 #include <errno.h>
    38 
    3937#define CC_NOERROR (0x0)
    4038#define CC_CRC (0x1)
     
    5250#define CC_NOACCESS2 (0xf)
    5351
    54 inline 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 
    8852#endif
    8953/**
Note: See TracChangeset for help on using the changeset viewer.