Changeset 6626bba9 in mainline


Ignore:
Timestamp:
2011-10-12T19:04:00Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
205f0766
Parents:
196fbb0
Message:

usbhub: Rename usb_hub_info ⇒ usb_hub_dev.

Location:
uspace/drv/bus/usb/usbhub
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.c

    r196fbb0 r6626bba9  
    5050/** Information for fibril for device discovery. */
    5151struct add_device_phase1 {
    52         usb_hub_info_t *hub;
     52        usb_hub_dev_t *hub;
    5353        usb_hub_port_t *port;
    5454        usb_speed_t speed;
     
    5656
    5757static void usb_hub_port_removed_device(usb_hub_port_t *port,
    58     usb_hub_info_t *hub);
     58    usb_hub_dev_t *hub);
    5959static void usb_hub_port_reset_completed(usb_hub_port_t *port,
    6060    usb_port_status_t status);
     
    6262static int enable_port_callback(int port_no, void *arg);
    6363static int add_device_phase1_worker_fibril(void *arg);
    64 static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_info_t *hub,
     64static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
    6565    usb_speed_t speed);
    6666
     
    130130 * @param port port number, starting from 1
    131131 */
    132 void usb_hub_port_process_interrupt(usb_hub_port_t *port, usb_hub_info_t *hub)
     132void usb_hub_port_process_interrupt(usb_hub_port_t *port, usb_hub_dev_t *hub)
    133133{
    134134        assert(port);
     
    249249 */
    250250static void usb_hub_port_removed_device(usb_hub_port_t *port,
    251     usb_hub_info_t *hub)
     251    usb_hub_dev_t *hub)
    252252{
    253253        assert(port);
     
    375375 *
    376376 * @param port_no Port number (starting at 1).
    377  * @param arg Custom argument, points to @c usb_hub_info_t.
     377 * @param arg Custom argument, points to @c usb_hub_dev_t.
    378378 * @return Error code.
    379379 */
     
    463463 * @return Error code.
    464464 */
    465 static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_info_t *hub,
     465static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
    466466    usb_speed_t speed)
    467467{
  • uspace/drv/bus/usb/usbhub/port.h

    r196fbb0 r6626bba9  
    4040#include <usb/classes/hub.h>
    4141
    42 typedef struct usb_hub_info usb_hub_info_t;
     42typedef struct usb_hub_dev usb_hub_dev_t;
    4343
    4444/** Information about single port on a hub. */
     
    7878
    7979void usb_hub_port_reset_fail(usb_hub_port_t *port);
    80 void usb_hub_port_process_interrupt(usb_hub_port_t *port, usb_hub_info_t *hub);
     80void usb_hub_port_process_interrupt(usb_hub_port_t *port, usb_hub_dev_t *hub);
    8181int usb_hub_port_clear_feature(
    8282    usb_hub_port_t *port, usb_hub_class_feature_t feature);
  • uspace/drv/bus/usb/usbhub/usbhub.c

    r196fbb0 r6626bba9  
    6868
    6969static int usb_set_first_configuration(usb_device_t *usb_device);
    70 static usb_hub_info_t * usb_hub_info_create(usb_device_t *usb_dev);
    71 static int usb_hub_process_hub_specific_info(usb_hub_info_t *hub_info);
    72 static void usb_hub_over_current(const usb_hub_info_t *hub_info,
     70static usb_hub_dev_t * usb_hub_dev_create(usb_device_t *usb_dev);
     71static int usb_hub_process_hub_specific_info(usb_hub_dev_t *hub_info);
     72static void usb_hub_over_current(const usb_hub_dev_t *hub_info,
    7373    usb_hub_status_t status);
    74 static void usb_hub_global_interrupt(const usb_hub_info_t *hub_info);
     74static void usb_hub_global_interrupt(const usb_hub_dev_t *hub_info);
    7575static void usb_hub_polling_terminated_callback(usb_device_t *device,
    7676    bool was_error, void *data);
     
    100100        assert(usb_dev);
    101101        /* Create driver soft-state structure */
    102         usb_hub_info_t *hub_info = usb_hub_info_create(usb_dev);
     102        usb_hub_dev_t *hub_info = usb_hub_dev_create(usb_dev);
    103103        if (hub_info == NULL) {
    104104                usb_log_error("Failed to create hun driver structure.\n");
     
    174174 * @param change_bitmap Bitmap of changed ports.
    175175 * @param change_bitmap_size Size of the bitmap in bytes.
    176  * @param arg Custom argument, points to @c usb_hub_info_t.
     176 * @param arg Custom argument, points to @c usb_hub_dev_t.
    177177 * @return Whether to continue polling.
    178178 */
     
    181181{
    182182        usb_log_debug("hub_port_changes_callback\n");
    183         usb_hub_info_t *hub = arg;
     183        usb_hub_dev_t *hub = arg;
    184184        assert(hub);
    185185
     
    207207/*----------------------------------------------------------------------------*/
    208208/**
    209  * create usb_hub_info_t structure
     209 * create usb_hub_dev_t structure
    210210 *
    211211 * Does only basic copying of known information into new structure.
    212212 * @param usb_dev usb device structure
    213  * @return basic usb_hub_info_t structure
    214  */
    215 static usb_hub_info_t * usb_hub_info_create(usb_device_t *usb_dev)
     213 * @return basic usb_hub_dev_t structure
     214 */
     215static usb_hub_dev_t * usb_hub_dev_create(usb_device_t *usb_dev)
    216216{
    217217        assert(usb_dev);
    218         usb_hub_info_t *info = malloc(sizeof(usb_hub_info_t));
     218        usb_hub_dev_t *info = malloc(sizeof(usb_hub_dev_t));
    219219        if (!info)
    220220            return NULL;
     
    241241 * @return error code
    242242 */
    243 static int usb_hub_process_hub_specific_info(usb_hub_info_t *hub_info)
     243static int usb_hub_process_hub_specific_info(usb_hub_dev_t *hub_info)
    244244{
    245245        assert(hub_info);
     
    359359 * @return error code
    360360 */
    361 static void usb_hub_over_current(const usb_hub_info_t *hub_info,
     361static void usb_hub_over_current(const usb_hub_dev_t *hub_info,
    362362    usb_hub_status_t status)
    363363{
     
    398398 * @param hub_info hub instance
    399399 */
    400 static void usb_hub_global_interrupt(const usb_hub_info_t *hub_info)
     400static void usb_hub_global_interrupt(const usb_hub_dev_t *hub_info)
    401401{
    402402        assert(hub_info);
     
    459459 * @param device usb device afected
    460460 * @param was_error indicates that the fibril is stoped due to an error
    461  * @param data pointer to usb_hub_info_t structure
     461 * @param data pointer to usb_hub_dev_t structure
    462462 */
    463463static void usb_hub_polling_terminated_callback(usb_device_t *device,
    464464    bool was_error, void *data)
    465465{
    466         usb_hub_info_t *hub = data;
     466        usb_hub_dev_t *hub = data;
    467467        assert(hub);
    468468
  • uspace/drv/bus/usb/usbhub/usbhub.h

    r196fbb0 r6626bba9  
    5252
    5353/** Information about attached hub. */
    54 struct usb_hub_info {
     54struct usb_hub_dev {
    5555        /** Number of ports. */
    5656        size_t port_count;
    57 
    58         /** Attached device handles, for each port one */
     57        /** Port structures, one for each port */
    5958        usb_hub_port_t *ports;
    60 
    6159        /** Connection to hcd */
    6260        usb_hc_connection_t connection;
    63 
    6461        /** Generic usb device data*/
    6562        usb_device_t *usb_device;
     
    7673        /** Condition variable for pending_ops_count. */
    7774        fibril_condvar_t pending_ops_cv;
     75        /** Pointer to devman usbhub function. */
    7876        ddf_fun_t *hub_fun;
    7977};
Note: See TracChangeset for help on using the changeset viewer.