usb deferred probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



here's a question for the usb core people;

how does one defer the probing of one usb interface until another usb
interface on the same device has already been probed/

as an example, take a look at the wireless usb / uwb code. in
drivers/usb/host/hwa-hc.c . hwahc-create [called from hwahc-probe]
dies if it cannot find an uwb-rc structure in its grandparent. this
uwb-rc structure is created in drivers/uwb/ the problem is, that the
uwb-rc structure should always be created before the hwa-hc is probed.
in reality, in almost never is [with my hardware in any case] so
module autoloading always fails. the uwb-rc structure is created in
drivers/uwb/hwa-rc.c [hwarc-probe].

so far i've tried relinquishing control in hwahc-create [using
schedule] and waiting for some number of tried, but that does not
work. i also tried inserting and exporting a dummy function in
hwa-rc.ko, which would be called from probe in hwa-hc.ko, which would
correct the module dependency, but that did not work either.

does this have anything to do with the 'needs_binding' or
'needs_altsetting0' flags/

the output of lsusb is below, for reference [the unrecognized bit is
the wire-adapter interface descriptor].

cheers,

c

ps; please excuse my lack of capital letters and various other proper
punctuation - the vmware player has decided to remap the keyboard of
my host system and i can't use the shift anymore, among other things.


us 005 Device 015: ID 13cf:1200 Wisair Ltd.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         2 Wire Adapter Multifunction Peripheral
  bMaxPacketSize0        64
  idVendor           0x13cf Wisair Ltd.
  idProduct          0x1200
  bcdDevice            1.00
  iManufacturer           2
  iProduct                1 Wireless USB Dongle
  iSerial                 3 123456789
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           83
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Security Descriptor:
      bLength                 5
      bDescriptorType        12
      wTotalLength           10
      bNumEncryptionTypes     1
    Encryption Type Descriptor:
      bLength                 5
      bDescriptorType        14
      bEncryptionType         2 UNSECURE
      bEncryptionValue        1
      bAuthKeyIndex           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      2 Wireless USB Wire Adapter
      bInterfaceProtocol      1 Host Wire Adapter Control/Data Streaming
      iInterface              0
      ** UNRECOGNIZED:  0e 21 00 01 05 00 10 00 10 02 0d 00 0a 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      2 Ultra WideBand Radio Control
      iInterface              0
      Radio Control Interface Class Descriptor:
        bLength                 4
        bDescriptorType        35
        bcdRCIVersion        1.00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         2 Wire Adapter Multifunction Peripheral
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux