Re: ibmcam usb driver not being called

From: Philip (no_one_at_nowhere.net)
Date: 10/03/04

  • Next message: Kasper Dupont: "Re: exception-handlers"
    Date: Sun, 03 Oct 2004 00:26:47 GMT
    
    

    Phil wrote:
    > I have picked up a Veo Stingray webcam. This thing goes by vend/prod
    > 0x545/0x808b. This matches the ibmcam vendor code, but not precisely the
    > product code, the closest being 0x800d.
    >
    > I have tried modify the ibmcam.c drive to add the product code, but I
    > cannot seem to get the ibmcam_probe function to be called.
    >
    > The question: what could cause the scan for new hardware to not call the
    > driver?
    >
    >
    > My system is 2.4.20-31.9 #1 Tue Apr 13 17:38:16 EDT 2004 i686 athlon
    > i386 GNU/Linux
    >
    > My /proc/bus/usb/devices for the webcam:
    >
    > T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
    > D: Ver= 1.01 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs= 1
    > P: Vendor=0545 ProdID=808b Rev= 3.0c
    > S: Product=USB IMAGING DEVICE
    > C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
    > I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    > E: Ad=81(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    > E: Ad=82(I) Atr=02(Bulk) MxPS= 8 Ivl=0ms
    > I: If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    > E: Ad=81(I) Atr=01(Isoc) MxPS=1022 Ivl=1ms
    > E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

    I have traced the code to usb_find_interface_driver. On line
    726 for (i = 0; i < interface->num_altsetting;
    i++) {
    727 interface->act_altsetting = i;
    728 id = usb_match_id(dev, interface, id);
    729 if (id) {
    730 down(&driver->serialize);
    731 private =
    driver->probe(dev,ifnum,id);
    732 up(&driver->serialize);
    733 if (private != NULL)
    734 break;
    735 }
    736 }

    Looking at the /proc/bus/usb/devices dump, this device lists only one
    interface [C:* #Ifs = 1] and yet the dump shows 2 If#0's. Note the first
    If#0 has Alt=0, whereas the second IF#0 has Alt=1.

    Thus is would seem that find_interface_drive would be called once for
    the first If#0, and the for loop on line 726 would not execute as the
    first IF#0 has Alt=0. Thus the probe function would never be called from
      line 731.

    So is this USB webcam screwy and and that is why my ibmcam_probe driver
    function never gets called?


  • Next message: Kasper Dupont: "Re: exception-handlers"