Changeset 6de2d766 in mainline for uspace/lib/usbhost


Ignore:
Timestamp:
2012-07-20T18:14:55Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b828907, be67118
Parents:
7030bc9 (diff), 32260a0 (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.
Message:

Merge USB branch.

USB should be endian agnostic now.
OHCI and pci work on qemu powerpc, but pci locks up on real hw.
Hopefully no regressions on amd64/ia32.
Tested on qemu and Virtualbox.

Location:
uspace/lib/usbhost/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/endpoint.c

    r7030bc9 r6de2d766  
    7272        return instance;
    7373}
    74 /*----------------------------------------------------------------------------*/
     74
    7575/** Properly dispose of endpoint_t structure.
    7676 * @param instance endpoint_t structure.
     
    8484        free(instance);
    8585}
    86 /*----------------------------------------------------------------------------*/
     86
    8787/** Set device specific data and hooks.
    8888 * @param instance endpoint_t structure.
     
    101101        fibril_mutex_unlock(&instance->guard);
    102102}
    103 /*----------------------------------------------------------------------------*/
     103
    104104/** Clear device specific data and hooks.
    105105 * @param instance endpoint_t structure.
     
    115115        fibril_mutex_unlock(&instance->guard);
    116116}
    117 /*----------------------------------------------------------------------------*/
     117
    118118/** Mark the endpoint as active and block access for further fibrils.
    119119 * @param instance endpoint_t structure.
     
    128128        fibril_mutex_unlock(&instance->guard);
    129129}
    130 /*----------------------------------------------------------------------------*/
     130
    131131/** Mark the endpoint as inactive and allow access for further fibrils.
    132132 * @param instance endpoint_t structure.
     
    140140        fibril_condvar_signal(&instance->avail);
    141141}
    142 /*----------------------------------------------------------------------------*/
     142
    143143/** Get the value of toggle bit.
    144144 * @param instance endpoint_t structure.
     
    156156        return ret;
    157157}
    158 /*----------------------------------------------------------------------------*/
     158
    159159/** Set the value of toggle bit.
    160160 * @param instance endpoint_t structure.
  • uspace/lib/usbhost/src/usb_device_manager.c

    r7030bc9 r6de2d766  
    6161        return new_address;
    6262}
    63 /*----------------------------------------------------------------------------*/
     63
    6464/** Initialize device manager structure.
    6565 *
     
    8282        fibril_mutex_initialize(&instance->guard);
    8383}
    84 /*----------------------------------------------------------------------------*/
     84
    8585/** Request USB address.
    8686 * @param instance usb_device_manager
     
    124124        return EOK;
    125125}
    126 /*----------------------------------------------------------------------------*/
     126
    127127/** Bind USB address to devman handle.
    128128 *
     
    156156        return EOK;
    157157}
    158 /*----------------------------------------------------------------------------*/
     158
    159159/** Release used USB address.
    160160 *
     
    182182        return EOK;
    183183}
    184 /*----------------------------------------------------------------------------*/
     184
    185185/** Find USB address associated with the device.
    186186 *
     
    205205        return ENOENT;
    206206}
    207 /*----------------------------------------------------------------------------*/
     207
    208208/** Find devman handle and speed assigned to USB address.
    209209 *
  • uspace/lib/usbhost/src/usb_endpoint_manager.c

    r7030bc9 r6de2d766  
    6161            && (address == ep->address);
    6262}
    63 /*----------------------------------------------------------------------------*/
     63
    6464/** Get list that holds endpoints for given address.
    6565 * @param instance usb_endpoint_manager structure, non-null.
     
    7373        return &instance->endpoint_lists[addr % ENDPOINT_LIST_COUNT];
    7474}
    75 /*----------------------------------------------------------------------------*/
     75
    7676/** Internal search function, works on locked structure.
    7777 * @param instance usb_endpoint_manager structure, non-null.
     
    9797        return NULL;
    9898}
    99 /*----------------------------------------------------------------------------*/
     99
    100100/** Calculate bandwidth that needs to be reserved for communication with EP.
    101101 * Calculation follows USB 1.1 specification.
     
    145145        }
    146146}
    147 /*----------------------------------------------------------------------------*/
     147
    148148/** Initialize to default state.
    149149 * You need to provide valid bw_count function if you plan to use
     
    168168        return EOK;
    169169}
    170 /*----------------------------------------------------------------------------*/
     170
    171171/** Check setup packet data for signs of toggle reset.
    172172 *
     
    227227        }
    228228}
    229 /*----------------------------------------------------------------------------*/
     229
    230230/** Register endpoint structure.
    231231 * Checks for duplicates.
     
    262262        return EOK;
    263263}
    264 /*----------------------------------------------------------------------------*/
     264
    265265/** Unregister endpoint structure.
    266266 * Checks for duplicates.
     
    286286        return EOK;
    287287}
    288 /*----------------------------------------------------------------------------*/
     288
    289289/** Find endpoint_t representing the given communication route.
    290290 * @param instance usb_endpoint_manager, non-null.
     
    301301        return ep;
    302302}
    303 /*----------------------------------------------------------------------------*/
     303
    304304/** Create and register new endpoint_t structure.
    305305 * @param instance usb_endpoint_manager structure, non-null.
     
    364364        return EOK;
    365365}
    366 /*----------------------------------------------------------------------------*/
     366
    367367/** Unregister and destroy endpoint_t structure representing given route.
    368368 * @param instance usb_endpoint_manager structure, non-null.
     
    395395        return EOK;
    396396}
    397 /*----------------------------------------------------------------------------*/
     397
    398398/** Unregister and destroy all endpoints using given address.
    399399 * @param instance usb_endpoint_manager structure, non-null.
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    r7030bc9 r6de2d766  
    9696        return instance;
    9797}
    98 /*----------------------------------------------------------------------------*/
     98
    9999/** Correctly dispose all used data structures.
    100100 *
     
    116116        free(instance);
    117117}
    118 /*----------------------------------------------------------------------------*/
     118
    119119/** Prepare data and call the right callback.
    120120 *
Note: See TracChangeset for help on using the changeset viewer.