hi...
    guess i dint get accross correctly...this is what i do...
      -  to start with the driver is up,usb device is attached and data transfer happens
      -  now i remove the driver module(i have the device attached, i dont increment the MOD COUNT in
the probe,so u are allowed to remove the driver module even with the device attached)
      -  in the module's cleanup routine, i unregister the usb device which causes the diconnect routine to be
invoked(with the device still attached)
      -  Now when i physically detach the device, a null pointer exception happens. An attempt is probably made
by usb core to invoke the 'disconnect' function which is not there!!(since the driver module has been removed)
 
       My point is, since the device has been unregistered, detaching a device should not have any effect right??
am i doing something obviously wrong in the above steps.
 
        do usb drivers in general expect the device to be detached before the driver module is removed?
i have a requirement where the user should be allowed to remove the usb driver module with the usb device attached,
and also cleanly:)
 
regards
avinash
 
 
 
"Because i live in a large tin can and i work in an egg carton Flirting is the only joy i have:)"
----- Original Message -----
Sent: Friday, May 24, 2002 8:25 PM
Subject: Re: [linux-usb-devel] disconnect called after driver deregister!!

>     I have my usb driver as a linux module. the problem i have is this -
> i forcefully remove the module when the usb
> device is attached...

Presumably you mean "detached"?


 >  a proper cleanup happens and the device is
> unregistered succesfully...

That should happen regardless of whether you "rmmod" or not.

The USB subsystem handles the USB level "device" (which you
might see as /proc/bus/usb/002/019 or similar), and your
driver handles any char/block /dev entry when it gets the
disconnect() callback.


 >    but the problem is even
> after doing this, removal of device causes a core dump(NULL pointer
> reference in kernel)...

Your scenario seems to be internally inconsistent, since
you just said you removed everything (module and device),
then without adding anything back you removed something.

Unless you're incorrect about the cleanup, and it didn't
actually work right.

- Dave


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to