root_hub.c File Reference

OHCI driver. More...

#include <assert.h>
#include <errno.h>
#include <str_error.h>
#include <usb/debug.h>
#include "root_hub.h"
#include <usb/classes/classes.h>
#include <usb/dev/driver.h>
#include "ohci_regs.h"
#include <usb/dev/request.h>
#include <usb/classes/hub.h>

Go to the source code of this file.

Functions

static void create_interrupt_mask_in_instance (rh_t *instance)
 create answer to status interrupt consisting of change bitmap
static int create_serialized_hub_descriptor (rh_t *instance)
 Create hub descriptor used in hub-driver <-> hub communication.
static bool is_zeros (void *buffer, size_t size)
 return whether the buffer is full of zeros
static int process_address_set_request (rh_t *instance, uint16_t address)
 register address to this device
static int process_ctrl_request (rh_t *instance, usb_transfer_batch_t *request)
 process hub control request
static int process_get_configuration_request (rh_t *instance, usb_transfer_batch_t *request)
 answer to get configuration request
static int process_get_descriptor_request (rh_t *instance, usb_transfer_batch_t *request)
 create answer to a descriptor request
static int process_get_hub_status_request (rh_t *instance, usb_transfer_batch_t *request)
 create answer to port status_request
static int process_get_port_status_request (rh_t *instance, uint16_t port, usb_transfer_batch_t *request)
 create answer to port status_request
static int process_get_status_request (rh_t *instance, usb_transfer_batch_t *request)
 create answer to status request
static int process_hub_feature_clear_request (rh_t *instance, uint16_t feature)
 process feature-disabling request on hub
static int process_hub_feature_set_request (rh_t *instance, uint16_t feature)
 process feature-enabling request on hub
static int process_interrupt_mask_in_instance (rh_t *instance, usb_transfer_batch_t *request)
 process hanging interrupt request
static int process_port_feature_clear_request (rh_t *instance, uint16_t feature, uint16_t port)
 process feature-disabling request on hub
static int process_port_feature_set_request (rh_t *instance, uint16_t feature, uint16_t port)
 process feature-enabling request on hub
static int process_request_with_input (rh_t *instance, usb_transfer_batch_t *request)
 process one of requests that carry input data
static int process_request_with_output (rh_t *instance, usb_transfer_batch_t *request)
 process one of requests that requere output data
static int process_request_without_data (rh_t *instance, usb_transfer_batch_t *request)
 process one of requests that do not request nor carry additional data
int rh_init (rh_t *instance, ohci_regs_t *regs)
 Root hub initialization.
static int rh_init_descriptors (rh_t *instance)
 initialize hub descriptors
void rh_interrupt (rh_t *instance)
 process interrupt on a hub
int rh_request (rh_t *instance, usb_transfer_batch_t *request)
 process root hub request

Variables

static const uint32_t hub_clear_feature_by_writing_one_mask
 bitmask of hub features that are cleared by writing 1 (and not 0)
static const uint32_t hub_clear_feature_valid_mask
 bitmask of hub features that are valid to be cleared
static const uint32_t hub_set_feature_direct_mask
 bitmask of hub features that are set by writing 1 and cleared by writing 0
static const uint32_t hub_set_feature_valid_mask
 bitmask of hub features that are valid to be set
static const usb_standard_configuration_descriptor_t ohci_rh_conf_descriptor
 standart configuration descriptor with filled common values for ohci root hubs
static const usb_standard_device_descriptor_t ohci_rh_device_descriptor
 standart device descriptor for ohci root hub
static const usb_standard_endpoint_descriptor_t ohci_rh_ep_descriptor
 standart ohci root hub endpoint descriptor
static const usb_standard_interface_descriptor_t ohci_rh_iface_descriptor
 standart ohci root hub interface descriptor
static const uint32_t port_clear_feature_valid_mask
 bitmask of port features that can be cleared
static const uint32_t port_set_feature_valid_mask
 bitmask of port features that are valid to be set
static const uint32_t port_status_change_mask = RHPS_CHANGE_WC_MASK
 bitmask with port status changes


Detailed Description

OHCI driver.

Definition in file root_hub.c.


Generated on Thu Jun 2 07:45:51 2011 for HelenOS/USB by  doxygen 1.4.7