Print this page
5832 EOF wireless usb (aka UWB)
Reviewed by: TBD
Reviewed by: TBD
Approved by: TBD

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/usb/usba/hubdi.c
          +++ new/usr/src/uts/common/io/usb/usba/hubdi.c
↓ open down ↓ 589 lines elided ↑ open up ↑
 590  590  static usb_event_t hubd_events = {
 591  591          hubd_disconnect_event_cb,
 592  592          hubd_reconnect_event_cb,
 593  593          hubd_pre_suspend_event_cb,
 594  594          hubd_post_resume_event_cb
 595  595  };
 596  596  
 597  597  
 598  598  /*
 599  599   * hubd_get_soft_state() returns the hubd soft state
 600      - *
 601      - * WUSB support extends this function to support wire adapter class
 602      - * devices. The hubd soft state for the wire adapter class device
 603      - * would be stored in usb_root_hubd field of the usba_device structure,
 604      - * just as the USB host controller drivers do.
 605  600   */
 606  601  hubd_t *
 607  602  hubd_get_soft_state(dev_info_t *dip)
 608  603  {
 609  604          if (dip == NULL) {
 610  605  
 611  606                  return (NULL);
 612  607          }
 613  608  
 614      -        if (usba_is_root_hub(dip) || usba_is_wa(dip)) {
      609 +        if (usba_is_root_hub(dip)) {
 615  610                  usba_device_t *usba_device = usba_get_usba_device(dip);
 616  611  
 617  612                  return (usba_device->usb_root_hubd);
 618  613          } else {
 619  614                  int instance = ddi_get_instance(dip);
 620  615  
 621  616                  return (ddi_get_soft_state(hubd_statep, instance));
 622  617          }
 623  618  }
 624  619  
↓ open down ↓ 5834 lines elided ↑ open up ↑
6459 6454                      "hubd_delete_child:\n\t"
6460 6455                      "dip = 0x%p (%s) at port %d",
6461 6456                      (void *)child_dip, ddi_node_name(child_dip), port);
6462 6457  
6463 6458                  if (usba_device) {
6464 6459                          usba_hubdi_incr_power_budget(hubd->h_dip, usba_device);
6465 6460                  }
6466 6461  
6467 6462                  rval = usba_destroy_child_devi(child_dip, flag);
6468 6463  
6469      -                if ((rval != USB_SUCCESS) && usba_is_hwa(child_dip)) {
6470      -                        /*
6471      -                         * This is only useful for HWA device node.
6472      -                         * Since hwahc interface must hold hwarc interface
6473      -                         * open until hwahc is detached, the first call to
6474      -                         * ndi_devi_unconfig_one() can only offline hwahc
6475      -                         * driver but not hwarc driver. Need to make a second
6476      -                         * call to ndi_devi_unconfig_one() to make the hwarc
6477      -                         * driver detach.
6478      -                         */
6479      -                        rval = usba_destroy_child_devi(child_dip, flag);
6480      -                }
6481      -
6482 6464                  if ((rval == USB_SUCCESS) && (flag & NDI_DEVI_REMOVE)) {
6483 6465                          /*
6484 6466                           * if the child was still < DS_INITIALIZED
6485 6467                           * then our bus_unconfig was not called and
6486 6468                           * we have to zap the child here
6487 6469                           */
6488 6470                          mutex_enter(HUBD_MUTEX(hubd));
6489 6471                          if (hubd->h_children_dips[port] == child_dip) {
6490 6472                                  usba_device_t *ud =
6491 6473                                      hubd->h_usba_devices[port];
↓ open down ↓ 2619 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX