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

Changeset 888238e9 in mainline for uspace/lib/usbhost/src/bandwidth.c


Ignore:
Timestamp:
2017-11-20T12:56:00Z (4 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.