usbatm : modprobe & rmmod

Roman Kagan rkagan at
Mon Jan 24 09:13:33 EST 2005

  Hi Duncan,

On Mon, Jan 24, 2005 at 02:08:44PM +0100, Duncan Sands wrote:
> > > I didn't fix up cxacru yet, sorry.
> > 
> > Don't worry, I'll catch up as soon as the API hits the CVS.
> I was planning on giving it a go this afternoon.  Why don't we both have
> a go, then mix and match? :)

I'm not that quick :)  Besides, I'll need to adjust to the new API.

> The code now shoots down the kernel thread if the usb device is disconnected
> (which means you should check kthread_should_stop every now and again during
> firmware initialization - see kthread.h), so this is no longer a problem either.

Yes I thought about something along these lines but somehow decided that
doing proper refcounting (which I broke BTW :) and letting the kthread
die asynchronously was easier, and didn't rely on the heavy_init to be
nice and return quickly (is the USB subsystem held for the duration of
the disconnect methods just like it is for probe?).

Anyway if you change your mind it'll be just a matter of adding a
cleanup function to usbatm_driver and calling it in
udsl_destroy_instance, thus lifting up the requirements on the
minidriver's heavy_init.  All the bookkeeping is already there.

> [...] As I said to David on IRC, I think you and he were
> repelled by the "huge heap of crud in a file" nature of usbnet, while missing the
> nice mini-driver aspect and the simple registration scheme (i.e. the driver_info trick,

Indeed.  Thanks for the explanation!

A nitpick re. the code:
is atm_dev parameter needed for atm_{start,stop} methods of
usbatm_driver?  It can be made always available in usbatm_data, and can
be reset to NULL in usbatm_atm_init if atm_start method failed.
Otherwise kill line 988 :)

Starting to code cxacru2,

More information about the Usbatm mailing list