udev 015 release
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gz
rpms built against Red Hat FC1 are available at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015-1.i386.rpm
with the source rpm at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015-1.src.rpm
udev allows users to have a dynamic /dev and provides the ability to have persistent device names. It uses sysfs and /sbin/hotplug and runs entirely in userspace. It requires a 2.6 kernel with CONFIG_HOTPLUG enabled to run. Please see the udev FAQ for any questions about it:
kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ
For any udev vs devfs questions anyone might have, please see:
kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
Major changes from the 014 version:
- we finally look up the chain of sysfs device entries trying to match all devices in the chain for each rule.
What this means to users: Consider the following sysfs device:
$ tree /sys/class/input/mouse1/ /sys/class/input/mouse1/ |-- dev |-- device -> ../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0 `-- driver -> ../../../bus/usb/drivers/hid
Now this is a USB trackball. udev will follow that "device" symlink and get to the following directory:
$ tree /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0
|-- bAlternateSetting
|-- bInterfaceClass
|-- bInterfaceNumber
|-- bInterfaceProtocol
|-- bInterfaceSubClass
|-- bNumEndpoints
|-- detach_state
|-- iInterface
`-- power
`-- stateThis is the directory of the USB interface that is bound to a mouse driver. But in itself, that directory is pretty boring, no vendor id, no product id, no manufacturer string... What a user really wants is the directory above this:
$ tree /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1 /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1 |-- 2-1:1.0 | |-- bAlternateSetting | ... |-- bConfigurationValue |-- bDeviceClass |-- bDeviceProtocol |-- bDeviceSubClass |-- bMaxPower |-- bNumConfigurations |-- bNumInterfaces |-- bcdDevice |-- bmAttributes |-- detach_state |-- idProduct |-- idVendor |-- manufacturer |-- power | `-- state |-- product `-- speed
Now this directory contains good stuff:
$ cat /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/product Microsoft Trackball Optical®
So, in short, you can now write a udev rule for this device as:
SYSFS_product="Microsoft Trackball*", NAME="my_trackball", SYMLINK="input/mouse1"
and it will actually work :)
This is really helpful for all USB devices, and SCSI devices on USB or Firewire buses. If anyone has any questions about this, please let me know, or bring it up on the linux-hotplug-devel mailing list.
Another big thing in this release is 'udevinfo'. It's a way to get all information out of the udev database about what devices are present, what they are called, and other good stuff. It also will walk the sysfs chain of any device and print out all information on the device which helps out a lot in creating rules for udev.
Thanks to Kay Sievers who wrote udevinfo. Great job.
Also in this release is the start of a udev daemon. It's really in 3 pieces:
udevsend - sends the hotplug message to the udev daemon udevd - the udev daemon, gets the hotplug messages, sorts them
in proper order, and passes them off to the udev program to act apon them.
udev - still the same.
This lets us keep udevsend and udevd small, and hopefully bug free. These programs still need a lot of work and polish before we feel they are stable enough to use for everyone (they are not built right now in the .rpm). Help is appreciated here.
Thanks a lot to Kay Sievers and Xiaofeng Ling for the work on udevsend and udevd. Again, I really appreciate it.
Thanks also to everyone who has send me patches for this release, a full list of everyone, and their changes is below.
udev development is done in a BitKeeper repository located at:
bk://linuxusb.bkbits.net/udev
Daily snapshots of udev from the BitKeeper tree can be found at:
http://www.codemonkey.org.uk/projects/bitkeeper/udev/
If anyone ever wants a tarball of the current bk tree, just email me.
thanks,
greg k-h
Summary of changes from v014 to v015
======================
<mbuesch:freenet.de>:
o LFS init script update
Greg Kroah-Hartman:
o update klibc to version 0.98
o clean up udevinfo on 'make clean'
o add udevinfo man page to spec file
o remove command line documentation from udev man page
o create initial version of udevinfo man page
o added URL to spec file
o add udevinfo to udev.spec file
o add udevinfo to install target of Makefile
o rip out command line code from udev, now that we have udevinfo
o udevinfo doesn't need to declare main_envp
o move get_pair to udev_config.c because udevinfo doesn't need all of namedev.o
o more makefile cleanups
o move udevinfo into the main build and clean up the main Makefile a bit
o clean up compiler warnings if building using klibc
o make udevd only have one instance running at a time
o new testd.block script for debugging
o udevsnd : clean up message creation logic a bit
o make bk ignore udevd and udevsend binaries
o whitespace cleanups
o remove TODO item about BUS value, as it is now done
o add support for figuring out which device on the sysfs "chain" the rule applies to
Kay Sievers:
o udevinfo - now a real program :)
o udevd - cleanup and better timeout handling
o udev - next round of udev event order daemon
o fix udevd exec
o udev - udevinfo with device chain walk
o spilt udev into pieces
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Greg KH
I've released the 015 version of udev. It can be found at:
Great, 15 minuts after I've installed 014 ;-)
014 and 015 errors for me when made with 'make USE_DBUS=true':
udev_dbus.c: In function `sysbus_connect':
udev_dbus.c:41: warning: implicit declaration of function `dbg'
gcc -ldbus-1 -o udev udev.o udev_config.o udev-add.o udev-remove.o \
udevdb.o logging.o namedev.o namedev_parse.o /mnt/ram/udev-015/libsysfs/sysfs_bus.o \
/mnt/ram/udev-015/libsysfs/sysfs_class.o /mnt/ram/udev-015/libsysfs/sysfs_device.o \
/mnt/ram/udev-015/libsysfs/sysfs_dir.o /mnt/ram/udev-015/libsysfs/sysfs_driver.o \
/mnt/ram/udev-015/libsysfs/sysfs_utils.o /mnt/ram/udev-015/libsysfs/dlist.o \
tdb/tdb.o tdb/spinlock.o udev_dbus.o -lcudev_dbus.o(.text+0x49): In function `sysbus_connect':
: undefined reference to `dbg'udev_dbus.o(.text+0x11f): In function `sysbus_send_create':
: undefined reference to `dbg'udev_dbus.o(.text+0x1ce): In function `sysbus_send_remove':
: undefined reference to `dbg'
collect2: ld returned 1 exit status
make: *** [udev] Error 1
(manually wrapped line with gcc in above log).
Thats with dbus-0.20 installed.
Signature · 3 lines
Tomasz Torcz Elvis Presley nie żyje. Winni są developerzy Debiana. [email protected] -- marcoos w komentarzach na infojama.pl |> Playing: - Radio 103,4 Blue FM : Najlepiej Dobrana Muzyka prosto z Poznania
Quoted 6 lines · Tomasz Torcz
Quoted 1 line · Greg KH
I've released the 015 version of udev. It can be found at:
Great, 15 minuts after I've installed 014 ;-)
014 and 015 errors for me when made with 'make USE_DBUS=true':
Here's a patch to fix this. I've never tested the DBUS stuff before, so had to go install the latest packages...
Sorry about that.
greg k-h
# allow dbus code to actually build again.
udev_dbus.c +1 -0
@@ -12,6 +12,7 @@#include "udev.h" #include "udev_version.h" #include "udev_dbus.h" +#include "logging.h" /** variable for the connection the to system message bus or #NULL
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gzAlso in this release is the start of a udev daemon. It's really in 3 pieces:
udevsend - sends the hotplug message to the udev daemon udevd - the udev daemon, gets the hotplug messages, sorts them
in proper order, and passes them off to the udev program to act apon them.
udev - still the same.
I'm curious about the rationale behind breaking it up into multiple chunks.
udevsend being separate I assume is so that it can be easily called from a script while still keeping something persistant?
I'm not sure I see what separating udev and udevd into different binaries actually buys you. Wouldn't it be just as easy to make udev be the daemon based on runtime options or something?
Chris
Signature · 16 lines
Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: [email protected] ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Chris Friesen
Quoted 10 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gzAlso in this release is the start of a udev daemon. It's really in 3 pieces:
udevsend - sends the hotplug message to the udev daemon udevd - the udev daemon, gets the hotplug messages, sorts them
in proper order, and passes them off to the udev program to act apon them.
udev - still the same.
Quoted 4 lines
I'm curious about the rationale behind breaking it up into multiple chunks.
udevsend being separate I assume is so that it can be easily called from a script while still keeping something persistant?
Yes, it will be called from /sbin/hotplug.
Quoted 3 lines
I'm not sure I see what separating udev and udevd into different binaries actually buys you. Wouldn't it be just as easy to make udev be the daemon based on runtime options or something?
It should be faster this way. We can send off udev to run for different devices at the same time (blocking for any pending device changes for any currently running udev instances.)
Take a look at the current code and let us know if you have any questions (warning, the code is in quite a bit of flux, you might want to look at the bk tree...)
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gz
'%D' is still being used in some of the examples ...
Cheers,
Signature · 1 line
Martin Schlemmer
Quoted 6 lines · Martin Schlemmer
Quoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gz'%D' is still being used in some of the examples ...
Ah, thanks. I've fixed that up now.
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
Is there a known issue that the daemon do not spawn?
--
nosferatu udev-015 # DEVPATH=/block/hda ACTION=add strace -ff udevsend blockexecve("/sbin/udevsend", ["udevsend", "block"], [/* 55 vars */]) = 0 uname({sys="Linux", node="nosferatu", ...}) = 0
brk(0) = 0x804a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40000000open("/etc/ld.so.preload", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3) = 0open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=79435, ...}) = 0 mmap2(NULL, 79435, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40001000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\31YQA4"...,
512) = 512fstat64(3, {st_mode=S_IFREG|0755, st_size=1519742, ...}) = 0 mmap2(0x41500000, 1256716, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x41500000mmap2(0x4162d000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12c) = 0x4162d000mmap2(0x41631000, 7436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x41631000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40015000
set_thread_area({entry_number:-1 -> 6, base_addr:0x40015070, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0munmap(0x40001000, 79435) = 0open("/dev/urandom", O_RDONLY) = 3
read(3, "\271\5\352\360\17,R\261X\341\265\335n\37\335!g\'\17\2\262"...,
32) = 32
close(3) = 0exit_group(-22) = ?
--
Thanks,
Signature · 1 line
Martin Schlemmer
Quoted 3 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
Is there a known issue that the daemon do not spawn?
Hm, I don't know. This code is under major flux right now...
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Greg KH
Quoted 3 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
Is there a known issue that the daemon do not spawn?
Hm, I don't know. This code is under major flux right now...
Hi Martin,
sorry, the code in the tree doesn't work.
I decided to try pthreads, cause I gave up with the I/O multiplexing, forking and earning SIGCHLDS for manipulating the global lists.
The multithreaded udevd takes multiple events at the same time on a unix domain socket, sorts it in a linked list and handles the timeouts if events are missing.
It executes our current udev in the background and delays the execution for events with the same DEVPATH. So we serialize the events only for different devices.
I've posted the latest patch to the list a few minutes ago. If you like, I'm happy to hear from your testing :)
If we decide not to stay with the threads model, cause klibc doesn't support it now and ..., we at least have a working model to implement in a different way.
thanks,
Kay
Quoted 20 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 3 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
Is there a known issue that the daemon do not spawn?
Hm, I don't know. This code is under major flux right now...
Hi Martin,
sorry, the code in the tree doesn't work.
I decided to try pthreads, cause I gave up with the I/O multiplexing, forking and earning SIGCHLDS for manipulating the global lists.The multithreaded udevd takes multiple events at the same time on a unix domain socket, sorts it in a linked list and handles the timeouts if events are missing.
It executes our current udev in the background and delays the execution for events with the same DEVPATH. So we serialize the events only for different devices.
Quoted 7 lines
I've posted the latest patch to the list a few minutes ago. If you like, I'm happy to hear from your testing :)
If we decide not to stay with the threads model, cause klibc doesn't support it now and ..., we at least have a working model to implement in a different way.
Thanks - I wanted to have a go at it, but after not working, wanted to check if it might be my setup, or known issue ... I will see if I can get time to test your latest patch - anything specific you need testing of ?
Signature · 1 line
Martin Schlemmer
Quoted 29 lines · Martin Schlemmer
Quoted 20 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 3 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
Is there a known issue that the daemon do not spawn?
Hm, I don't know. This code is under major flux right now...
Hi Martin,
sorry, the code in the tree doesn't work.
I decided to try pthreads, cause I gave up with the I/O multiplexing, forking and earning SIGCHLDS for manipulating the global lists.The multithreaded udevd takes multiple events at the same time on a unix domain socket, sorts it in a linked list and handles the timeouts if events are missing.
It executes our current udev in the background and delays the execution for events with the same DEVPATH. So we serialize the events only for different devices.Quoted 7 lines
I've posted the latest patch to the list a few minutes ago. If you like, I'm happy to hear from your testing :)
If we decide not to stay with the threads model, cause klibc doesn't support it now and ..., we at least have a working model to implement in a different way.
Quoted 4 lines
Thanks - I wanted to have a go at it, but after not working, wanted to check if it might be my setup, or known issue ... I will see if I can get time to test your latest patch - anything specific you need testing of ?
Nothing specific, I just need to know if it's working on other setups too :)
Just compile it with DEBUG=true and let the '/etc/hotplug.d/default/udev.hotplug' symlink point to udevsend instead of udev. udevd will be automatically started. On reboot the first sequence I get in the syslog is 138 and udevd is pid [51].
Don't mount /udev as tmpfs. udevd places its socket and lock file in there, long before you mount it over. I just recognized it cause I had two udevd running. /var/lock doesn't work cause it's also cleaned up after we are running.
You may watch the syslog while connecting/disconnecting devices, to see if the events are applied in the right order.
thanks,
Kay
Quoted 5 lines · Kay Sievers
Quoted 2 lines
get time to test your latest patch - anything specific you need testing of ?
Nothing specific, I just need to know if it's working on other setups too :)
Quoted 9 lines
Just compile it with DEBUG=true and let the '
/etc/hotplug.d/default/udev.hotplug' symlink point to udevsend instead of udev. udevd will be automatically started. On reboot the first sequence I get in the syslog is 138 and udevd is pid [51].Don't mount /udev as tmpfs. udevd places its socket and lock file in there, long before you mount it over. I just recognized it cause I had two udevd running.
/var/lockdoesn't work cause it's also cleaned up after we are running.
Our setup runs udev for creating /dev _very_ early, so I do not think this will be a problem - will let you know.
Quoted 5 lines
You may watch the syslog while connecting/disconnecting devices, to see if the events are applied in the right order.
thanks,
Kay
Signature · 1 line
Martin Schlemmer
Quoted 11 lines · Martin Schlemmer
Quoted 9 lines · Kay Sievers
Quoted 2 lines
get time to test your latest patch - anything specific you need testing of ?
Nothing specific, I just need to know if it's working on other setups too :)
Just compile it with DEBUG=true and let the '
/etc/hotplug.d/default/udev.hotplug' symlink point to udevsend instead of udev. udevd will be automatically started. On reboot the first sequence I get in the syslog is 138 and udevd is pid [51].
Quoted 8 lines
Quoted 5 lines
Don't mount /udev as tmpfs. udevd places its socket and lock file in there, long before you mount it over. I just recognized it cause I had two udevd running.
/var/lockdoesn't work cause it's also cleaned up after we are running.Our setup runs udev for creating /dev _very_ early, so I do not think this will be a problem - will let you know.
What means very early?
I would expect hotplug events before your setup runs.
Kay
Quoted 18 lines · Kay Sievers
Quoted 17 lines · Martin Schlemmer
Quoted 14 lines · Kay Sievers
Quoted 2 lines
get time to test your latest patch - anything specific you need testing of ?
Nothing specific, I just need to know if it's working on other setups too :)
Just compile it with DEBUG=true and let the '
/etc/hotplug.d/default/udev.hotplug' symlink point to udevsend instead of udev. udevd will be automatically started. On reboot the first sequence I get in the syslog is 138 and udevd is pid [51].Don't mount /udev as tmpfs. udevd places its socket and lock file in there, long before you mount it over. I just recognized it cause I had two udevd running.
/var/lockdoesn't work cause it's also cleaned up after we are running.
Quoted 6 lines
Quoted 2 lines
Our setup runs udev for creating /dev _very_ early, so I do not think this will be a problem - will let you know.
What means very early?
I would expect hotplug events before your setup runs.
True, but then / is ro anyhow. Its before / gets mounted rw, so I would say its early.
Signature · 1 line
Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
I see latest version is very noisy, and although it is a good option to have, I think it should be tweakable (and recompiling is not always an option if you want some quick debugging).
Attached is a simple patch to add a config option to udev.conf to toggle logging.
Thanks,
Signature · 1 line
Martin Schlemmer
Makefile +5 -4
@@ -232,6 +232,7 @@ @echo \#define UDEV_CONFIG_FILE \"$(configdir)\udev.conf\" >> $@ @echo \#define UDEV_RULES_FILE \"$(configdir)\udev.rules\" >> $@ @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@ + @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@ # config files automatically generated GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf
@@ -252,12 +253,12 @@ $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o logging.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS) $(STRIPCMD) $@ -$(DAEMON): udevd.h udevd.o udevd.o logging.o - $(LD) $(LDFLAGS) -o $@ $(CRT0) udevd.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS) +$(DAEMON): udevd.h udevd.o udevd.o udev_config.o logging.o $(SYSFS) + $(LD) $(LDFLAGS) -o $@ $(CRT0) udevd.o udev_config.o logging.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS) $(STRIPCMD) $@ -$(SENDER): udevd.h udevsend.o udevd.o logging.o - $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS) +$(SENDER): udevd.h udevsend.o udevd.o udev_config.o logging.o $(SYSFS) + $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o udev_config.o logging.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS) $(STRIPCMD) $@ clean:
etc/udev/udev.conf.in +3 -0
@@ -29,3 +29,6 @@ # explicit match in the permissions file default_group="root" +# udev_log - set to "yes" if you want logging, else "no" +udev_log="yes" +
udev_config.c +5 -0
@@ -48,6 +48,7 @@ char udev_config_filename[PATH_MAX+NAME_char default_mode_str[MODE_SIZE ];char default_owner_str[OWNER_SIZE ];char default_group_str[GROUP_SIZE ]; +char udev_log_str[BOOL_SIZE ];static void init_variables (void )
@@ -60,6 +61,7 @@ static void init_variables(void)strfieldcpy (udev_config_filename,UDEV_CONFIG_FILE );strfieldcpy (udev_rules_filename,UDEV_RULES_FILE );strfieldcpy (udev_permissions_filename,UDEV_PERMISSION_FILE ); +strfieldcpy (udev_log_str,UDEV_LOG_DEFAULT ); }#define set_var (_name, _var) \
@@ -156,6 +158,7 @@ static int parse_config_file(void)set_var ("default_mode" , default_mode_str);set_var ("default_owner" , default_owner_str);set_var ("default_group" , default_group_str); +set_var ("udev_log" , udev_log_str); }dbg_parse ("%s:%d:%Zd: error parsing '%s'" , udev_config_filename, lineno, temp - line, temp);
@@ -191,6 +194,7 @@ static void get_dirs(void)dbg_parse ("udev_db_filename = %s" , udev_db_filename);dbg_parse ("udev_rules_filename = %s" , udev_rules_filename);dbg_parse ("udev_permissions_filename = %s" , udev_permissions_filename); +dbg_parse ("udev_log_str = %s" , udev_log_str);parse_config_file ();dbg_parse ("udev_root = %s" , udev_root);
@@ -198,6 +202,7 @@ static void get_dirs(void)dbg_parse ("udev_db_filename = %s" , udev_db_filename);dbg_parse ("udev_rules_filename = %s" , udev_rules_filename);dbg_parse ("udev_permissions_filename = %s" , udev_permissions_filename); +dbg_parse ("udev_log_str = %s" , udev_log_str); }void udev_init_config (void )
logging.c +4 -0
@@ -26,6 +26,7 @@#include <unistd.h> #include <syslog.h> +#include "udev.h" #include "logging.h"
@@ -47,6 +48,9 @@ int log_message(int level, const char *f {va_list args; +if (0 !=strncmp (udev_log_str,"yes" ,BOOL_SIZE )) +return 0 ; +if (!logging_init)init_logging ();va_start (args, format);
udev.h +2 -0
@@ -32,6 +32,7 @@#define OWNER_SIZE 30#define GROUP_SIZE 30#define MODE_SIZE 8 +#define BOOL_SIZE 5struct udevice {char name[NAME_SIZE ];
@@ -72,5 +73,6 @@ extern char udev_rules_filename[PATH_MAXextern char default_mode_str[MODE_SIZE ];extern char default_owner_str[OWNER_SIZE ];extern char default_group_str[GROUP_SIZE ]; +extern char udev_log_str[BOOL_SIZE ];#endif
On Thu, 2004-01-29 at 20:30, Martin Schlemmer wrote:
<snip>
Quoted 11 lines
logging.c 2004-01-29 20:02:41.316184344 +0200 renamed from logging.c 2004-01-29 19:20:40.673380296 +0200 +1
-0@@ -26,6 +26,7 @@ #include <unistd.h> #include <syslog.h> +#include "udev.h" #include "logging.h"
logging.c 2004-01-29 20:02:41.316184344 +0200 int log_message(int level, const char *f · line 51
Quoted 4 lines
logging.c 2004-01-29 20:02:41.316184344 +0200 renamed from logging.c 2004-01-29 19:20:40.673380296 +0200 +1
-0@@ -47,6 +48,9 @@ int log_message(int level, const char *f { va_list args; + if (0 != strncmp(udev_log_str, "yes", BOOL_SIZE))
This should be:
--
+ if (0 != strncmp(udev_log_str, UDEV_LOG_DEFAULT, BOOL_SIZE))
--
of course ...
Quoted 5 lines
logging.c 2004-01-29 20:02:41.316184344 +0200 renamed from logging.c 2004-01-29 19:20:40.673380296 +0200 +2
-0+ return 0; + if (!logging_init) init_logging(); va_start(args, format);
Signature · 1 line
Martin Schlemmer
Quoted 8 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
I see latest version is very noisy, and although it is a good option to have, I think it should be tweakable (and recompiling is not always an option if you want some quick debugging).
Attached is a simple patch to add a config option to udev.conf to toggle logging.
I'm going to hold off on this patch for now for a number of reasons:
- doesn't apply anymore
- is buggy as your follow on message stated
- I don't think it's really needed.
But feel free to convince me otherwise :)
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Greg KH
Quoted 8 lines · Martin Schlemmer
On Mon, 2004-01-26 at 23:50, Greg KH wrote:
I see latest version is very noisy, and although it is a good option to have, I think it should be tweakable (and recompiling is not always an option if you want some quick debugging).
Attached is a simple patch to add a config option to udev.conf to toggle logging.
Quoted 7 lines
I'm going to hold off on this patch for now for a number of reasons:
- doesn't apply anymore
- is buggy as your follow on message stated
- I don't think it's really needed.But feel free to convince me otherwise :)
I'll try again with 016 =)
Signature · 1 line
Martin Schlemmer
Hi Greg,
perhaps you remember me being a gentoo user wanting to switch to udev. Well I did so, but am having some problems:
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written into loacal.start.):
mknod /dev/nvidia0 c 195 0
mknod /dev/nvidiactl c 195 255
2.) More probelmatic: I am having some serious troubles with my Epson Perfection USB scanner:
a) I am to dumb to write a rule for it to map it to /dev/usb/scanner0
Excerp of lsusb -v:
Bus 001 Device 004: ID 04b8:010f Seiko Epson Corp. Perfection 1250 Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 8
idVendor 0x04b8 Seiko Epson Corp.
idProduct 0x010f Perfection 1250
bcdDevice 1.00
iManufacturer 1 EPSON iProduct 2 EPSON Scanner 010F iSerial 0 bNumConfigurations 1
I don't exactly know which SYSFS_ field to use as the don't match the lsusb descriptor. I tried various ones, but the scanner always gets mapped to /dev/scanner0. I managed to get my HP printer to be mapped to usb/lp0 by using its serial. This is my (latest non working )line for the scanner:
BUS="usb", SYSFS_model="Perfection 1250", NAME="usb/scanner0"
Now the serious issue: When rebooting or disconnecting the scanner I get a kernel oops:
hub 1-0:1.0: new USB device on port 2, assigned address 4 drivers/usb/image/scanner.c: USB scanner device (0x04b8/0x010f) now attached to usb/scanner0drivers/usb/core/usb.c: registered new driver usbscanner drivers/usb/image/scanner.c: 0.4.16:USB Scanner Driver usb 1-2: USB disconnect, address 4
Unable to handle kernel NULL pointer dereference at virtual address 0000001e printing eip: f9b370cc *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[<f9b370cc>] Tainted: PF EFLAGS: 00010282
EIP is at disconnect_scanner+0x2c/0x6d [scanner]
eax: f685f0c0 ebx: f685f0d4 ecx: f9b370a0 edx: 00000007
esi: 00000000 edi: f73194e8 ebp: f9b3abfc esp: f78c3e50
ds: 007b es: 007b ss: 0068
Process khubd (pid: 983, threadinfo÷8c2000 task÷8da720)
Stack: f685f0c0 f9b3ac78 f685f0c0 f9b3ace0 f9a4611b f685f0c0 f685f0c0
f685f100
f685f0d4 f9b3ad00 c026c214 f685f0d4 f685f100 f73194fc f73194c0
f9b36a4f
f685f0d4 f685f0c0 f73194fc f9b3ac0c 00000000 00000000 c021cbf8
f73194fc
Call Trace:
[<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore]
[<c026c214>] device_release_driver+0x64/0x70
[<f9b36a4f>] destroy_scanner+0x4f/0xb0 [scanner]
[<c021cbf8>] kobject_cleanup+0x98/0xa0
[<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore]
[<c026c214>] device_release_driver+0x64/0x70
[<c026c345>] bus_remove_device+0x55/0xa0
[<c026b27d>] device_del+0x5d/0xa0
[<f9a4c6af>] usb_disable_device+0x6f/0xb0 [usbcore]
[<f9a46b76>] usb_disconnect+0x96/0xf0 [usbcore]
[<f9a492df>] hub_port_connect_change+0x30f/0x320 [usbcore]
[<f9a48c13>] hub_port_status+0x43/0xb0 [usbcore]
[<f9a495ba>] hub_events+0x2ca/0x340 [usbcore]
[<f9a4965d>] hub_thread+0x2d/0xf0 [usbcore]
[<c010925e>] ret_from_fork+0x6/0x14
[<c011c9e0>] default_wake_function+0x0/0x20
[<f9a49630>] hub_thread+0x0/0xf0 [usbcore]
[<c0107289>] kernel_thread_helper+0x5/0xc
Code: 80 7e 1e 00 75 2e 85 f6 74 17 8d 46 3c 8b 5c 24 08 8b 74 24And that's it. I cannot do a clean shut-down anymore, as the scanner module won't get unloaded. Is this an udev issue or is the module faulty? I am using latest Linus kernel 2.6.2-rc2.
Other than that I am quite impressed by udev. I disabled the use of an archive saving all the nodes. This was getting on my nerves with a former udev release as populating /dev took several seconds. Now I cannot see any delay. Very well!
bye,
Prakash
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Prakash K. Cheemplavam
Hi Greg,
perhaps you remember me being a gentoo user wanting to switch to udev. Well I did so, but am having some problems:
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written into loacal.start.):
mknod/dev/nvidia0c 195 0
mknod/dev/nvidiactlc 195 255
Heh, and you expect me to be able to modify a binary driver to work with udev how? :)
You're on your own here...
Quoted 9 lines
2.) More probelmatic: I am having some serious troubles with my Epson Perfection USB scanner:
a) I am to dumb to write a rule for it to map it to/dev/usb/scanner0I don't exactly know which
SYSFS_field to use as the don't match the lsusb descriptor. I tried various ones, but the scanner always gets mapped to/dev/scanner0. I managed to get my HP printer to be mapped to usb/lp0 by using its serial. This is my (latest non working )line for the scanner:
What does:
usbinfo -a -p /sys/class/usb/scanner0
say?
That should help you generate a proper rule.
Quoted 2 lines
Now the serious issue: When rebooting or disconnecting the scanner I get a kernel oops:
That's because you shouldn't be using the scanner driver at all :) Please just use the latest xscane, it can talk to the scanner through usbfs/libusb with no kernel module needed. This is a well known bug if you search the lkml archives...
Hope this helps.
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines
Quoted 2 lines
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written
Heh, and you expect me to be able to modify a binary driver to work with udev how? :)
Oh OK, then I'll shut up. :-)
Quoted 3 lines
What does:
usbinfo -a -p/sys/class/usb/scanner0
say?
Uhm, where to get this? I don't have it and I dunno which gentoo ebuild installs it. But I found a graphic app called "usbview". It basically gives the same infos as lsusb. Well, nevermind, I'l try what you said down. I'll try to get xsane goind with libusb.
Thanx,
Prakash
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Prakash K. Cheemplavam
Quoted 3 lines
What does:
usbinfo -a -p/sys/class/usb/scanner0
say?Uhm, where to get this? I don't have it and I dunno which gentoo ebuild installs it. But I found a graphic app called "usbview". It basically gives the same infos as lsusb. Well, nevermind, I'l try what you said down. I'll try to get xsane goind with libusb.
Oops, sorry, that should have been 'udevinfo' not 'usbinfo'.
Not awake yet...
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Greg KH
Quoted 4 lines · Prakash K. Cheemplavam
Quoted 3 lines
What does:
usbinfo -a -p/sys/class/usb/scanner0
say?Oops, sorry, that should have been 'udevinfo' not 'usbinfo'.
Not awake yet...
Ok, but it doesn't help, as I guess the scanner0 entry will only appear if I use the scanner module, which I don't want to...so no scanner0 entry in my case.
But I basicaly managed to get support vie libusb (doing a brute chmod 666 on the proc device). Just need to set the rights correctly to the device via a script and let hotplug do the rest. Everything new to me, but makes sense somehow...
Prakash
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Greg KH
Quoted 10 lines · Prakash K. Cheemplavam
Hi Greg,
perhaps you remember me being a gentoo user wanting to switch to udev. Well I did so, but am having some problems:
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written into loacal.start.):
mknod/dev/nvidia0c 195 0
mknod/dev/nvidiactlc 195 255
Quoted 5 lines
Heh, and you expect me to be able to modify a binary driver to work with udev how? :)
You're on your own here...
No offense, but you guys sometimes really see things as too black and white :)
Its only the high level api calls that are in binary object files, but the main interface to the kernel is source that needs compiling. I have a patch attached here that adds basic sysfs support via the class_simple functions.
It works as expected, only problem is kbuild seems to ignore EXTRA_CFLAGS? If I remove the 'defined(HAVE_CLASS_SIMPLE), or use the attached non-kbuild Makefile, it works just fine. Anybody have an idea bout the EXTRA_CFLAGS issue?
Cheers,
Signature · 1 line
Martin Schlemmer
usr/src/nv/Makefile.kbuild +4 -0
@@ -146,6 +146,10 @@ ifeq ($(shell sh $(src)/conftest.sh rema EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_4 endif +ifeq ($(shell sh $(src)/conftest.sh class_simple $(KERNEL_HEADERS)), yes) + EXTRA_CFLAGS += -DHAVE_CLASS_SIMPLE +endif + # # NVIDIA binary object file includes .common section. #
usr/src/nv/built-in.o +1 -0
@@ -0,0 +1 @@ +!<arch>
usr/src/nv/conftest.sh +23 -0
@@ -42,6 +42,29 @@ case "$1" in fi ;; + class_simple) + shift + # + # Determine if we have struct class_simple needed for limited sysfs + # support in 2.6 + # + echo "#include <linux/device.h> + struct class_simple *test_class; + int add_test_class() { + test_class = class_simple_create(THIS_MODULE, \"test\"); + }" > conftest.c + + gcc -c conftest.c -o conftest.o $* -D__KERNEL__ > /dev/null 2>&1 + + if test -f conftest.o; then + echo "yes" + else + echo "no" + fi + + rm -f conftest.{c,o} + ;; + cc_sanity_check) shift #
usr/src/nv/nv-linux.h +27 -0
@@ -448,6 +448,33 @@ typedef struct agp_memory agp_memory;# endif // defined(KERNEL_2_4) #endif // defined(CONFIG_DEVFS_FS) +#if defined(KERNEL_2_6 ) && defined(HAVE_CLASS_SIMPLE ) +# define NV_SYSFS_REGISTER \ + nvidia_class = class_simple_create(THIS_MODULE, "nvidia"); + +# define NV_SYSFS_ADD_CONTROL \ + class_simple_device_add(nvidia_class, \ + MKDEV(NV_MAJOR_DEVICE_NUMBER, 255), \ + NULL, "nvidiactl"); + +# define NV_SYSFS_ADD_DEVICE (_name, _minor) \ + class_simple_device_add(nvidia_class, \ + MKDEV(NV_MAJOR_DEVICE_NUMBER, _minor), \ + &nv_linux_devices[_minor].dev->dev, _name); + +# define NV_SYSFS_REMOVE_DEVICE (i) \ + class_simple_device_remove(MKDEV(NV_MAJOR_DEVICE_NUMBER, i)); + +# define NV_SYSFS_UNREGISTER \ + class_simple_destroy(nvidia_class); +#else +# define NV_SYSFS_REGISTER +# define NV_SYSFS_ADD_CONTROL +# define NV_SYSFS_ADD_DEVICE (_name, _minor) +# define NV_SYSFS_REMOVE_DEVICE (i) +# define NV_SYSFS_UNREGISTER +#endif +/* * Linux 2.5 introduced the five argument version of remap_page_range, all
usr/src/nv/nv.c +25 -3
@@ -47,6 +47,10 @@ struct proc_dir_entry *proc_nvidia;devfs_handle_t nv_devfs_handles[NV_MAX_DEVICES +1 ];#endif +#if defined(KERNEL_2_6 ) && defined(HAVE_CLASS_SIMPLE ) +struct class_simple *nvidia_class; +#endif +// #define NV_DBG_MEM 1 #undef NV_DBG_MEM
@@ -874,23 +878,31 @@ static int __init nvidia_init_module(voi rc =register_chrdev (nv_major,"nvidia" , &nv_fops);#endif +NV_SYSFS_REGISTER ; +if (rc <0 ) {nv_printf (NV_DBG_ERRORS ,"nvidia_init_module: register failed\n" );return rc; } -#ifdef CONFIG_DEVFS_FS +#if defined(CONFIG_DEVFS_FS ) || defined(KERNEL_2_6 )do {char name[10 ]; +# if defined(CONFIG_DEVFS_FS ) nv_devfs_handles[0 ] =NV_DEVFS_REGISTER ("nvidiactl" ,255 ); +# endif +NV_SYSFS_ADD_CONTROL ;for (i =0 ; i < num_nv_devices; i++) {sprintf (name,"nvidia%d" , i); +# if defined(CONFIG_DEVFS_FS ) nv_devfs_handles[i+1 ] =NV_DEVFS_REGISTER (name, i); +# endif +NV_SYSFS_ADD_DEVICE (name, i); } }while (0 );#endif
@@ -951,6 +963,7 @@ static int __init nvidia_init_module(voi#else unregister_chrdev (nv_major,"nvidia" );#endif +NV_SYSFS_UNREGISTER ;return rc; }
@@ -1011,15 +1024,24 @@ static void __exit nvidia_exit_module(vonv_printf (NV_DBG_ERRORS ,"nvidia_exit_module: unregister nv failed\n" ); } -#ifdef CONFIG_DEVFS_FS +#if defined(CONFIG_DEVFS_FS ) || defined(KERNEL_2_6 )do {int i; +# if defined(CONFIG_DEVFS_FS )NV_DEVFS_REMOVE_CONTROL (); -for (i =0 ; i < num_nv_devices; i++) +# endif +NV_SYSFS_REMOVE_DEVICE (255 ); +for (i =0 ; i < num_nv_devices; i++) { +# if defined(CONFIG_DEVFS_FS )NV_DEVFS_REMOVE_DEVICE (i); +# endif +NV_SYSFS_REMOVE_DEVICE (i); + } }while (0 );#endif +NV_SYSFS_UNREGISTER ; +#if NV_ENABLE_MEM_TRACKING nv_list_mem (vm_list);nv_list_mem (km_list);
# This Makefile is automatically generated; do not edit
# Generated on 'builder3.nvidia.com' on Thu Jun 19 04:05:35 PDT 2003
LINUX_MODULE=nv-linux.o
DEFINES=-D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DKBUILD_MODNAME="nvidia" -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5328 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86
INCLUDES=-I.
OBJECTS=nv.o os-agp.o os-interface.o os-registry.o
HEADERS=os-agp.h os-interface.h nv-linux.h nv-misc.h nv-memdbg.h nv.h rmretval.h nvtypes.h $(VERSION_HDR)
CFLAGS=-Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wcast-qual -Wno-multichar -O -MD $(DEFINES) $(INCLUDES) -Wno-cast-qual
RESMAN_KERNEL_MODULE=nv-kernel.o
KERNDIR=/lib/modules/$(shell uname -r)
# check for newer paths. if found, use them, otherwise use old paths # these wouldn't work with the gnu make included with rh6.2 # KERNINC=$(if -d $(KERNDIR)/build, $(KERNDIR)/build/include, /usr/src/linux/include) # INSTALLDIR=$(if -d $(KERNDIR)/kernel, $(KERNDIR)/kernel/drivers/video, $(KERNDIR)/video)
# this is slightly more brain-dead, but works.. ifeq ($(shell if test -d $(KERNDIR)/build; then echo yes; fi),yes) KERNINC=$(KERNDIR)/build/include else KERNINC=/usr/src/linux/include endif
ifeq ($(shell if test -d $(KERNDIR)/kernel; then echo yes; fi),yes) INSTALLDIR=$(KERNDIR)/kernel/drivers/video
else
INSTALLDIR=$(KERNDIR)/video
endif
ifeq ($(shell echo $(NVDEBUG)),1)
ifeq ($(shell test -z $(RMDEBUG) && echo yes),yes)
RMDEBUG=1
endif
endif
ifeq ($(shell echo $(RMDEBUG)),1)
CFLAGS += -DDEBUG -g -fno-common
endif
# this is just plain wrong, get rid of it BROKENDIR=$(KERNDIR)/kernel/video
INSTALL=$(shell which install)
# allow specification of alternate include file tree on command line and extra defines ifdef SYSINCLUDE INCLUDES += -I$(SYSINCLUDE) INCLUDES += -I$(SYSINCLUDE)/asm/mach-default else INCLUDES += -I$(KERNINC) INCLUDES += -I$(KERNINC)/asm/mach-default endif
ifeq ($(shell sh conftest.sh remap_page_range $(INCLUDES)), 5)
DEFINES += -DREMAP_PAGE_RANGE_5
endif
ifeq ($(shell sh conftest.sh remap_page_range $(INCLUDES)), 4)
DEFINES += -DREMAP_PAGE_RANGE_4
endif
ifeq ($(shell sh conftest.sh class_simple $(INCLUDES)), yes)
DEFINES += -DHAVE_CLASS_SIMPLE
endif
DEFINES+=$(EXTRA_DEFINES)
# allow build parameters to be passed in through the environment
ifdef BUILD_PARAMS
DEFINES+=-D$(BUILD_PARAMS)
endifVERSION_HDR=nv_compiler.h
all: install
install: package-install
suser-sanity-check:
@if ! sh conftest.sh suser_sanity_check; then \ echo; \ echo "You have insufficient privileges for this operation. Please "; \ echo "run \"make install\" as root! "; \ echo; \ exit 1; \ fi
rmmod-sanity-check:
@if ! sh conftest.sh rmmod_sanity_check nvidia; then \ echo; \ echo "Unable to unload the currently loaded NVIDIA kernel module! "; \ echo "Please be certain that you have exited X before attempting "; \ echo "to install this version. "; \ echo; \ exit 1; \ fi
cc-sanity-check:
@if ! sh conftest.sh cc_sanity_check full_output $(CC); then exit 1; fi
package-install: suser-sanity-check nvidia.o rmmod-sanity-check
if [ -d $(BROKENDIR) ]; then \ rm -f $(BROKENDIR)/NVdriver; \ rmdir --ignore-fail-on-non-empty $(BROKENDIR); \ fi && \ mkdir -p $(INSTALLDIR) && \ rm -f $(INSTALLDIR)/NVdriver && \ $(INSTALL) -m 0664 -o root -g root nvidia.o $(INSTALLDIR)/nvidia.o$(O) && \ /sbin/depmod -a && \ /sbin/modprobe nvidia && \ sh makedevices.sh && \ echo "nvidia.o installed successfully."; \
nvidia.o: cc-sanity-check $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
ld -d -r -o $@ $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
$(VERSION_HDR):
echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -n 1`\" > $@
$(LINUX_MODULE): $(OBJECTS)
ld -r -o $@ $(OBJECTS)
%.o: %.c $(HEADERS)
$(CC) -c $(CFLAGS) $<
# debug tool to preprocess the file and leave .i to make it easier to untangle #defines %.i: %.c $(CC) $(CFLAGS) -E $< > $@
%.s: %.c
$(CC) $(CFLAGS) -S $< > $@
clean:
$(RM) $(OBJECTS) $(LINUX_MODULE) $(VERSION_HDR) *.d NVdriver nvidia.o
-include $(OBJECTS:%.o=%.d)
Quoted 22 lines · Martin Schlemmer
Quoted 13 lines · Greg KH
Quoted 10 lines · Prakash K. Cheemplavam
Hi Greg,
perhaps you remember me being a gentoo user wanting to switch to udev. Well I did so, but am having some problems:
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written into loacal.start.):
mknod/dev/nvidia0c 195 0
mknod/dev/nvidiactlc 195 255Quoted 5 lines
Heh, and you expect me to be able to modify a binary driver to work with udev how? :)
You're on your own here...
Quoted 7 lines
No offense, but you guys sometimes really see things as too black and white :)
Its only the high level api calls that are in binary object files, but the main interface to the kernel is source that needs compiling. I have a patch attached here that adds basic sysfs support via the
class_simplefunctions.
I just reemerged the nvidia-kernel which seems to incorporate your patcxh and yes, it works nicely. :-)
Prakash
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Prakash K. Cheemplavam
Hi Greg,
perhaps you remember me being a gentoo user wanting to switch to udev. Well I did so, but am having some problems:
1.) Minor one: Nodes for Nvidia (I am using binary display modules 1.0.5328) ar not created. I have to do it by hand each start-up (written into loacal.start.):
mknod/dev/nvidia0c 195 0
mknod/dev/nvidiactlc 195 255
What version baselayout? Unstable use a tarball to save device nodes
...
Quoted 99 lines
2.) More probelmatic: I am having some serious troubles with my Epson Perfection USB scanner:
a) I am to dumb to write a rule for it to map it to/dev/usb/scanner0Excerp of lsusb -v:
Bus 001 Device 004: ID 04b8:010f Seiko Epson Corp. Perfection 1250 Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 8
idVendor0x04b8Seiko Epson Corp.
idProduct0x010fPerfection 1250
bcdDevice 1.00iManufacturer 1 EPSON iProduct 2 EPSON Scanner 010F iSerial 0 bNumConfigurations 1I don't exactly know which
SYSFS_field to use as the don't match the lsusb descriptor. I tried various ones, but the scanner always gets mapped to/dev/scanner0. I managed to get my HP printer to be mapped to usb/lp0 by using its serial. This is my (latest non working )line for the scanner:BUS="usb", SYSFS_model="Perfection 1250", NAME="usb/scanner0"
Now the serious issue: When rebooting or disconnecting the scanner I get a kernel oops:
hub 1-0:1.0: new USB device on port 2, assigned address 4
drivers/usb/image/scanner.c: USB scanner device (0x04b8/0x010f) now attached to usb/scanner0drivers/usb/core/usb.c: registered new driver usbscannerdrivers/usb/image/scanner.c: 0.4.16:USB Scanner Driver usb 1-2: USB disconnect, address 4Unable to handle kernel NULL pointer dereference at virtual address 0000001e printing eip: f9b370cc *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[<f9b370cc>] Tainted: PF EFLAGS: 00010282EIP is at
disconnect_scanner+0x2c/0x6d[scanner]
eax:f685f0c0ebx:f685f0d4ecx:f9b370a0edx: 00000007
esi: 00000000 edi:f73194e8ebp:f9b3abfcesp:f78c3e50
ds: 007b es: 007b ss: 0068
Process khubd (pid: 983, threadinfo=f78c2000 task=f78da720)Stack: f685f0c0 f9b3ac78 f685f0c0 f9b3ace0 f9a4611b f685f0c0 f685f0c0 f685f100 f685f0d4 f9b3ad00 c026c214 f685f0d4 f685f100 f73194fc f73194c0 f9b36a4f f685f0d4 f685f0c0 f73194fc f9b3ac0c 00000000 00000000 c021cbf8 f73194fc Call Trace: [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<f9b36a4f>] destroy_scanner+0x4f/0xb0 [scanner] [<c021cbf8>] kobject_cleanup+0x98/0xa0 [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<c026c345>] bus_remove_device+0x55/0xa0 [<c026b27d>] device_del+0x5d/0xa0 [<f9a4c6af>] usb_disable_device+0x6f/0xb0 [usbcore] [<f9a46b76>] usb_disconnect+0x96/0xf0 [usbcore] [<f9a492df>] hub_port_connect_change+0x30f/0x320 [usbcore] [<f9a48c13>] hub_port_status+0x43/0xb0 [usbcore] [<f9a495ba>] hub_events+0x2ca/0x340 [usbcore] [<f9a4965d>] hub_thread+0x2d/0xf0 [usbcore] [<c010925e>] ret_from_fork+0x6/0x14 [<c011c9e0>] default_wake_function+0x0/0x20 [<f9a49630>] hub_thread+0x0/0xf0 [usbcore] [<c0107289>] kernel_thread_helper+0x5/0xc Code: 80 7e 1e 00 75 2e 85 f6 74 17 8d 46 3c 8b 5c 24 08 8b 74 24And that's it. I cannot do a clean shut-down anymore, as the scanner module won't get unloaded. Is this an udev issue or is the module faulty? I am using latest Linus kernel 2.6.2-rc2.
Other than that I am quite impressed by udev. I disabled the use of an archive saving all the nodes. This was getting on my nerves with a former udev release as populating /dev took several seconds. Now I cannot see any delay. Very well!
bye,
Prakash
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Martin Schlemmer
On Fri, 30 Jan 2004 17:45:41 +0100 you wrote in local.lists.kernel:
Quoted 32 lines
Unable to handle kernel NULL pointer dereference at virtual address 0000001e printing eip: f9b370cc *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[<f9b370cc>] Tainted: PF EFLAGS: 00010282EIP is at
disconnect_scanner+0x2c/0x6d[scanner]
eax:f685f0c0ebx:f685f0d4ecx:f9b370a0edx: 00000007
esi: 00000000 edi:f73194e8ebp:f9b3abfcesp:f78c3e50
ds: 007b es: 007b ss: 0068
Process khubd (pid: 983, threadinfo=f78c2000 task=f78da720)Stack: f685f0c0 f9b3ac78 f685f0c0 f9b3ace0 f9a4611b f685f0c0 f685f0c0 f685f100 f685f0d4 f9b3ad00 c026c214 f685f0d4 f685f100 f73194fc f73194c0 f9b36a4f f685f0d4 f685f0c0 f73194fc f9b3ac0c 00000000 00000000 c021cbf8 f73194fc Call Trace: [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<f9b36a4f>] destroy_scanner+0x4f/0xb0 [scanner] [<c021cbf8>] kobject_cleanup+0x98/0xa0 [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<c026c345>] bus_remove_device+0x55/0xa0 [<c026b27d>] device_del+0x5d/0xa0 [<f9a4c6af>] usb_disable_device+0x6f/0xb0 [usbcore] [<f9a46b76>] usb_disconnect+0x96/0xf0 [usbcore] [<f9a492df>] hub_port_connect_change+0x30f/0x320 [usbcore] [<f9a48c13>] hub_port_status+0x43/0xb0 [usbcore]
Quoted 8 lines
[<f9a495ba>] hub_events+0x2ca/0x340 [usbcore] [<f9a4965d>] hub_thread+0x2d/0xf0 [usbcore] [<c010925e>] ret_from_fork+0x6/0x14 [<c011c9e0>] default_wake_function+0x0/0x20 [<f9a49630>] hub_thread+0x0/0xf0 [usbcore] [<c0107289>] kernel_thread_helper+0x5/0xc Code: 80 7e 1e 00 75 2e 85 f6 74 17 8d 46 3c 8b 5c 24 08 8b 74 24
Same problem here. Also with Epson Perfection (640U) and kernel 2.6.2-rc1:
Unable to handle kernel NULL pointer dereference at virtual address 0000001e printing eip: c02ba64c *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[<c02ba64c>] Not tainted EFLAGS: 00010282
EIP is at disconnect_scanner+0x2c/0x6d
eax: e7dc0bc0 ebx: e7dc0bd4 ecx: c02ba620 edx: 00000005
esi: 00000000 edi: e7dbab68 ebp: c03b9dfc esp: c17b1e50
ds: 007b es: 007b ss: 0068
Process khubd (pid: 5, threadinfo=c17b0000 task=e7f8e040)
Stack: e7dc0bc0 c03b9e78 e7dc0bc0 c03b9ee0 c02aa0db e7dc0bc0 e7dc0bc0 e7dc0c00
e7dc0bd4 c03b9f00 c0265414 e7dc0bd4 e7dc0c00 e7dbab7c e7dbab40 c02b9fcf
e7dc0bd4 e7dc0bc0 e7dbab7c c03b9e0c 00000000 00000000 c0207b08 e7dbab7c
Call Trace:
[<c02aa0db>] usb_unbind_interface+0x7b/0x80
[<c0265414>] device_release_driver+0x64/0x70
[<c02b9fcf>] destroy_scanner+0x4f/0xb0
[<c0207b08>] kobject_cleanup+0x98/0xa0
[<c02aa0db>] usb_unbind_interface+0x7b/0x80
[<c0265414>] device_release_driver+0x64/0x70
[<c0265545>] bus_remove_device+0x55/0xa0
[<c026447d>] device_del+0x5d/0xa0
[<c02b043f>] usb_disable_device+0x6f/0xb0
[<c02aa8f6>] usb_disconnect+0x96/0xe0
[<c02ad05f>] hub_port_connect_change+0x30f/0x320
[<c02ac993>] hub_port_status+0x43/0xb0
[<c02ad33a>] hub_events+0x2ca/0x340
[<c02ad3dd>] hub_thread+0x2d/0xf0
[<c010b25e>] ret_from_fork+0x6/0x14
[<c011e9a0>] default_wake_function+0x0/0x20
[<c02ad3b0>] hub_thread+0x0/0xf0
[<c0109289>] kernel_thread_helper+0x5/0xc Quoted 3 lines
And that's it. I cannot do a clean shut-down anymore, as the scanner module won't get unloaded. Is this an udev issue or is the module faulty? I am using latest Linus kernel 2.6.2-rc2.
Not related to udev or modules IMHO, since my kernel does not have module support compiled in and I'm not using udev.
Andre
Signature · 1 line
Andre Noll, http://www.mathematik.tu-darmstadt.de/~noll
Quoted 40 lines · Andre Noll
On Fri, 30 Jan 2004 17:45:41 +0100 you wrote in local.lists.kernel:
Quoted 39 lines
Unable to handle kernel NULL pointer dereference at virtual address 0000001e printing eip: f9b370cc *pde = 00000000 Oops: 0000 [#1] CPU: 0 EIP: 0060:[<f9b370cc>] Tainted: PF EFLAGS: 00010282EIP is at
disconnect_scanner+0x2c/0x6d[scanner]
eax:f685f0c0ebx:f685f0d4ecx:f9b370a0edx: 00000007
esi: 00000000 edi:f73194e8ebp:f9b3abfcesp:f78c3e50
ds: 007b es: 007b ss: 0068
Process khubd (pid: 983, threadinfo=f78c2000 task=f78da720)Stack: f685f0c0 f9b3ac78 f685f0c0 f9b3ace0 f9a4611b f685f0c0 f685f0c0 f685f100 f685f0d4 f9b3ad00 c026c214 f685f0d4 f685f100 f73194fc f73194c0 f9b36a4f f685f0d4 f685f0c0 f73194fc f9b3ac0c 00000000 00000000 c021cbf8 f73194fc Call Trace: [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<f9b36a4f>] destroy_scanner+0x4f/0xb0 [scanner] [<c021cbf8>] kobject_cleanup+0x98/0xa0 [<f9a4611b>] usb_unbind_interface+0x7b/0x80 [usbcore] [<c026c214>] device_release_driver+0x64/0x70 [<c026c345>] bus_remove_device+0x55/0xa0 [<c026b27d>] device_del+0x5d/0xa0 [<f9a4c6af>] usb_disable_device+0x6f/0xb0 [usbcore] [<f9a46b76>] usb_disconnect+0x96/0xf0 [usbcore] [<f9a492df>] hub_port_connect_change+0x30f/0x320 [usbcore] [<f9a48c13>] hub_port_status+0x43/0xb0 [usbcore] [<f9a495ba>] hub_events+0x2ca/0x340 [usbcore] [<f9a4965d>] hub_thread+0x2d/0xf0 [usbcore] [<c010925e>] ret_from_fork+0x6/0x14 [<c011c9e0>] default_wake_function+0x0/0x20 [<f9a49630>] hub_thread+0x0/0xf0 [usbcore] [<c0107289>] kernel_thread_helper+0x5/0xc
Quoted 4 lines
Quoted 1 line
Code: 80 7e 1e 00 75 2e 85 f6 74 17 8d 46 3c 8b 5c 24 08 8b 74 24Same problem here. Also with Epson Perfection (640U) and kernel 2.6.2-rc1:
Greg, I think this now makes 2 distinct bugs in the scanner kernel driver. Maybe it should be protected with a BROKEN:
drivers/usb/image/Kconfig +1 -1
@@ -19,7 +19,7 @@ config USB_SCANNER tristate "USB Scanner support (OBSOLETE)" - depends on USB + depends on USB && BROKEN help Say Y here if you want to connect a USB scanner to your computer's USB port. Please read <file:Documentation/usb/scanner.txt> for more
... or simply removed from the kernel.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 3 lines · Tom Rini
Greg, I think this now makes 2 distinct bugs in the scanner kernel driver. Maybe it should be protected with a BROKEN:
Very good idea, I've applied this patch.
thanks,
greg k-h
PATCH 1/1 remove USB_SCANNER
Quoted 6 lines · Greg KH
Quoted 3 lines · Tom Rini
Greg, I think this now makes 2 distinct bugs in the scanner kernel driver. Maybe it should be protected with a BROKEN:
Very good idea, I've applied this patch.
USB_SCANNER is obsolete, and it's now marked as BROKEN.
I there a good reason to keep it in the kernel?
If not, please apply the patch below plus do a
rm drivers/usb/image/scanner.{c,h}
Quoted 3 lines
thanks,
greg k-h
cu
Adrian
drivers/usb/Makefile renamed from drivers/usb/Makefile.old +0 -1
@@ -46,7 +46,6 @@ obj-$(CONFIG_USB_HPUSBSCSI) += image/ obj-$(CONFIG_USB_MDC800) += image/ obj-$(CONFIG_USB_MICROTEK) += image/ -obj-$(CONFIG_USB_SCANNER) += image/ obj-$(CONFIG_USB_SERIAL) += serial/
drivers/usb/image/Makefile renamed from drivers/usb/image/Makefile.old +0 -1
@@ -5,4 +5,3 @@ obj-$(CONFIG_USB_MDC800) += mdc800.o obj-$(CONFIG_USB_HPUSBSCSI) += hpusbscsi.o obj-$(CONFIG_USB_MICROTEK) += microtek.o -obj-$(CONFIG_USB_SCANNER) += scanner.o
drivers/usb/image/Kconfig renamed from drivers/usb/image/Kconfig.old +0 -13
@@ -17,19 +17,6 @@ To compile this driver as a module, choose M here: the module will be called mdc800. -config USB_SCANNER - tristate "USB Scanner support (OBSOLETE)" - depends on USB && BROKEN - help - Say Y here if you want to connect a USB scanner to your computer's - USB port. Please read <file:Documentation/usb/scanner.txt> for more - information. - - This driver has been obsoleted by support via libusb. - - To compile this driver as a module, choose M here: the - module will be called scanner. - config USB_MICROTEK tristate "Microtek X6USB scanner support" depends on USB && SCSI
Re: [2.6 patch] remove USB_SCANNER
Quoted 6 lines · Adrian Bunk
Quoted 5 lines · Greg KH
Quoted 3 lines · Tom Rini
Greg, I think this now makes 2 distinct bugs in the scanner kernel driver. Maybe it should be protected with a BROKEN:
Quoted 8 lines
Quoted 1 line
Very good idea, I've applied this patch.
USB_SCANNERis obsolete, and it's now marked as BROKEN.I there a good reason to keep it in the kernel?
If not, please apply the patch below plus do a
rmdrivers/usb/image/scanner.{c,h}
I've applied this patch, and removed the driver from the kernel.
thanks,
greg k-h
Re: [2.6 patch] remove USB_SCANNER
Quoted 1 line · Greg KH
On Thu, Feb 05, 2004 at 01:31:36AM +0100, Adrian Bunk wrote:
[...]
Quoted 4 lines
Quoted 2 lines
If not, please apply the patch below plus do a
rmdrivers/usb/image/scanner.{c,h}I've applied this patch, and removed the driver from the kernel.
(sigh) Just last night I had to reboot into 2.4 to use my new USB scanner.
I tried for a while to get it working under 2.6. I'm not exactly a beginner at this stuff either.
With 2.4 it took less than 30 seconds and worked perfectly, following the SANE documentation instructions. My user space is Fedora Core 1 with all available updates.
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt doesn't say a word about USB scanners, and I havn't seen the issue mentioned anywhere else either.
Re: [2.6 patch] remove USB_SCANNER
Quoted 3 lines · Azog
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
As this driver is no longer needed, and the driver is broken and no one has stepped up to fix it for over a month now, I'm removing it from the kernel tree.
thanks,
greg k-h
Re: [2.6 patch] remove USB_SCANNER
tor, 05.02.2004 kl. 18.30 skrev Greg KH:
Quoted 10 lines · Azog
Quoted 3 lines
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
As this driver is no longer needed, and the driver is broken and no one has stepped up to fix it for over a month now, I'm removing it from the kernel tree.
I know it is broken, and obsoleted. But for those of us not using hotplug scripts, it's quite a pity that you have to manually chmod the files in /proc/bus/usb to be able to use a device with libusb as a normal user. Just want to let people having trouble know that.
Best regards,
Stian
Re: [2.6 patch] remove USB_SCANNER
Quoted 13 lines · Stian Jordet
tor, 05.02.2004 kl. 18.30 skrev Greg KH:
Quoted 10 lines · Azog
Quoted 3 lines
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
As this driver is no longer needed, and the driver is broken and no one has stepped up to fix it for over a month now, I'm removing it from the kernel tree.
Quoted 4 lines
I know it is broken, and obsoleted. But for those of us not using hotplug scripts, it's quite a pity that you have to manually chmod the files in
/proc/bus/usbto be able to use a device with libusb as a normal user. Just want to let people having trouble know that.
Or fix this bug:
http://bugme.osdl.org/show_bug.cgi?id=1418
That will make it easier for users too.
thanks,
greg k-h
Re: [2.6 patch] remove USB_SCANNER
In reply to Greg KHQuoted 7 lines · Greg KH
Quoted 3 lines · Azog
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
not for me :-( it works fine with the "broken" kernel module) sane-find-scanner find it:
found USB scanner (vendor=0x04b8 [EPSON],
product=0x011b [EPSON Scanner]) at libusb:001:002
but scaniimage -L don't.
With the kernel module loaded i get:
device `epkowa:/dev/usb/scanner0' is a Epson GT-9300 flatbed scanner What do i miss?
Perhaps somebody who knows should rewrite Documentation/usb/scanner.txt for the benefit of us "pauvres mortels".
Thanks!
Re: [2.6 patch] remove USB_SCANNER
tor, 05.02.2004 kl. 21.24 skrev Leopold Gouverneur:
Quoted 8 lines · Greg KH
Quoted 7 lines · Azog
Quoted 3 lines
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
Quoted 7 lines
not for me :-( it works fine with the "broken" kernel module) sane-find-scanner find it:
found USB scanner (vendor=0x04b8 [EPSON],
product=0x011b [EPSON Scanner]) at libusb:001:002
but scaniimage -L don't.
With the kernel module loaded i get:
device `epkowa:/dev/usb/scanner0' is a Epson GT-9300 flatbed scanner
You seem to be using the epkowa backend, which don't support libusb... My guess, atleast...
Best regards,
Stian
Re: [2.6 patch] remove USB_SCANNER
Quoted 17 lines · Stian Jordet
tor, 05.02.2004 kl. 21.24 skrev Leopold Gouverneur:
Quoted 8 lines · Greg KH
Quoted 7 lines · Azog
Quoted 3 lines
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
xsane should work just fine, using libusb/usbfs.
Quoted 7 lines
not for me :-( it works fine with the "broken" kernel module) sane-find-scanner find it:
found USB scanner (vendor=0x04b8 [EPSON],
product=0x011b [EPSON Scanner]) at libusb:001:002
but scaniimage -L don't.
With the kernel module loaded i get:
device `epkowa:/dev/usb/scanner0' is a Epson GT-9300 flatbed scanner
Quoted 5 lines
You seem to be using the epkowa backend, which don't support libusb... My guess, atleast...
Best regards,
Stian
i have the same result with the epson backend from the sane distribution
Thanks anyway
Re: [2.6 patch] remove USB_SCANNER
In reply to AzogQuoted 20 lines · Azog
Quoted 1 line · Greg KH
On Thu, Feb 05, 2004 at 01:31:36AM +0100, Adrian Bunk wrote:
[...]
Quoted 4 lines
Quoted 2 lines
If not, please apply the patch below plus do a
rmdrivers/usb/image/scanner.{c,h}I've applied this patch, and removed the driver from the kernel.
(sigh) Just last night I had to reboot into 2.4 to use my new USB scanner.
I tried for a while to get it working under 2.6. I'm not exactly a beginner at this stuff either.
With 2.4 it took less than 30 seconds and worked perfectly, following the SANE documentation instructions. My user space is Fedora Core 1 with all available updates.
Quoted 7 lines
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt doesn't say a word about USB scanners, and I havn't seen the issue mentioned anywhere else either.
I dunno what the problem might be on your mobo, but here, the latest version of libusb (1.7 I believe) "just works" with virtually any 2.6 kernel so far. You may want to turn on the verbose debugging in your .config file, rebuild and reboot. It might be educational.
Signature · 8 lines
Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.22% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attornies please note, additions to this message by Gene Heskett are: Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
Re: [2.6 patch] remove USB_SCANNER
Quoted 27 lines · Gene Heskett
Quoted 25 lines · Azog
Quoted 1 line · Greg KH
On Thu, Feb 05, 2004 at 01:31:36AM +0100, Adrian Bunk wrote:
[...]
Quoted 4 lines
Quoted 2 lines
If not, please apply the patch below plus do a
rmdrivers/usb/image/scanner.{c,h}I've applied this patch, and removed the driver from the kernel.
(sigh) Just last night I had to reboot into 2.4 to use my new USB scanner.
I tried for a while to get it working under 2.6. I'm not exactly a beginner at this stuff either.
With 2.4 it took less than 30 seconds and worked perfectly, following the SANE documentation instructions. My user space is Fedora Core 1 with all available updates.
So, what are you all using / recommending for user space configuration and control of a USB scanner under 2.6?
Quoted 7 lines
Quoted 4 lines
http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt doesn't say a word about USB scanners, and I havn't seen the issue mentioned anywhere else either.
I dunno what the problem might be on your mobo, but here, the latest version of libusb (1.7 I believe) "just works" with virtually any 2.6 kernel so far. You may want to turn on the verbose debugging in your .config file, rebuild and reboot. It might be educational.
I think the problem is not that it doesn't work with kernel, but it doesn't work with the application. And while some people may be able to ignore having a system which will work with both 2.4 and 2.6 kernels, for many systems it may not be practical to change config to something which will not work in 2.4 in hopes it might work in 2.6.
Marking the old driver as broken is fine, taking it out will certainly prevent anyone from fixing it. Better to have it around, I would think.
Signature · 3 lines
bill davidsen <[email protected]> CTO TMR Associates, Inc Doing interesting things with small computers since 1979
Re: [2.6 patch] remove USB_SCANNER
Quoted 5 lines · Bill Davidsen
I think the problem is not that it doesn't work with kernel, but it doesn't work with the application. And while some people may be able to ignore having a system which will work with both 2.4 and 2.6 kernels, for many systems it may not be practical to change config to something which will not work in 2.4 in hopes it might work in 2.6.
The libusb solution for scanner devices works just fine with 2.4 also.
thanks,
greg k-h
hal daemon and ide-floppy
In reply to Greg KHHi all...
It looks like haldaemon is polling my zip to see inserted disks (it is the only hadware I have that uses ide-floppy). I get a message like this
Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 0, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 1b, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: hdd: No disk in drive
every 2 seconds, both in messages and syslog.
They can grow very large after some uptime ;)
What is the policy here ? Kill the message in ide-floppy.c ? I suppose there can be some other similat messages around there...
TIA
Signature · 15 lines
J.A. Magallon <jamagallon()able!es> \ Software is like sex: werewolf!able!es \ It's better when it's free Mandrake Linux release 10.0 (Cooker) for i586 Linux 2.6.2-rc2-jam1 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-4mdk)) ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: hal daemon and ide-floppy
Quoted 6 lines · J.A. Magallon
Hi all...
It looks like haldaemon is polling my zip to see inserted disks (it is the only hadware I have that uses ide-floppy). I get a message like this
Quoted 6 lines
Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 0, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 1b, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: hdd: No disk in driveevery 2 seconds, both in messages and syslog.
They can grow very large after some uptime ;)
Why not ask the hal authors about why they are doing this?
Quoted 2 lines
What is the policy here ? Kill the message in
ide-floppy.c? I suppose there can be some other similat messages around there...
You might want to rate-limit those kernel messages though, that's not very nice to be able to do from userspace.
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: hal daemon and ide-floppy
In reply to J.A. MagallonAm Mon, den 02.02.2004 schrieb Greg KH um 04:16:
Quoted 8 lines
Quoted 6 lines
Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 0, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: ide-floppy: hdd: I/O error, pc = 1b, key = 2, asc = 3a, ascq = 0 Feb 1 23:50:15 werewolf kernel: hdd: No disk in driveevery 2 seconds, both in messages and syslog.
They can grow very large after some uptime ;)Why not ask the hal authors about why they are doing this?
I have had the same problem with the volume daemon. The main probelm is that such messages are not from the polling program but from the driver. Either patch the ide-floppy driver or find another way to poll withouht errors :-)
You will get similar messages if you poll for usb memory sticks after plugging in and plugging out (because then, the driver is still loaded), or polling for normal floppy disks.
If anyone finds/knows a solution for this it would be of great interest to me.
Regards
Clemens
Signature · 15 lines
Clemens Wacha [email protected] ICQ:12620942 proudly running Debian/GNU Linux. See http://www.debian.org ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
udev depends on /usr
In reply to Greg KHQuoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gz
Little problem ;)
I have some modules in /etc/modprobe.preload. Subject of this mail is ide-cd.
When ide-cd gets loaded, the kernel/udev chain calls /etc/udev/scripts/ide-devfs.sh, wich uses 'expr'. I my system (Mandrake 10) and on a RedHat 9 'expr' lives in /usr/bin, and /usr can be still unmounted when rc.modules is called...
Solution ? Change udev, change coreutils locations... Standarisation of what is avaliable from coreutils before /usr ?
TIA
Signature · 15 lines
J.A. Magallon <jamagallon()able!es> \ Software is like sex: werewolf!able!es \ It's better when it's free Mandrake Linux release 10.0 (Cooker) for i586 Linux 2.6.2-rc2-jam2 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-4mdk)) ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: udev depends on /usr
Quoted 10 lines · J.A. Magallon
Quoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gzLittle problem ;)
I have some modules in/etc/modprobe.preload. Subject of this mail is ide-cd.
Quoted 6 lines
When ide-cd gets loaded, the kernel/udev chain calls
/etc/udev/scripts/ide-devfs.sh, wich uses 'expr'. I my system (Mandrake 10) and on a RedHat 9 'expr' lives in/usr/bin, and /usr can be still unmounted when rc.modules is called...Solution ? Change udev, change coreutils locations...
How about, don't rely on ide-devfs.sh as you are trying valiantly to hold on to a dieing naming scheme that is not LSB compliant? :)
Seriously, I don't know.
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: udev depends on /usr
Quoted 16 lines · Greg KH
Quoted 15 lines · J.A. Magallon
Quoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gzLittle problem ;)
I have some modules in/etc/modprobe.preload. Subject of this mail is ide-cd.When ide-cd gets loaded, the kernel/udev chain calls
/etc/udev/scripts/ide-devfs.sh, wich uses 'expr'. I my system (Mandrake 10) and on a RedHat 9 'expr' lives in/usr/bin, and /usr can be still unmounted when rc.modules is called...
Quoted 5 lines
Quoted 1 line
Solution ? Change udev, change coreutils locations...
How about, don't rely on
ide-devfs.shas you are trying valiantly to hold on to a dieing naming scheme that is not LSB compliant? :)
Thaks. I don't even have devfs support in my kernel...
Signature · 15 lines
J.A. Magallon <jamagallon()able!es> \ Software is like sex: werewolf!able!es \ It's better when it's free Mandrake Linux release 10.0 (Cooker) for i586 Linux 2.6.2-rc2-jam2 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-4mdk)) ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: udev depends on /usr
In reply to Greg KHQuoted 11 lines · Greg KH
Quoted 10 lines · J.A. Magallon
Quoted 3 lines · Greg KH
I've released the 015 version of udev. It can be found at:
kernel.org/pub/linux/utils/kernel/hotplug/udev-015.tar.gzLittle problem ;)
I have some modules in/etc/modprobe.preload. Subject of this mail is ide-cd.
Quoted 7 lines
Quoted 6 lines
When ide-cd gets loaded, the kernel/udev chain calls
/etc/udev/scripts/ide-devfs.sh, wich uses 'expr'. I my system (Mandrake 10) and on a RedHat 9 'expr' lives in/usr/bin, and /usr can be still unmounted when rc.modules is called...Solution ? Change udev, change coreutils locations...
Maybe try to change:
HOST=expr ${HOST} - 1
to
Host=$((HOST - 1))
? It should be sh compatible, but having used bash too long, I am not sure 8) (although sh -c 'foo=2; echo $((foo + 1))' work with bash in sh mode ..)
Cheers,
Signature · 1 line
Martin Schlemmer
Hi,
I wonder why your framebuffer patch didn't make it into mm-kernel? Was something wrong about it? I applied it and then bootsplash doesn't complain about missing /dev/fb0...
Prakash
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Prakash K. Cheemplavam
Hi,
I wonder why your framebuffer patch didn't make it into mm-kernel? Was something wrong about it? I applied it and then bootsplash doesn't complain about missing
/dev/fb0...
I didn't ask for it to go into the -mm kernel :)
I thought the framebuffer update was going to make it into there, but I guess it never did. I guess I can dig it out of my tree and send it to Andrew in a few days.
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel