Who looked at the code?

it0
2004-03-10
2004-05-30
  • it0
    it0
    2004-03-10

    As it didn't work for me after I blindly installed the usb/hub patch I started to have a look at the code.

    The function usb_new_device2 is a copy of usb_new_device with some modifications.

    The only thing that has changed in that function in 2.4.25 is the removal of line usb_free_dev(dev) , which is not really important.

    But looking at the modified code, it just doesn't make sense. They set the devicenum to 0 then run usb_get_descriptor which is no use as devicenum is 0. Then they set the old address back and start continuing with the old code.

    My conclusion is that there should be no added benefit of usb_new_device2 as it only brings more crappy checks.

    I'm recompiling my kernel to see if it works better without the usb/hub patch.

     
    • it0
      it0
      2004-03-11

      I made a patch that should replace patching of usb.c and hub.c and should be compatible for all of the 2.4.x kernels, mine is from 2.4.25 and it works for me.

      download it from here
      http://thuis.zwanebloem.nl/zydas_usb_patch.diff

      go to /usr/src/linux/drivers/usb

      and type patch -p0<zydas_usb_patch.diff

      If it didn't work with the patches before, it shouldn't work with this one, it's just easier to read/maintain..

      I'm still looking for a nicer implementation then the gues from sweex did.

       
      • Thanks for this patch, I'll use it for future builds and kernels.

         
    • Ruud
      Ruud
      2004-05-30

      It seems the in kernel USB code got improved/fixed
      in 2.4.26 because I managed to get my Sweex adapter
      working on 2.4.26 WITHOUT any usb.c/hub.c patches.

      The problem on earlier kernels ws that the adapter
      wasn't accepting the address
      "device not accepting address 2, error -71"
      and this was retried several times until usb subsystem
      gave up.

      Now on 2.4.26 (and 2.6.6 for that matter) it refuses
      to take the 1st address but than accepts the 2nd.

      Now the only thing is to get the driver into wlan-ng so
      it will work with 2.6.x :-)

       
      • Hi Ruud,

        It already worked with some of the sweex sticks. I've one that is detected with 2.6.5, and one that doesn't. See the other forum for the merge work with wlan-ng.

        Kind regards,
                            Dennis