Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8fb3981 in mainline


Ignore:
Timestamp:
2011-04-15T13:20:51Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
27b85d9
Parents:
12b8e03 (diff), d7f08b0d (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:

Merge development/ changes

Files:
8 added
8 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    r12b8e03 r8fb3981  
    9494./uspace/drv/usbhid/usbhid
    9595./uspace/drv/usbkbd/usbkbd
     96./uspace/drv/usbmast/usbmast
    9697./uspace/drv/usbmid/usbmid
    9798./uspace/drv/usbmouse/usbmouse
  • boot/arch/amd64/Makefile.inc

    r12b8e03 r8fb3981  
    5151        usbkbd \
    5252        usbhid \
     53        usbmast \
    5354        usbmid \
    5455        usbmouse \
  • uspace/Makefile

    r12b8e03 r8fb3981  
    125125                drv/usbhid \
    126126                drv/usbhub \
     127                drv/usbmast \
    127128                drv/usbmid \
    128129                drv/usbmouse \
     
    146147                drv/usbhid \
    147148                drv/usbhub \
     149                drv/usbmast \
    148150                drv/usbmid \
    149151                drv/usbmouse \
  • uspace/doc/doxygroups.h

    r12b8e03 r8fb3981  
    251251
    252252        /**
     253         * @defgroup drvusbmast USB mass storage driver
     254         * @ingroup usb
     255         * @brief USB driver for mass storage devices (bulk-only protocol).
     256         * This driver is a only a stub and is currently used only for
     257         * testing that bulk transfers work.
     258         */
     259
     260        /**
    253261         * @defgroup drvusbuhci UHCI driver
    254262         * @ingroup usb
  • uspace/drv/ohci/batch.c

    r12b8e03 r8fb3981  
    161161                        usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
    162162                            instance, i, data->tds[i]->status);
     163                        /* Make sure TD queue is empty (one TD),
     164                         * ED should be marked as halted */
     165                        data->ed->td_tail =
     166                            (data->ed->td_head & ED_TDTAIL_PTR_MASK);
     167                        ++i;
    163168                        break;
    164169                }
     
    169174        assert(hcd_ep);
    170175        hcd_ep->td = data->tds[i];
     176        /* Clear possible ED HALT */
     177        data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     178        uint32_t pa = addr_to_phys(hcd_ep->td);
     179        assert(pa == (data->ed->td_head & ED_TDHEAD_PTR_MASK));
     180        assert(pa == (data->ed->td_tail & ED_TDTAIL_PTR_MASK));
    171181
    172182        return true;
  • uspace/drv/ohci/hcd_endpoint.c

    r12b8e03 r8fb3981  
    3535#include "hcd_endpoint.h"
    3636
     37static void hcd_ep_toggle_set(void *hcd_ep, int toggle)
     38{
     39        hcd_endpoint_t *instance = hcd_ep;
     40        assert(instance);
     41        assert(instance->ed);
     42        ed_toggle_set(instance->ed, toggle);
     43}
     44static int hcd_ep_toggle_get(void *hcd_ep)
     45{
     46        hcd_endpoint_t *instance = hcd_ep;
     47        assert(instance);
     48        assert(instance->ed);
     49        return ed_toggle_get(instance->ed);
     50}
     51
     52
    3753hcd_endpoint_t * hcd_endpoint_assign(endpoint_t *ep)
    3854{
     
    5773        ed_init(hcd_ep->ed, ep);
    5874        ed_set_td(hcd_ep->ed, hcd_ep->td);
    59         endpoint_set_hc_data(ep, hcd_ep, NULL, NULL);
     75        endpoint_set_hc_data(ep, hcd_ep, hcd_ep_toggle_get, hcd_ep_toggle_set);
    6076
    6177        return hcd_ep;
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    r12b8e03 r8fb3981  
    7373#define ED_TDHEAD_ZERO_SHIFT (2)
    7474#define ED_TDHEAD_TOGGLE_CARRY (0x2)
     75#define ED_TDHEAD_HALTED_FLAG (0x1)
    7576
    7677        volatile uint32_t next;
     
    106107        instance->next = pa;
    107108}
     109
     110static inline int ed_toggle_get(ed_t *instance)
     111{
     112        assert(instance);
     113        return (instance->td_head & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;
     114}
     115
     116static inline void ed_toggle_set(ed_t *instance, int toggle)
     117{
     118        assert(instance);
     119        assert(toggle == 0 || toggle == 1);
     120        if (toggle == 1) {
     121                instance->td_head |= ED_TDHEAD_TOGGLE_CARRY;
     122        } else {
     123                /* clear halted flag when reseting toggle */
     124                instance->td_head &= ~ED_TDHEAD_TOGGLE_CARRY;
     125                instance->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     126        }
     127}
    108128#endif
    109129/**
  • uspace/lib/usb/src/host/endpoint.c

    r12b8e03 r8fb3981  
    123123        if (instance->address == target.address &&
    124124            (instance->endpoint == target.endpoint || target.endpoint == 0))
    125                 instance->toggle = 0;
     125                endpoint_toggle_set(instance, 0);
    126126}
    127127/**
Note: See TracChangeset for help on using the changeset viewer.