Changeset df6ded8 in mainline for uspace/lib/usb/src/usb.c


Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (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.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/usb.c

    rf5e5f73 rdf6ded8  
    4444        [USB_SPEED_FULL] = "full",
    4545        [USB_SPEED_HIGH] = "high",
     46        [USB_SPEED_SUPER] = "super",
    4647};
    4748
     
    118119}
    119120
    120 /** Check setup packet data for signs of toggle reset.
    121  *
    122  * @param[in] requst Setup requst data.
    123  *
    124  * @retval -1 No endpoints need reset.
    125  * @retval 0 All endpoints need reset.
    126  * @retval >0 Specified endpoint needs reset.
    127  *
    128  */
    129 int usb_request_needs_toggle_reset(
    130     const usb_device_request_setup_packet_t *request)
    131 {
    132         assert(request);
    133         switch (request->request)
    134         {
    135         /* Clear Feature ENPOINT_STALL */
    136         case USB_DEVREQ_CLEAR_FEATURE: /*resets only cleared ep */
    137                 /* 0x2 ( HOST to device | STANDART | TO ENPOINT) */
    138                 if ((request->request_type == 0x2) &&
    139                     (request->value == USB_FEATURE_ENDPOINT_HALT))
    140                         return uint16_usb2host(request->index);
    141                 break;
    142         case USB_DEVREQ_SET_CONFIGURATION:
    143         case USB_DEVREQ_SET_INTERFACE:
    144                 /* Recipient must be device, this resets all endpoints,
    145                  * In fact there should be no endpoints but EP 0 registered
    146                  * as different interfaces use different endpoints,
    147                  * unless you're changing configuration or alternative
    148                  * interface of an already setup device. */
    149                 if (!(request->request_type & SETUP_REQUEST_TYPE_DEVICE_TO_HOST))
    150                         return 0;
    151                 break;
    152         default:
    153                 break;
    154         }
    155         return -1;
    156 }
    157 
    158121/**
    159122 * @}
Note: See TracChangeset for help on using the changeset viewer.