Re: [BUG] cdc-acm driver module

From: vijay anand
Date: Thu May 22 2008 - 01:00:01 EST


Hi Oliver,

Thank you very much for replying.

Given below is the snip from '\linux-2.6.25\drivers\usb\core\driver.c'
for 'usb_driver_release_interface'

****SNIP*****
* This can be used by drivers to release an interface without waiting
* for their disconnect() methods to be called. In typical cases this
* also causes the driver disconnect() method to be called.
****END*****

What happens when the function 'usb_deregister' in 'acm_exit' gets
called before the control reaches the 'acm_disconnect'? Is there any
possibility for this? If yes what happens during this scenario?

Thanks,
VJ



On Wed, May 21, 2008 at 6:55 PM, Oliver Neukum <oliver@xxxxxxxxxx> wrote:
> Am Mittwoch 21 Mai 2008 15:01:21 schrieb vijay anand:
>> What happens when the control never reaches the 'acm_disconnect'. Like simply
>> loading the driver and unloading the driver when the device is still in use.
>
> Even in this case disconnect() will be called.
> The only time it will not be called is if probe() was never called. But
> in that case no interface has been claimed. All is well.
>
> Regards
> Oliver
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/