Changes in / [2df648c2:ed0cc81] in mainline


Ignore:
Location:
uspace
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkbd/main.c

    r2df648c2 red0cc81  
    212212        }
    213213       
    214         //char *devpath = argv[1];
    215         const char *devpath = "/hw/pci0/00:06.0/ohci-rh/usb00_a2/HID1/hid";
     214        char *devpath = argv[1];
     215        //const char *devpath = "/hw/pci0/00:06.0/ohci-rh/usb00_a2/HID1/hid";
    216216       
    217217        int rc;
     
    297297                }
    298298               
    299                 async_usleep(100000);
     299                async_usleep(10000);
    300300        }
    301301       
  • uspace/drv/ohci/root_hub.c

    r2df648c2 red0cc81  
    6161        .vendor_id = 0x16db,
    6262        .product_id = 0x0001,
    63         /// \TODO these values migt be different
    6463        .str_serial_number = 0,
    6564        .usb_spec_version = 0x110,
     
    119118static const uint32_t hub_clear_feature_by_writing_one_mask =
    120119   RHS_CLEAR_PORT_POWER;
    121    // 1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER;
    122120
    123121/**
     
    127125    RHS_LPSC_FLAG |
    128126    RHS_OCIC_FLAG;
    129     //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) |
    130     //(1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
    131127
    132128/**
     
    135131static const uint32_t hub_set_feature_direct_mask =
    136132    RHS_SET_PORT_POWER;
    137     //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
    138133
    139134/**
     
    160155    RHPS_PRSC_FLAG;
    161156
    162 /*
    163 
    164     (1 << USB_HUB_FEATURE_PORT_CONNECTION) |
    165     (1 << USB_HUB_FEATURE_PORT_SUSPEND) |
    166     (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) |
    167     (1 << USB_HUB_FEATURE_PORT_POWER) |
    168     (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
    169     (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
    170     (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) |
    171     (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    172     (1 << USB_HUB_FEATURE_C_PORT_RESET);
    173  */
    174157//note that USB_HUB_FEATURE_PORT_POWER bit is translated into
    175158//USB_HUB_FEATURE_PORT_LOW_SPEED for port set feature request
     
    179162 */
    180163static const uint32_t port_status_change_mask = RHPS_CHANGE_WC_MASK;
    181 /*    (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
    182     (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
    183     (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    184     (1 << USB_HUB_FEATURE_C_PORT_RESET) |
    185     (1 << USB_HUB_FEATURE_C_PORT_SUSPEND);
    186 */
    187164
    188165static int create_serialized_hub_descriptor(rh_t *instance);
     
    433410        if (port < 1 || port > instance->port_count)
    434411                return EINVAL;
    435         uint32_t * uint32_buffer = (uint32_t*) request->data_buffer;
    436412        request->transfered_size = 4;
    437         uint32_buffer[0] = instance->registers->rh_port_status[port - 1];
     413        uint32_t data = instance->registers->rh_port_status[port - 1];
     414        memcpy(request->data_buffer,&data,4);
    438415#if 0
    439416        int i;
     
    462439static int process_get_hub_status_request(rh_t *instance,
    463440    usb_transfer_batch_t * request) {
    464         uint32_t * uint32_buffer = (uint32_t*) request->data_buffer;
     441        //uint32_t * uint32_buffer = (uint32_t*) request->data_buffer;
    465442        request->transfered_size = 4;
    466443        //bits, 0,1,16,17
    467444        uint32_t mask = 1 | (1 << 1) | (1 << 16) | (1 << 17);
    468         uint32_buffer[0] = mask & instance->registers->rh_status;
     445        uint32_t data = mask & instance->registers->rh_status;
     446        //uint32_buffer[0] = mask & instance->registers->rh_status;
     447        memcpy(request->data_buffer,&data,4);
    469448
    470449        return EOK;
     
    520499            | (1 << (USB_HUB_FEATURE_C_HUB_OVER_CURRENT + 16));
    521500        bzero(bitmap, instance->interrupt_mask_size);
    522         if (instance->registers->rh_status & mask) {
     501        if ((instance->registers->rh_status & mask) !=0 ) {
    523502                bitmap[0] = 1;
    524503        }
     
    526505        mask = port_status_change_mask;
    527506        for (port = 1; port <= instance->port_count; ++port) {
    528                 if (mask & instance->registers->rh_port_status[port - 1]) {
     507                if ((mask & instance->registers->rh_port_status[port - 1]) != 0) {
    529508
    530509                        bitmap[(port) / 8] += 1 << (port % 8);
  • uspace/drv/usbhid/mouse/mousedev.c

    r2df648c2 red0cc81  
    234234       
    235235        if (mouse_dev->mouse_phone < 0) {
    236                 usb_log_error(NAME " No console phone.\n");
    237                 return false;   // ??
     236                usb_log_warning(NAME " No console phone.\n");
     237                return true;
    238238        }
    239239
  • uspace/drv/usbhub/usbhub.c

    r2df648c2 red0cc81  
    440440 *
    441441 * The change can be either in the over-current condition or
    442  * local-power lost condition.
     442 * local-power change.
    443443 * @param hub_info hub instance
    444444 */
  • uspace/lib/drv/include/remote_pci.h

    r2df648c2 red0cc81  
    3636#define LIBDRV_REMOTE_PCI_H_
    3737
    38 remote_iface_t remote_pci_iface;
     38extern remote_iface_t remote_pci_iface;
    3939
    4040#endif
  • uspace/lib/drv/include/remote_usb.h

    r2df648c2 red0cc81  
    3636#define LIBDRV_REMOTE_USB_H_
    3737
    38 remote_iface_t remote_usb_iface;
     38extern remote_iface_t remote_usb_iface;
    3939
    4040#endif
  • uspace/lib/drv/include/remote_usbhc.h

    r2df648c2 red0cc81  
    3636#define LIBDRV_REMOTE_USBHC_H_
    3737
    38 remote_iface_t remote_usbhc_iface;
     38extern remote_iface_t remote_usbhc_iface;
    3939
    4040#endif
Note: See TracChangeset for help on using the changeset viewer.