Changes in uspace/drv/uhci/main.c [4317827:7972b51] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/main.c

    r4317827 r7972b51  
    2828#include <usb/hcdhubd.h>
    2929#include <errno.h>
    30 #include "uhci.h"
    3130
    32 static device_ops_t uhci_ops = {
    33         .interfaces[USBHC_DEV_IFACE] = &uhci_iface,
     31static int enqueue_transfer_out(usb_hc_device_t *hc,
     32    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     33    void *buffer, size_t size,
     34    usb_hcd_transfer_callback_out_t callback, void *arg)
     35{
     36        printf("UHCI: transfer OUT [%d.%d (%s); %u]\n",
     37            dev->address, endpoint->endpoint,
     38            usb_str_transfer_type(endpoint->transfer_type),
     39            size);
     40        return ENOTSUP;
     41}
     42
     43static int enqueue_transfer_setup(usb_hc_device_t *hc,
     44    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     45    void *buffer, size_t size,
     46    usb_hcd_transfer_callback_out_t callback, void *arg)
     47{
     48        printf("UHCI: transfer SETUP [%d.%d (%s); %u]\n",
     49            dev->address, endpoint->endpoint,
     50            usb_str_transfer_type(endpoint->transfer_type),
     51            size);
     52        return ENOTSUP;
     53}
     54
     55static int enqueue_transfer_in(usb_hc_device_t *hc,
     56    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     57    void *buffer, size_t size,
     58    usb_hcd_transfer_callback_in_t callback, void *arg)
     59{
     60        printf("UHCI: transfer IN [%d.%d (%s); %u]\n",
     61            dev->address, endpoint->endpoint,
     62            usb_str_transfer_type(endpoint->transfer_type),
     63            size);
     64        return ENOTSUP;
     65}
     66
     67static usb_hcd_transfer_ops_t uhci_transfer_ops = {
     68        .transfer_out = enqueue_transfer_out,
     69        .transfer_in = enqueue_transfer_in,
     70        .transfer_setup = enqueue_transfer_setup
    3471};
    3572
    36 static int uhci_add_device(device_t *device)
     73static int uhci_add_hc(usb_hc_device_t *device)
    3774{
    38         device->ops = &uhci_ops;
     75        device->transfer_ops = &uhci_transfer_ops;
    3976
    4077        /*
     
    4683}
    4784
    48 static driver_ops_t uhci_driver_ops = {
    49         .add_device = uhci_add_device,
    50 };
    51 
    52 static driver_t uhci_driver = {
    53         .name = NAME,
    54         .driver_ops = &uhci_driver_ops
     85usb_hc_driver_t uhci_driver = {
     86        .name = "uhci",
     87        .add_hc = uhci_add_hc
    5588};
    5689
     
    6093         * Do some global initializations.
    6194         */
    62         sleep(5);
    6395
    64         return driver_main(&uhci_driver);
     96        return usb_hcd_main(&uhci_driver);
    6597}
Note: See TracChangeset for help on using the changeset viewer.