Changeset c68c713c in mainline


Ignore:
Timestamp:
2017-10-04T14:10:11Z (7 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a0d9f4
Parents:
816335c
Message:

Cleanup in constants and other small adjustments.

Location:
uspace/drv/bus/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/usbhub.c

    r816335c rc68c713c  
    236236        /* It is an error condition if we didn't receive enough data */
    237237        if (change_bitmap_size == 0) {
     238                usb_log_warning("(%p) USB hub stopped polling", hub);
    238239                return false;
    239240        }
     
    253254                }
    254255        }
     256        usb_log_warning("(%p) USB hub continued polling", hub);
    255257        return true;
    256258}
  • uspace/drv/bus/usb/xhci/rh.c

    r816335c rc68c713c  
    6161        header->length = sizeof(usb_hub_descriptor_header_t);
    6262        header->descriptor_type = USB_DESCTYPE_HUB;
    63         /* FIXME: Use hcs_params1 and cap to 0x7F */
    64         header->port_count = 0x7F;
     63        header->port_count = XHCI_MAX_PORTS;
    6564        header->characteristics =
    6665                    HUB_CHAR_NO_POWER_SWITCH_FLAG | HUB_CHAR_NO_OC_FLAG;
     
    6867        header->max_current = 0;
    6968
    70         return virthub_base_init(&rh->base, "xhci-rh", &ops, rh, NULL,
     69        return virthub_base_init(&rh->base, "xhci", &ops, rh, NULL,
    7170            header, HUB_STATUS_CHANGE_PIPE);
    7271}
     
    347346        assert(hub);
    348347
    349         const uint16_t ports = 255; /* FIXME: Fetch this from somewhere. */
    350         if (!setup_packet->index || setup_packet->index > ports) {
     348        if (!setup_packet->index || setup_packet->index > XHCI_MAX_PORTS) {
    351349                return ESTALL;
    352350        }
     
    431429                return ESTALL;
    432430
    433         /* TODO: Set this based on the received event TRBs. */
    434431        memset(buffer, 0, 16);
    435432        *actual_size = 16;
    436 
    437         /* TODO: Set to EOK if something happened. */
    438433        return ENAK;
    439434}
Note: See TracChangeset for help on using the changeset viewer.