Changeset d1582b50 in mainline for uspace/drv/bus/usb


Ignore:
Timestamp:
2020-12-14T20:41:53Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
02fe42e
Parents:
1382446
git-author:
Jiri Svoboda <jiri@…> (2020-12-14 20:33:54)
git-committer:
Jiri Svoboda <jiri@…> (2020-12-14 20:41:53)
Message:

Fix spacing in single-line comments using latest ccheck

This found incorrectly formatted section comments (with blocks of
asterisks or dashes). I strongly believe against using section comments
but I am not simply removing them since that would probably be
controversial.

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

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    r1382446 rd1582b50  
    138138        memcpy(ehci_batch->setup_buffer, ehci_batch->base.setup.buffer, setup_size);
    139139
    140         /* Generic data already prepared*/
     140        /* Generic data already prepared */
    141141        ehci_batch->data_buffer = ehci_batch->base.dma_buffer.virt;
    142142
  • uspace/drv/bus/usb/ehci/ehci_rh.c

    r1382446 rd1582b50  
    8686        instance->hub_descriptor.header.max_current = 0;
    8787
    88         /* Device removable and some legacy 1.0 stuff*/
     88        /* Device removable and some legacy 1.0 stuff */
    8989        instance->hub_descriptor.rempow[0] = 0xff;
    9090        instance->hub_descriptor.rempow[1] = 0xff;
     
    410410        /* Enabled features to clear: see page 269 of USB specs */
    411411        switch (feature) {
    412         case USB_HUB_FEATURE_PORT_POWER:          /*8*/
     412        case USB_HUB_FEATURE_PORT_POWER:          /* 8 */
    413413                usb_log_debug2("RH(%p-%u): Clear port power.", hub, port);
    414414                EHCI_CLR(hub->registers->portsc[port],
     
    416416                return EOK;
    417417
    418         case USB2_HUB_FEATURE_PORT_ENABLE:         /*1*/
     418        case USB2_HUB_FEATURE_PORT_ENABLE:         /* 1 */
    419419                usb_log_debug2("RH(%p-%u): Clear port enable.", hub, port);
    420420                EHCI_CLR(hub->registers->portsc[port],
     
    422422                return EOK;
    423423
    424         case USB2_HUB_FEATURE_PORT_SUSPEND:        /*2*/
     424        case USB2_HUB_FEATURE_PORT_SUSPEND:        /* 2 */
    425425                usb_log_debug2("RH(%p-%u): Clear port suspend.", hub, port);
    426426                /* If not in suspend it's noop */
     
    434434                return delayed_job(stop_resume, hub, port);
    435435
    436         case USB_HUB_FEATURE_C_PORT_CONNECTION:   /*16*/
     436        case USB_HUB_FEATURE_C_PORT_CONNECTION:   /* 16 */
    437437                usb_log_debug2("RH(%p-%u): Clear port connection change.",
    438438                    hub, port);
     
    440440                    USB_PORTSC_CONNECT_CH_FLAG);
    441441                return EOK;
    442         case USB2_HUB_FEATURE_C_PORT_ENABLE:       /*17*/
     442        case USB2_HUB_FEATURE_C_PORT_ENABLE:       /* 17 */
    443443                usb_log_debug2("RH(%p-%u): Clear port enable change.",
    444444                    hub, port);
     
    446446                    USB_PORTSC_CONNECT_CH_FLAG);
    447447                return EOK;
    448         case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /*19*/
     448        case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /* 19 */
    449449                usb_log_debug2("RH(%p-%u): Clear port OC change.",
    450450                    hub, port);
     
    452452                    USB_PORTSC_OC_CHANGE_FLAG);
    453453                return EOK;
    454         case USB2_HUB_FEATURE_C_PORT_SUSPEND:      /*18*/
     454        case USB2_HUB_FEATURE_C_PORT_SUSPEND:      /* 18 */
    455455                usb_log_debug2("RH(%p-%u): Clear port suspend change.",
    456456                    hub, port);
    457457                hub->resume_flag[port] = false;
    458458                return EOK;
    459         case USB_HUB_FEATURE_C_PORT_RESET:        /*20*/
     459        case USB_HUB_FEATURE_C_PORT_RESET:        /* 20 */
    460460                usb_log_debug2("RH(%p-%u): Clear port reset change.",
    461461                    hub, port);
     
    487487        const unsigned feature = uint16_usb2host(setup_packet->value);
    488488        switch (feature) {
    489         case USB2_HUB_FEATURE_PORT_ENABLE:  /*1*/
     489        case USB2_HUB_FEATURE_PORT_ENABLE:  /* 1 */
    490490                usb_log_debug2("RH(%p-%u): Set port enable.", hub, port);
    491491                EHCI_SET(hub->registers->portsc[port],
    492492                    USB_PORTSC_ENABLED_FLAG);
    493493                return EOK;
    494         case USB2_HUB_FEATURE_PORT_SUSPEND: /*2*/
     494        case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2 */
    495495                usb_log_debug2("RH(%p-%u): Set port suspend.", hub, port);
    496496                EHCI_SET(hub->registers->portsc[port],
    497497                    USB_PORTSC_SUSPEND_FLAG);
    498498                return EOK;
    499         case USB_HUB_FEATURE_PORT_RESET:   /*4*/
     499        case USB_HUB_FEATURE_PORT_RESET:   /* 4 */
    500500                usb_log_debug2("RH(%p-%u): Set port reset.", hub, port);
    501501                EHCI_SET(hub->registers->portsc[port],
     
    503503                //TODO: What if creating the delayed job fails?
    504504                return delayed_job(stop_reset, hub, port);
    505         case USB_HUB_FEATURE_PORT_POWER:   /*8*/
     505        case USB_HUB_FEATURE_PORT_POWER:   /* 8 */
    506506                usb_log_debug2("RH(%p-%u): Set port power.", hub, port);
    507507                EHCI_SET(hub->registers->portsc[port],
  • uspace/drv/bus/usb/ehci/endpoint_list.h

    r1382446 rd1582b50  
    4242#include "hw_struct/queue_head.h"
    4343
    44 /** Structure maintains both EHCI queue and software list of active endpoints.*/
     44/** Structure maintains both EHCI queue and software list of active endpoints. */
    4545typedef struct endpoint_list {
    4646        /** Guard against add/remove races */
  • uspace/drv/bus/usb/ohci/endpoint_list.h

    r1382446 rd1582b50  
    4444#include "hw_struct/endpoint_descriptor.h"
    4545
    46 /** Structure maintains both OHCI queue and software list of active endpoints.*/
     46/** Structure maintains both OHCI queue and software list of active endpoints. */
    4747typedef struct endpoint_list {
    4848        /** Guard against add/remove races */
  • uspace/drv/bus/usb/ohci/hc.c

    r1382446 rd1582b50  
    192192{
    193193        assert(instance);
    194         /* TODO: implement*/
     194        /* TODO: implement */
    195195        return ENOTSUP;
    196196}
     
    595595        }
    596596
    597         /*Init HCCA */
     597        /* Init HCCA */
    598598        instance->hcca = hcca_get();
    599599        if (instance->hcca == NULL)
  • uspace/drv/bus/usb/ohci/ohci_bus.h

    r1382446 rd1582b50  
    6363        dma_buffer_t dma_buffer;
    6464
    65         /** Link in endpoint_list*/
     65        /** Link in endpoint_list */
    6666        link_t eplist_link;
    6767        /** Link in pending_endpoints */
  • uspace/drv/bus/usb/ohci/ohci_regs.h

    r1382446 rd1582b50  
    261261/** Number of downstream ports, max 15 */
    262262#define RHDA_NDS_MASK  (0xff)
    263 /** Power switching mode: 0-global, 1-per port*/
     263/** Power switching mode: 0-global, 1-per port */
    264264#define RHDA_PSM_FLAG  (1 << 8)
    265 /** No power switch: 1-power on, 0-use PSM*/
     265/** No power switch: 1-power on, 0-use PSM */
    266266#define RHDA_NPS_FLAG  (1 << 9)
    267267/** 1-Compound device, must be 0 */
     
    317317#define RHS_LPSC_FLAG (1 << 16)
    318318#define RHS_SET_GLOBAL_POWER RHS_LPSC_FLAG /* synonym for the above */
    319 /** Over-current change indicator*/
     319/** Over-current change indicator */
    320320#define RHS_OCIC_FLAG (1 << 17)
    321321#define RHS_CLEAR_DRWE (1 << 31)
     
    327327 */
    328328
    329 /** r: current connect status, w: 1-clear port enable, 0-N/S*/
     329/** r: current connect status, w: 1-clear port enable, 0-N/S */
    330330#define RHPS_CCS_FLAG (1 << 0)
    331331#define RHPS_CLEAR_PORT_ENABLE RHPS_CCS_FLAG
  • uspace/drv/bus/usb/ohci/ohci_rh.c

    r1382446 rd1582b50  
    8787        instance->hub_descriptor.header.max_current = 0;
    8888
    89         /* Device Removable and some legacy 1.0 stuff*/
     89        /* Device Removable and some legacy 1.0 stuff */
    9090        instance->hub_descriptor.rempow[0] =
    9191            (port_desc >> RHDB_DR_SHIFT) & 0xff;
     
    139139        OHCI_CLR(regs->rh_desc_a, RHDA_PSM_FLAG);
    140140
    141         /* Turn off power (hub driver will turn this back on)*/
     141        /* Turn off power (hub driver will turn this back on) */
    142142        OHCI_WR(regs->rh_status, RHS_CLEAR_GLOBAL_POWER);
    143143
     
    348348        /* Enabled features to clear: see page 269 of USB specs */
    349349        switch (feature) {
    350         case USB_HUB_FEATURE_PORT_POWER:          /*8*/
     350        case USB_HUB_FEATURE_PORT_POWER:          /* 8 */
    351351                rhda = OHCI_RD(hub->registers->rh_desc_a);
    352352                /* No power switching */
     
    362362                    RHPS_CLEAR_PORT_POWER);
    363363                return EOK;
    364         case USB2_HUB_FEATURE_PORT_ENABLE:         /*1*/
     364        case USB2_HUB_FEATURE_PORT_ENABLE:         /* 1 */
    365365                OHCI_WR(hub->registers->rh_port_status[port],
    366366                    RHPS_CLEAR_PORT_ENABLE);
    367367                return EOK;
    368368
    369         case USB2_HUB_FEATURE_PORT_SUSPEND:        /*2*/
     369        case USB2_HUB_FEATURE_PORT_SUSPEND:        /* 2 */
    370370                OHCI_WR(hub->registers->rh_port_status[port],
    371371                    RHPS_CLEAR_PORT_SUSPEND);
    372372                return EOK;
    373373
    374         case USB_HUB_FEATURE_C_PORT_CONNECTION:   /*16*/
    375         case USB2_HUB_FEATURE_C_PORT_ENABLE:       /*17*/
    376         case USB2_HUB_FEATURE_C_PORT_SUSPEND:      /*18*/
    377         case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /*19*/
    378         case USB_HUB_FEATURE_C_PORT_RESET:        /*20*/
     374        case USB_HUB_FEATURE_C_PORT_CONNECTION:   /* 16 */
     375        case USB2_HUB_FEATURE_C_PORT_ENABLE:       /* 17 */
     376        case USB2_HUB_FEATURE_C_PORT_SUSPEND:      /* 18 */
     377        case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /* 19 */
     378        case USB_HUB_FEATURE_C_PORT_RESET:        /* 20 */
    379379                usb_log_debug2("Clearing port C_CONNECTION, C_ENABLE, "
    380380                    "C_SUSPEND, C_OC or C_RESET on port %u.", port);
     
    408408
    409409        switch (feature) {
    410         case USB_HUB_FEATURE_PORT_POWER:   /*8*/
     410        case USB_HUB_FEATURE_PORT_POWER:   /* 8 */
    411411                rhda = OHCI_RD(hub->registers->rh_desc_a);
    412412
     
    422422                /* Fall through, for per port power */
    423423                /* Fallthrough */
    424         case USB2_HUB_FEATURE_PORT_ENABLE:  /*1*/
    425         case USB2_HUB_FEATURE_PORT_SUSPEND: /*2*/
    426         case USB_HUB_FEATURE_PORT_RESET:   /*4*/
     424        case USB2_HUB_FEATURE_PORT_ENABLE:  /* 1 */
     425        case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2 */
     426        case USB_HUB_FEATURE_PORT_RESET:   /* 4 */
    427427                usb_log_debug2("Setting port POWER, ENABLE, SUSPEND or RESET "
    428428                    "on port %u.", port);
  • uspace/drv/bus/usb/uhci/hc.c

    r1382446 rd1582b50  
    188188
    189189                if (instance->hw_failures < UHCI_ALLOWED_HW_FAIL) {
    190                         /* reinitialize hw, this triggers virtual disconnect*/
     190                        /* reinitialize hw, this triggers virtual disconnect */
    191191                        hc_init_hw(instance);
    192192                } else {
  • uspace/drv/bus/usb/usbhub/usbhub.h

    r1382446 rd1582b50  
    6161        /** Speed of the hub */
    6262        usb_speed_t speed;
    63         /** Generic usb device data*/
     63        /** Generic usb device data */
    6464        usb_device_t *usb_device;
    6565        /** Data polling handle. */
  • uspace/drv/bus/usb/xhci/hc.c

    r1382446 rd1582b50  
    886886        }
    887887
    888         /* Issue configure endpoint command (sec 4.3.5). */
     888        /* Issue configure endpoint command (sec 4.3.5).  */
    889889        dma_buffer_t ictx_dma_buf;
    890890        if ((err = create_configure_ep_input_ctx(dev, &ictx_dma_buf)))
     
    928928        xhci_cmd_t cmd;
    929929
    930         /* Issue configure endpoint command (sec 4.3.5). */
     930        /* Issue configure endpoint command (sec 4.3.5).  */
    931931        dma_buffer_t ictx_dma_buf;
    932932        errno_t err = create_configure_ep_input_ctx(dev, &ictx_dma_buf);
     
    957957                return EOK;
    958958
    959         /* Issue configure endpoint command (sec 4.3.5) with the DC flag. */
     959        /* Issue configure endpoint command (sec 4.3.5) with the DC flag.  */
    960960        xhci_cmd_init(&cmd, XHCI_CMD_CONFIGURE_ENDPOINT);
    961961        cmd.slot_id = dev->slot_id;
     
    981981        xhci_cmd_t cmd;
    982982
    983         /* Issue configure endpoint command (sec 4.3.5). */
     983        /* Issue configure endpoint command (sec 4.3.5).  */
    984984        dma_buffer_t ictx_dma_buf;
    985985        errno_t err = create_configure_ep_input_ctx(dev, &ictx_dma_buf);
     
    10201020                return EOK;
    10211021
    1022         /* Issue configure endpoint command (sec 4.3.5). */
     1022        /* Issue configure endpoint command (sec 4.3.5).  */
    10231023        dma_buffer_t ictx_dma_buf;
    10241024        errno_t err = create_configure_ep_input_ctx(dev, &ictx_dma_buf);
Note: See TracChangeset for help on using the changeset viewer.