Changes in / [3746bfe:00b13408] in mainline


Ignore:
Location:
uspace
Files:
4 edited

Legend:

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

    r3746bfe r00b13408  
    405405        //if this hub already uses default address, it cannot request it once more
    406406        if(hub->is_default_address_used) return;
    407         int opResult = usb_hub_clear_port_feature(&hub->endpoints.control,
    408                                 port, USB_HUB_FEATURE_C_PORT_CONNECTION);
    409         if(opResult != EOK){
    410                 usb_log_warning("could not clear port-change-connection flag");
    411         }
    412407
    413408        usb_device_request_setup_packet_t request;
     409        int opResult;
    414410        usb_log_info("some connection changed");
    415411        assert(hub->endpoints.control.hc_phone);
     
    435431                usb_hub_release_default_address(hub);
    436432        }
    437         return;
    438433}
    439434
     
    536531static void usb_hub_removed_device(
    537532    usb_hub_info_t * hub,uint16_t port) {
    538 
    539         int opResult = usb_hub_clear_port_feature(&hub->endpoints.control,
    540                                 port, USB_HUB_FEATURE_C_PORT_CONNECTION);
    541         if(opResult != EOK){
    542                 usb_log_warning("could not clear port-change-connection flag");
    543         }
     533               
    544534        /** \TODO remove device from device manager - not yet implemented in
    545535         * devide manager
     
    621611        //something connected/disconnected
    622612        if (usb_port_connect_change(&status)) {
     613                opResult = usb_hub_clear_port_feature(pipe,
     614                    port, USB_HUB_FEATURE_C_PORT_CONNECTION);
     615                // TODO: check opResult
    623616                if (usb_port_dev_connected(&status)) {
    624617                        usb_log_info("some connection changed");
  • uspace/drv/usbmouse/init.c

    r3746bfe r00b13408  
    124124                goto leave;
    125125        }
    126        
    127         /* Open the control pipe. */
    128         rc = usb_endpoint_pipe_start_session(&dev->ctrl_pipe);
    129         if (rc != EOK) {
    130                 goto leave;
    131         }
    132        
    133         /* Set the boot protocol. */
    134         rc = usb_control_request_set(&dev->ctrl_pipe,
    135             USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
    136             USB_HIDREQ_SET_PROTOCOL, USB_HID_PROTOCOL_BOOT, dev->interface_no,
    137             NULL, 0);
    138         if (rc != EOK) {
    139                 goto leave;
    140         }
    141        
    142         /* Close the control pipe (ignore errors). */
    143         usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
    144 
    145126
    146127        /* Everything allright. */
  • uspace/lib/usb/include/usb/devdrv.h

    r3746bfe r00b13408  
    4747         */
    4848        usb_endpoint_mapping_t *pipes;
    49         /** Current interface.
    50          * Usually, drivers operate on single interface only.
    51          * This item contains the value of the interface or -1 for any.
    52          */
    53         int interface_no;
    5449        /** Generic DDF device backing this one. */
    5550        ddf_dev_t *ddf_dev;
  • uspace/lib/usb/src/devdrv.c

    r3746bfe r00b13408  
    109109{
    110110        int rc;
    111         dev->interface_no = usb_device_get_assigned_interface(dev->ddf_dev);
     111        int my_interface = usb_device_get_assigned_interface(dev->ddf_dev);
    112112
    113113        size_t pipe_count = count_other_pipes(drv);
     
    134134
    135135                dev->pipes[i].description = drv->endpoints[i];
    136                 dev->pipes[i].interface_no = dev->interface_no;
     136                dev->pipes[i].interface_no = my_interface;
    137137        }
    138138
Note: See TracChangeset for help on using the changeset viewer.