Changeset 7628050 in mainline


Ignore:
Timestamp:
2011-04-10T22:30:12Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c6fe469
Parents:
eaf1e3d
Message:

Fix IN/OUT values, keep non pointer bits when assigning TDs

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

Legend:

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

    reaf1e3d r7628050  
    5353                << ED_STATUS_MPS_SHIFT);
    5454
     55
    5556        if (ep->speed == USB_SPEED_LOW)
    5657                instance->status |= ED_STATUS_S_FLAG;
    5758        if (ep->transfer_type == USB_TRANSFER_ISOCHRONOUS)
    5859                instance->status |= ED_STATUS_F_FLAG;
     60
     61        if (ep->toggle)
     62                instance->td_head |= ED_TDHEAD_TOGGLE_CARRY;
    5963}
    6064/**
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    reaf1e3d r7628050  
    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/**
Note: See TracChangeset for help on using the changeset viewer.