Hello!

I am currently trying to write a driver for a wireless usb adapter. There
already is a driver existing, but it is buggy, the code is messy, and
so I do not even want to try to fix it. So I thought this is a good
opportunity to learn writing device drivers.

The driver needs to load a (propritary) firmware to the device. I do
this in the probe() function, and the first part of it works. After
downloading, it has to call usb_reset_device() (at least the old
driver does). When I do this, the driver hangs. 

Before the reset, there are a lot of calls to usb_control_msg(), all
of them work as expected. Then it sleeps for 2 seconds, using

    set_current_state(TASK_INTERRUPTIBLE);
    schedule_timeout(2*HZ);

Shortly after that, usb_reset_device() is called, and it hangs.

I haven't set any locks.

Where do I have to search for the problem? Is it the device (maybe
the firmware isn't uploaded correctly (though I have checked
repeatedly)). BTW, is it true that the 'data' argument in usb_control_msg()
has to point to kmalloc'ed memory? I previously used static memory, but I
got problems.

I am searching for two full days now...

I am using the uhci driver, kernel 2.4.20, same probs with 2.4.19.

Greetings,
Oliver
-- 
Oh my, the stars!
       me, first time I stared at the night sky with my new contact lenses

Attachment: msg09967/pgp00000.pgp
Description: PGP signature

Reply via email to