Changeset e141281 in mainline for uspace/drv/bus/usb/ohci/ohci_rh.c


Ignore:
Timestamp:
2017-05-04T22:17:36Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
31a30fa
Parents:
dc12262
Message:

cstyle (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_rh.c

    rdc12262 re141281  
    393393        TEST_SIZE_INIT(0, port, hub);
    394394        const unsigned feature = uint16_usb2host(setup_packet->value);
     395       
    395396        switch (feature) {
    396397        case USB_HUB_FEATURE_PORT_POWER:   /*8*/
    397         {
    398                 const uint32_t rhda = OHCI_RD(hub->registers->rh_desc_a);
    399                 /* No power switching */
    400                 if (rhda & RHDA_NPS_FLAG)
    401                         return EOK;
    402                 /* Ganged power switching, one port powers all */
    403                 if (!(rhda & RHDA_PSM_FLAG)) {
    404                         OHCI_WR(hub->registers->rh_status,RHS_SET_GLOBAL_POWER);
    405                         return EOK;
     398                {
     399                        const uint32_t rhda = OHCI_RD(hub->registers->rh_desc_a);
     400                       
     401                        /* No power switching */
     402                        if (rhda & RHDA_NPS_FLAG)
     403                                return EOK;
     404                       
     405                        /* Ganged power switching, one port powers all */
     406                        if (!(rhda & RHDA_PSM_FLAG)) {
     407                                OHCI_WR(hub->registers->rh_status,RHS_SET_GLOBAL_POWER);
     408                                return EOK;
     409                        }
    406410                }
    407         }
    408         /* Fall through, for per port power */
    409         /* Fallthrough */
     411                /* Fall through, for per port power */
     412                /* Fallthrough */
    410413        case USB_HUB_FEATURE_PORT_ENABLE:  /*1*/
    411414        case USB_HUB_FEATURE_PORT_SUSPEND: /*2*/
Note: See TracChangeset for help on using the changeset viewer.