Changeset 97e87de in mainline


Ignore:
Timestamp:
2011-02-04T13:30:25Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
881c47b
Parents:
74d6e90
Message:

Add some more error checking

Location:
uspace/drv
Files:
3 edited

Legend:

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

    r74d6e90 r97e87de  
    134134         */
    135135        sleep(5);
    136         usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
     136        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    137137
    138138        return driver_main(&uhci_driver);
  • uspace/drv/uhci-hcd/uhci.c

    r74d6e90 r97e87de  
    156156        }
    157157
     158        if (transfer_type == USB_TRANSFER_INTERRUPT
     159          && size >= 64) {
     160                usb_log_warning("Interrupt transfer too big %zu.\n", size);
     161                return ENOTSUP;
     162        }
     163
     164
    158165        if (size >= 1024) {
    159166                usb_log_warning("Transfer too big.\n");
     
    211218                                &instance->transfers[i], it ? "SOMETHING" : "EMPTY");
    212219
    213                 if (it)
    214                         usb_log_debug("First in queue: %p (%x).\n",
    215                                 it, it->status);
     220                        if (it)
     221                                usb_log_debug("First in queue: %p (%x).\n",
     222                                        it, it->status);
    216223
    217224                        while (instance->transfers[i].first &&
  • uspace/drv/uhci-rhd/port.c

    r74d6e90 r97e87de  
    215215                port->number, usb_address, port->attached_device);
    216216
    217         /* TODO: bind the address here */
    218         ret = usb_drv_bind_address(port->hc_phone, usb_address, port->attached_device);
     217        ret =
     218          usb_drv_bind_address(port->hc_phone, usb_address, port->attached_device);
     219        // TODO: proper error check here
     220        assert(ret == EOK);
    219221
    220222        return EOK;
Note: See TracChangeset for help on using the changeset viewer.