Changeset 888238e9 in mainline for uspace/lib


Ignore:
Timestamp:
2017-11-20T12:56:00Z (8 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d3086873
Parents:
ff14aede
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:55:58)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:56:00)
Message:

usbhost: endpoints do not have speed on their own

This information was redundant, and the fact it was never set proves it
should be removed because it is source of errors.

Location:
uspace/lib/usbhost
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/endpoint.h

    rff14aede r888238e9  
    6666        /** USB transfer type. */
    6767        usb_transfer_type_t transfer_type;
    68         /** Communication speed. */
    69         usb_speed_t speed;
    7068        /** Maximum size of data packets. */
    7169        size_t max_packet_size;
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    rff14aede r888238e9  
    3939#include <usb/usb.h>
    4040#include <usb/request.h>
     41#include <usb/host/bus.h>
    4142#include <usbhc_iface.h>
    4243
     
    99100#define USB_TRANSFER_BATCH_ARGS(batch) \
    100101        (batch).target.address, (batch).target.endpoint, \
    101         usb_str_speed((batch).ep->speed), \
     102        usb_str_speed((batch).ep->device->speed), \
    102103        usb_str_transfer_type_short((batch).ep->transfer_type), \
    103104        usb_str_direction((batch).ep->direction), \
  • uspace/lib/usbhost/src/bandwidth.c

    rff14aede r888238e9  
    3636#include <usb/host/bandwidth.h>
    3737#include <usb/host/endpoint.h>
     38#include <usb/host/bus.h>
    3839
    3940#include <assert.h>
     
    4243/** Calculate bandwidth that needs to be reserved for communication with EP.
    4344 * Calculation follows USB 1.1 specification.
    44  * @param speed Device's speed.
    45  * @param type Type of the transfer.
    46  * @param size Number of byte to transfer.
     45 * @param ep Registered endpoint
     46 * @param size Number of bytes to transfer.
    4747 * @param max_packet_size Maximum bytes in one packet.
    4848 */
     
    5050{
    5151        assert(ep);
     52        assert(ep->device);
    5253
    5354        const usb_transfer_type_t type = ep->transfer_type;
     
    6667         * transaction, but I did not find text in USB spec to confirm this */
    6768        /* NOTE: All data packets will be considered to be max_packet_size */
    68         switch (ep->speed)
     69        switch (ep->device->speed)
    6970        {
    7071        case USB_SPEED_LOW:
Note: See TracChangeset for help on using the changeset viewer.