l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2002 Jul 07 12:39

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] lego USB tower
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] lego USB tower



sent to the author of the lego USB tower device driver.  any comments
welcome.



----- Forwarded message from p -----

dear richard,

this morning i tried out the lego linux USB patch.   the patches applied
flawlessly to the kernel source code (2.4.18) and to the most recent nqc
source code.

i made a char device file of (major/minor) number of (180/64) called
/dev/legotower.

did a modprobe -a lego and this is what was printed:

  satan# modprobe -a lego
  usb.c: registered new driver Lego Tower
  lego.c: probe_lego: USB Lego Tower (interface 0) found at address 2
  lego.c: probe_lego: Allocated minor 0
  lego.c: probe_lego: device node registration failed
  lego.c: v1.0:USB Lego driver

using lsmod i see that lego.o and the associated usb modules have
loaded.  there are two curious things about the above output:

first, lego was assigned minor number 0, when it should've taken 64.

second, the "device node registration failed" message is disheartening.

going through the code, i see in function static void *probe_lego:

   if(lego->devfs == NULL)
   {
      err(__FUNCTION__ ": device node registration failed");
      goto probe_exit;
   }

   probe_exit:

   if(err)
   {
      free_lego_resources(lego);
      lego = NULL;
   }


to my untrained eyes, this code looks like the module can't be used
unless the system is a devfs system.  i'm assuming that lego->devfs is
NULL for non devfs systems and that err() sets err, some "errno-like"
variable.

is this not correct?

and if it is correct, then i'm thinking that lego.o should unload
itself.

any thoughts on how to get this module to use the correct minor number
(other than compiling devfs into the kernel).

thanks!
pete

-- 
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.