linux/include
Kay Sievers fbf82fd2e1 [PATCH] USB: real nodes instead of usbfs
This patch introduces a /sys/class/usb_device/ class
where every connected usb-device will show up:

  tree /sys/class/usb_device/
  /sys/class/usb_device/
  |-- usb1.1
  |   |-- dev
  |   `-- device -> ../../../devices/pci0000:00/0000:00:1d.0/usb1
  |-- usb2.1
  |   |-- dev
  |   `-- device -> ../../../devices/pci0000:00/0000:00:1d.1/usb2
  ...

The presence of the "dev" file lets udev create real device nodes.
  kay@pim:~/src/linux-2.6> tree /dev/bus/usb/
  /dev/bus/usb/
  |-- 1
  |   `-- 1
  |-- 2
  |   `-- 1
  ...

udev rule:
  SUBSYSTEM="usb_device", PROGRAM="/sbin/usb_device %k", NAME="%c"
  (echo $1 | /bin/sed 's/usb\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/')

This makes libusb pick up the real nodes instead of the mounted usbfs:
  export USB_DEVFS_PATH=/dev/bus/usb

Background:
  All this makes it possible to manage usb devices with udev instead of
  the devfs solution. We are currently working on a pam_console/resmgr
  replacement driven by udev and a pam-helper. It applies ACL's to device
  nodes, which is required for modern desktop functionalty like
  "Fast User Switching" or multiple local login support.

New patch with its own major. I've succesfully disabled usbfs and use real
nodes only on my box. With: "export USB_DEVFS_PATH=/dev/bus/usb" libusb picks
up the udev managed nodes instead of reading usbfs files.

This makes udev to provide symlinks for libusb to pick up:
  SUBSYSTEM="usb_device", PROGRAM="/sbin/usbdevice %k", SYMLINK="%c"

/sbin/usbdevice:
  #!/bin/sh
  echo $1 | /bin/sed 's/usbdev\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/'

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:29 -07:00
..
acpi [ACPI] ACPICA 20050902 2005-09-03 00:15:11 -04:00
asm-alpha [PATCH] Clean up struct flock definitions 2005-09-07 16:57:38 -07:00
asm-arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-09-07 17:00:53 -07:00
asm-arm26 [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-cris [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-frv [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-generic [PATCH] Kprobes: prevent possible race conditions generic 2005-09-07 16:57:59 -07:00
asm-h8300 [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-i386 Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
asm-ia64 Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
asm-m32r [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-m68k [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-m68knommu [PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers 2005-09-07 16:57:35 -07:00
asm-mips [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-parisc [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-powerpc [PATCH] Consolidate the asm-ppc*/fcntl.h files into asm-powerpc 2005-09-07 16:57:39 -07:00
asm-ppc [PATCH] Consolidate the asm-ppc*/fcntl.h files into asm-powerpc 2005-09-07 16:57:39 -07:00
asm-ppc64 [PATCH] kprobes: fix bug when probed on task and isr functions 2005-09-07 16:58:01 -07:00
asm-s390 [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-sh [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-sh64 [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-sparc [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-sparc64 [PATCH] Clean up struct flock definitions 2005-09-07 16:57:38 -07:00
asm-um [PATCH] remove asm-*/hdreg.h 2005-09-07 16:57:30 -07:00
asm-v850 [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
asm-x86_64 Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
asm-xtensa [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
linux [PATCH] USB: real nodes instead of usbfs 2005-09-08 16:22:29 -07:00
math-emu
media [PATCH] I2C: Kill i2c_algorithm.id (6/7) 2005-09-05 09:14:32 -07:00
mtd
net [PATCH] Fix 32bit sendmsg() flaw 2005-09-08 08:14:11 -07:00
pcmcia
rdma
rxrpc
scsi Merge by hand (conflicts in sd.c) 2005-09-06 17:52:54 -05:00
sound Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6 2005-09-07 17:28:25 -07:00
video [PATCH] w100fb: Rewrite for platform independence 2005-09-07 16:57:53 -07:00