Changeset 56257ba in mainline for uspace/drv/bus/usb/ehci/ehci_bus.c
- Timestamp:
- 2018-01-07T01:01:42Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63431db
- Parents:
- 9efad54
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-07 01:01:41)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-07 01:01:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_bus.c
r9efad54 r56257ba 48 48 * @param[in] toggle new value of toggle bit 49 49 */ 50 static void ehci_ep_toggle_ set(endpoint_t *ep, bool toggle)50 static void ehci_ep_toggle_reset(endpoint_t *ep) 51 51 { 52 52 ehci_endpoint_t *instance = ehci_endpoint_get(ep); 53 assert(instance);54 assert(instance->qh);55 ep->toggle = toggle;56 53 if (qh_toggle_from_td(instance->qh)) 57 usb_log_warning("EP(%p): Setting toggle bit for transfer "58 "directed EP", instance);59 qh_toggle_set(instance->qh, toggle);54 usb_log_warning("EP(%p): Resetting toggle bit for transfer directed EP", instance); 55 qh_toggle_set(instance->qh, 0); 56 ep->toggle = 0; 60 57 } 61 58 62 /** Callback to get value of toggle bit.63 *64 * @param[in] hcd_ep hcd endpoint structure65 * @return Current value of toggle bit.66 */67 static bool ehci_ep_toggle_get(endpoint_t *ep)68 {69 ehci_endpoint_t *instance = ehci_endpoint_get(ep);70 assert(instance);71 assert(instance->qh);72 73 if (qh_toggle_from_td(instance->qh))74 usb_log_warning("EP(%p): Reading useless toggle bit", instance);75 return qh_toggle_get(instance->qh);76 }77 59 78 60 /** Creates new hcd endpoint representation. … … 166 148 .endpoint_register = ehci_register_ep, 167 149 .endpoint_unregister = ehci_unregister_ep, 168 .endpoint_set_toggle = ehci_ep_toggle_set, 169 .endpoint_get_toggle = ehci_ep_toggle_get, 150 .endpoint_toggle_reset = ehci_ep_toggle_reset, 170 151 .endpoint_count_bw = bandwidth_count_usb11, 171 152 .batch_create = ehci_create_batch,
Note:
See TracChangeset
for help on using the changeset viewer.