Changeset c280d7e in mainline for uspace/lib/usbdev/src/pipes.c


Ignore:
Timestamp:
2018-01-20T03:02:36Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60d3f35
Parents:
3cdaa7f
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:36)
Message:

libdrv: usb iface callbacks joined

In addition to handle and current interface, it is good for the device
to know its address and speed. Also, it is expected to add some other
fields (stats, info tied to devices of specific speed and so on) in the
future. Instead of adding yet another call, join those two and let HC
fill a description structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/pipes.c

    r3cdaa7f rc280d7e  
    248248 */
    249249static int usb_isoch_session_initialize(usb_pipe_t *pipe) {
    250         devman_handle_t handle;
    251 
    252         async_exch_t *exch = async_exchange_begin(pipe->bus_session);
    253         if (!exch)
    254                 return EPARTY;
    255 
    256         int ret = usb_get_my_device_handle(exch, &handle);
    257 
    258         async_exchange_end(exch);
    259         if (ret != EOK)
    260                 return ret;
    261 
    262         pipe->isoch_session = usb_dev_connect(handle);
    263         if (!pipe->isoch_session)
    264                 return ENAK;
    265 
     250
     251        /*
     252         * XXX: As parallel exhanges are implemented by using parallel sessions,
     253         * it is safe to just take the same session. Once this won't be true,
     254         * just use session cloning to clone the bus session.
     255         */
     256        pipe->isoch_session = pipe->bus_session;
    266257        return EOK;
    267258}
Note: See TracChangeset for help on using the changeset viewer.