Changeset 3f3afb9 in mainline for uspace/drv/ohci/hw_struct


Ignore:
Timestamp:
2011-04-11T20:38:37Z (15 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
1324ff3, a39cfb8
Parents:
58226b4 (diff), d91645ab (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:

forgotten hub port powering

Location:
uspace/drv/ohci/hw_struct
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.c

    r58226b4 r3f3afb9  
    4242        bzero(instance, sizeof(ed_t));
    4343        if (ep == NULL) {
    44                 instance->status |= ED_STATUS_K_FLAG;
     44                instance->status = ED_STATUS_K_FLAG;
    4545                return;
    4646        }
     
    5353                << ED_STATUS_MPS_SHIFT);
    5454
     55
    5556        if (ep->speed == USB_SPEED_LOW)
    5657                instance->status |= ED_STATUS_S_FLAG;
     
    5859                instance->status |= ED_STATUS_F_FLAG;
    5960
     61        if (ep->toggle)
     62                instance->td_head |= ED_TDHEAD_TOGGLE_CARRY;
    6063}
    61 
    6264/**
    6365 * @}
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    r58226b4 r3f3afb9  
    5353#define ED_STATUS_D_MASK (0x3)     /* direction */
    5454#define ED_STATUS_D_SHIFT (11)
    55 #define ED_STATUS_D_IN (0x1)
    56 #define ED_STATUS_D_OUT (0x2)
     55#define ED_STATUS_D_OUT (0x1)
     56#define ED_STATUS_D_IN (0x2)
    5757#define ED_STATUS_D_TRANSFER (0x3)
    5858
     
    8484{
    8585        assert(instance);
    86         instance->td_head = addr_to_phys(head) & ED_TDHEAD_PTR_MASK;
     86        instance->td_head =
     87            ((addr_to_phys(head) & ED_TDHEAD_PTR_MASK)
     88            | (instance->td_head & ~ED_TDHEAD_PTR_MASK));
    8789        instance->td_tail = addr_to_phys(tail) & ED_TDTAIL_PTR_MASK;
    8890}
     
    9698        instance->next = pa;
    9799}
    98 
    99100#endif
    100101/**
  • uspace/drv/ohci/hw_struct/hcca.h

    r58226b4 r3f3afb9  
    4343        uint32_t done_head;
    4444        uint32_t reserved[29];
    45 } __attribute__((packed)) hcca_t;
     45} __attribute__((packed, aligned)) hcca_t;
    4646
    4747#endif
  • uspace/drv/ohci/hw_struct/transfer_descriptor.c

    r58226b4 r3f3afb9  
    5353        }
    5454        if (buffer != NULL) {
     55                assert(size != 0);
    5556                instance->cbp = addr_to_phys(buffer);
    5657                instance->be = addr_to_phys(buffer + size - 1);
  • uspace/drv/ohci/hw_struct/transfer_descriptor.h

    r58226b4 r3f3afb9  
    5050#define TD_STATUS_DP_SHIFT (19)
    5151#define TD_STATUS_DP_SETUP (0x0)
    52 #define TD_STATUS_DP_IN (0x1)
    53 #define TD_STATUS_DP_OUT (0x2)
     52#define TD_STATUS_DP_OUT (0x1)
     53#define TD_STATUS_DP_IN (0x2)
    5454#define TD_STATUS_DI_MASK (0x7) /* delay interrupt, wait DI frames before int */
    5555#define TD_STATUS_DI_SHIFT (21)
     
    8686        int cc = (instance->status >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK;
    8787        /* something went wrong, error code is set */
    88         if (cc != CC_NOACCESS1 && cc != CC_NOACCESS2 && cc != CC_NOERROR) {
     88        if (cc != CC_NOACCESS1 && cc != CC_NOACCESS2) {
    8989                return true;
    9090        }
Note: See TracChangeset for help on using the changeset viewer.