Changeset 65eac7b in mainline for uspace/drv/bus/usb/ohci/ohci_batch.c


Ignore:
Timestamp:
2012-02-24T03:08:24Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
668a2e8
Parents:
4e30369
Message:

ohci: Use endain aware access to manipulate memory structures.

Enable work queues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    r4e30369 r65eac7b  
    231231
    232232                        /* Check TD assumption */
    233                         const uint32_t pa =
    234                             addr_to_phys(ohci_batch->tds[leave_td]);
    235                         assert((ohci_batch->ed->td_head & ED_TDHEAD_PTR_MASK)
    236                             == pa);
    237 
     233                        assert(ed_head_td(ohci_batch->ed) ==
     234                            addr_to_phys(ohci_batch->tds[leave_td]));
     235
     236                        /* Set tail to the same TD */
    238237                        ed_set_tail_td(ohci_batch->ed,
    239238                            ohci_batch->tds[leave_td]);
    240239
    241240                        /* Clear possible ED HALT */
    242                         ohci_batch->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     241                        ed_clear_halt(ohci_batch->ed);
    243242                        break;
    244243                }
     
    253252
    254253        /* Make sure that we are leaving the right TD behind */
    255         const uint32_t pa = addr_to_phys(ohci_ep->td);
    256         assert(pa == (ohci_batch->ed->td_head & ED_TDHEAD_PTR_MASK));
    257         assert(pa == (ohci_batch->ed->td_tail & ED_TDTAIL_PTR_MASK));
     254        assert(addr_to_phys(ohci_ep->td) == ed_head_td(ohci_batch->ed));
     255        assert(addr_to_phys(ohci_ep->td) == ed_tail_td(ohci_batch->ed));
     256//      const uint32_t pa = addr_to_phys(ohci_ep->td);
     257//      assert(pa == (ohci_batch->ed->td_head & ED_TDHEAD_PTR_MASK));
     258//      assert(pa == (ohci_batch->ed->td_tail & ED_TDTAIL_PTR_MASK));
    258259
    259260        return true;
Note: See TracChangeset for help on using the changeset viewer.