usbatm : modprobe & rmmod

Roman Kagan rkagan at
Tue Jan 25 10:35:13 EST 2005

  Hi Matthieu,

On Tue, 2005-01-25 at 14:36 +0100, matthieu castet wrote:
> the eagle-usb firmware is swapped in "PC" memory because it didn't 
> enough memory for all the code...
> So in this case the interface 1 (sending data) is share between usbatm 
> and mini driver.

Hope it is on different endpoints at least :)  Swapping to the host
computer is also a cute idea...  In the "most convoluted design" contest
ADI won.

> Also I like the idea that the refcount is on mini driver, so you can't 
> remove the module, unless all atm connection are closed (I am not sure 
> of this : I only look quickly) and don't like the idea of permanent module.

Well this indeed creates a problem Duncan pointed out: you can't provoke
a disconnect by unloading the minidriver module.  If he figures out how
to make the ATM layer close all the ATM connections at USB disconnect,
then usbatm2 will have another (although minor) benefit of allowing to
unload the whole thing even if there were open ATM connections before
rmmod was called.  With the current usb_atm you can't rmmod the
minidriver until you close all the ATM connections by some other means.

> I have one remark for roman : in your clean method you clean things you 
> init in probe : it is a bit strange.

Umm, how it's supposed to be?  The cleanup function is exactly for that:
it's called when the last reference to the driver instance is dropped,
which may happen well after the USB disconnect.


More information about the Usbatm mailing list