Changeset 5fd9c30 in mainline for uspace/lib/usb/src/usb.c


Ignore:
Timestamp:
2017-10-21T20:52:56Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
766043c
Parents:
74b852b
Message:

usbhost refactoring: let transfer_batch be initialized by bus

Currently makes older HCs fail, work in progress.

File:
1 edited

Legend:

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

    r74b852b r5fd9c30  
    128128 *
    129129 */
    130 int usb_request_needs_toggle_reset(
     130toggle_reset_mode_t usb_request_get_toggle_reset_mode(
    131131    const usb_device_request_setup_packet_t *request)
    132132{
     
    139139                if ((request->request_type == 0x2) &&
    140140                    (request->value == USB_FEATURE_ENDPOINT_HALT))
    141                         return uint16_usb2host(request->index);
     141                        return RESET_EP;
    142142                break;
    143143        case USB_DEVREQ_SET_CONFIGURATION:
     
    149149                 * interface of an already setup device. */
    150150                if (!(request->request_type & SETUP_REQUEST_TYPE_DEVICE_TO_HOST))
    151                         return 0;
     151                        return RESET_ALL;
    152152                break;
    153153        default:
    154154                break;
    155155        }
    156         return -1;
     156
     157        return RESET_NONE;
    157158}
    158159
Note: See TracChangeset for help on using the changeset viewer.