Bug#493751: Doesn't detect any device

2008-08-06 Thread Aurelien Jarno
On Wed, Aug 06, 2008 at 01:53:08AM +0200, Aurelien Jarno wrote:
> reassign 493751 libc6
> retitle 493751 libc6: mknod() only allow 8-bit minors on mips
> thanks
> 
> On Tue, Aug 05, 2008 at 08:19:16AM +0200, Giuseppe Sacco wrote:
> > On Tue, 5 Aug 2008 01:54:27 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> > [...]
> > > Oh, and BTW, 133 + 256 = 389. Maybe this rule doesn't apply to all
> > > architectures, I gave the formula from my powerpc and my amd64 machines,
> > > maybe there is a different one on mips. Or maybe that's why accessing to
> > > USB devices doesn't work.
> > 
> > I don't know exactly what happened, but after upgrading udev to unstable
> > version and a reboot, lsusb works correctly.
> > 
> > When I rebooted the machine, I used sane-find-scanner to detect scanners.
> > It worked. Then I used "xscanimage" but this did not worked because it got
> > a problem connecting to the scanner.
> 
> I have found the problem: the glibc on mips only allow 8-bits for the
> minor, and strips the upper bits. That's why it works when your device
> appears on bus 1. This bugs has been fixed very recently upstream. I am
> therefore reassigning this bug to the libc6 package.
> 

Please find a glibc package which includes the fix on
http://temp.aurel32.net/mips/

You should install libc6 in any case, plus the other packages if they 
are already installed on your system in order to not break the
dependencies.

Could you please confirm me that it fixes at least the mknod issues?

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-07 Thread Giuseppe Sacco
Goodmorning Aurelien,

On Wed, 6 Aug 2008 21:31:29 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 06, 2008 at 01:53:08AM +0200, Aurelien Jarno wrote:
[...]
> Please find a glibc package which includes the fix on
> http://temp.aurel32.net/mips/
> 
> You should install libc6 in any case, plus the other packages if they 
> are already installed on your system in order to not break the
> dependencies.
> 
> Could you please confirm me that it fixes at least the mknod issues?

I had installed libc6. libc6dev and locales 2.7-10, so I updated only those
packages to 2.7-13+mips as you suggested. The libusb problem is still
unchanged, but I think the problem is really in the kernel. My last test,
after a reboot to clean everything, has gone this way:
1. check lsusb (no devices)
2. plug in the scanner
3. check lsusb (device correctly listed)
4. check /dev/bus/usb/
sgi:/proc/bus/usb# ls -l /dev/bus/usb/*/*
crw-rw-r-- 1 root root189,   0 2008-08-07 09:23 /dev/bus/usb/001/001
crw-rw-r-- 1 root scanner 189,   6 2008-08-07 09:22 /dev/bus/usb/001/007
crw-rw-r-- 1 root root189, 128 2008-08-07 09:22 /dev/bus/usb/002/001
crw-rw-r-- 1 root root189,   0 2008-08-07 09:22 /dev/bus/usb/003/001
5. sane-find-scanner (as root) found the scanner as EPSON
6. scanimage crashed with error
[...]
[sanei_usb] B130: D2 35 12 7C 75 C2 14 D2 15 75 0B 00 12 41 62 85 
.5.|uu...Ab.
[sanei_usb] B140: 01 0E 12 6E 95 C2 02 D2 97 12 44 7F 02 AF 6D C5 
...n..D...m.
[sanei_usb] sanei_usb_write_bulk: write failed: Resource temporarily 
unavailable scanimage: open of device
snapscan:libusb:001:007 failed: Error during device I/O
7. unplugging the device, its node in /dev/bus/usb has been removed
8. plugging in it again, its node did not appear anymore

Do you have any idea about how to activate a better logging from the kernel USB 
subsystem?

Anyway, I did try mknod by hand and it seems to be ok

sgi:/tmp# mknod 014 c 189 389 
sgi:/tmp# ls -l 014
crw-r--r-- 1 root root 189, 389 2008-08-07 09:38 014

Thanks,
Giuseppe



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Giuseppe Sacco
Package: libusb-0.1-4
Version: 2:0.1.12-5
Severity: important

Hi all,
I am testing usb on SGI O2 (mips cpu, 64 bits kernel, 32 bits userland). This 
is something new and I am trying to document a problem with USB and libusb.

Using latest kernel from experimental 2.6.26-1-r5k-ip32 (previouses kernels did 
not support USB at all), we got many CONFIG_USB built into the kernel or as 
modules.
Actually, I may use storage devices without any problem, but I cannot access 
devices via libusb.
This means that "lsusb" tool does not list any device (beside internal hubs), 
while application like "sane" cannot access usb scanners via libusb.

Please find attached what happens when I plug a 512Mb pendrive and then I 
replace it with a scanner.
Kernel correctly manage the usb insertion/detection/removal, while libusb 
always display and empty list.
Please also notice that /proc/bus/usb/devices correctly report all plugged 
devices.
Moreover, when I plug in the scanner USB cable, udev detect it and change 
ownership of /dev/bus/usb/???/???.

I recompiled more recent packages than what were shipped with etch, but I get 
the same behaviour. I used:
libusb 2:0.1.12-12
udev 0.114-2
libsane 1.0.19-16
libsepol 2.0.30-2
libselinux 2.0.65-4

Thanks for your help,
Giuseppe

[EMAIL PROTECTED]:~$ sudo su -
Password:
sgi:~# tail -f /var/log/syslog&
[1] 9348
sgi:~#
Aug  4 19:11:22 sgi kernel: [17182202.312000] usb 3-2: new high speed USB 
device using ehci_hcd and address 3
Aug  4 19:11:22 sgi kernel: [17182202.46] usb 3-2: configuration #1 chosen 
from 1 choice
Aug  4 19:11:22 sgi kernel: [17182202.468000] hub 3-2:1.0: USB hub found
Aug  4 19:11:22 sgi kernel: [17182202.468000] hub 3-2:1.0: 1 port detected
Aug  4 19:11:22 sgi kernel: [17182202.588000] usb 3-2: New USB device found, 
idVendor=067b, idProduct=2515
Aug  4 19:11:22 sgi kernel: [17182202.588000] usb 3-2: New USB device strings: 
Mfr=1, Product=3, SerialNumber=0
Aug  4 19:11:22 sgi kernel: [17182202.588000] usb 3-2: Product: USB Embedded Hub
Aug  4 19:11:22 sgi kernel: [17182202.588000] usb 3-2: Manufacturer: Prolific 
Technology Inc.
Aug  4 19:11:22 sgi kernel: [17182202.796000] usb 3-2.1: new high speed USB 
device using ehci_hcd and address 4
Aug  4 19:11:22 sgi kernel: [17182202.908000] usb 3-2.1: configuration #1 
chosen from 1 choice
Aug  4 19:11:22 sgi kernel: [17182202.916000] usb 3-2.1: New USB device found, 
idVendor=067b, idProduct=2517
Aug  4 19:11:22 sgi kernel: [17182202.916000] usb 3-2.1: New USB device 
strings: Mfr=1, Product=4, SerialNumber=0
Aug  4 19:11:22 sgi kernel: [17182202.916000] usb 3-2.1: Product: USB Mass 
Storage Device
Aug  4 19:11:22 sgi kernel: [17182202.916000] usb 3-2.1: Manufacturer: Prolific 
Technology Inc.
Aug  4 19:11:24 sgi kernel: [17182204.684000] Initializing USB Mass Storage 
driver...
Aug  4 19:11:24 sgi kernel: [17182204.72] scsi2 : SCSI emulation for USB 
Mass Storage devices
Aug  4 19:11:24 sgi kernel: [17182204.728000] usbcore: registered new interface 
driver usb-storage
Aug  4 19:11:24 sgi kernel: [17182204.728000] USB Mass Storage support 
registered.
Aug  4 19:11:24 sgi kernel: [17182204.748000] usb-storage: device found at 4
Aug  4 19:11:24 sgi kernel: [17182204.748000] usb-storage: waiting for device 
to settle before scanning
Aug  4 19:11:29 sgi kernel: [17182209.748000] usb-storage: device scan complete
Aug  4 19:11:29 sgi kernel: [17182209.752000] scsi 2:0:0:0: Direct-Access 
Prolific USB Flash Disk   P1.0 PQ: 0 ANSI: 0 CCS
Aug  4 19:11:29 sgi kernel: [17182209.788000] sd 2:0:0:0: [sdc] 1024000 
512-byte hardware sectors (524 MB)
Aug  4 19:11:29 sgi kernel: [17182209.788000] sd 2:0:0:0: [sdc] Write Protect 
is off
Aug  4 19:11:29 sgi kernel: [17182209.788000] sd 2:0:0:0: [sdc] Mode Sense: 00 
06 00 00
Aug  4 19:11:29 sgi kernel: [17182209.788000] sd 2:0:0:0: [sdc] Assuming drive 
cache: write through
Aug  4 19:11:29 sgi kernel: [17182209.80] sd 2:0:0:0: [sdc] 1024000 
512-byte hardware sectors (524 MB)
Aug  4 19:11:29 sgi kernel: [17182209.804000] sd 2:0:0:0: [sdc] Write Protect 
is off
Aug  4 19:11:29 sgi kernel: [17182209.804000] sd 2:0:0:0: [sdc] Mode Sense: 00 
06 00 00
Aug  4 19:11:29 sgi kernel: [17182209.804000] sd 2:0:0:0: [sdc] Assuming drive 
cache: write through
Aug  4 19:11:29 sgi kernel: [17182209.804000]  sdc:
Aug  4 19:11:29 sgi kernel: [17182209.924000] sd 2:0:0:0: [sdc] Attached SCSI 
removable disk
Aug  4 19:11:29 sgi kernel: [17182209.924000] sd 2:0:0:0: Attached scsi generic 
sg3 type 0

sgi:~# lsusb
Bus 003 Device 001: ID 1d6b:0001  
Bus 001 Device 001: ID 1d6b:0001  
Bus 002 Device 001: ID 1d6b:0001  

sgi:~# cat /proc/partitions 
major minor  #blocks  name

   8 0   71819496 sda
   8 1   71810550 sda1
   8 9   2048 sda9
   811   71818582 sda11
   816   17847430 sdb
   8171019904 sdb1
   818   16822272 sdb2
   825   5120 sdb9
   827   17847296 sdb11
 254 0 262144 dm-0
   832 512000 sdc

sgi:~# Aug  4 19:13:40 sg

Bug#493751: Doesn't detect any device

2008-08-04 Thread Aurelien Jarno
On Mon, Aug 04, 2008 at 07:41:24PM +0200, Giuseppe Sacco wrote:
> Package: libusb-0.1-4
> Version: 2:0.1.12-5
> Severity: important
> 
> Hi all,
> I am testing usb on SGI O2 (mips cpu, 64 bits kernel, 32 bits userland). This 
> is something new and I am trying to document a problem with USB and libusb.

Do you now if it works with a 32-bit kernel? It can be related to the
32-bit compat syscalls which are not correctly implemented within the 
kernel. Alternatively you can try to build a 64-bit version of libusb
and usbutils.

> Using latest kernel from experimental 2.6.26-1-r5k-ip32 (previouses kernels 
> did not support USB at all), we got many CONFIG_USB built into the kernel or 
> as modules.
> Actually, I may use storage devices without any problem, but I cannot access 
> devices via libusb.
> This means that "lsusb" tool does not list any device (beside internal hubs), 
> while application like "sane" cannot access usb scanners via libusb.
> 
> Please find attached what happens when I plug a 512Mb pendrive and then I 
> replace it with a scanner.
> Kernel correctly manage the usb insertion/detection/removal, while libusb 
> always display and empty list.
> Please also notice that /proc/bus/usb/devices correctly report all plugged 
> devices.
> Moreover, when I plug in the scanner USB cable, udev detect it and change 
> ownership of /dev/bus/usb/???/???.
> 

Could you please set the environment variable USB_DEBUG to 255 and run
lsusb or any other USB application. This should give you a hint about 
the problem. Also running lsusb with strace could give more details.

Aurelien

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Giuseppe Sacco
On Mon, 4 Aug 2008 21:59:06 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
[...]
> Could you please set the environment variable USB_DEBUG to 255 and run
> lsusb or any other USB application. This should give you a hint about 
> the problem. Also running lsusb with strace could give more details.

[EMAIL PROTECTED]:~$ sudo env USB_DEBUG=255 lsusb
Password:
usb_set_debug: Setting debugging level to 255 (on)
usb_os_init: Found USB VFS at /dev/bus/usb
usb_os_find_busses: Found 003
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Couldn't open /dev/bus/usb/003/007
usb_os_find_devices: Couldn't open /dev/bus/usb/003/006
usb_os_find_devices: Couldn't open /dev/bus/usb/003/005
usb_os_find_devices: Couldn't open /dev/bus/usb/003/004
usb_os_find_devices: Couldn't open /dev/bus/usb/003/003
usb_os_find_devices: Couldn't open /dev/bus/usb/003/002
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
Bus 003 Device 001: ID 1d6b:0001  
Bus 001 Device 001: ID 1d6b:0001  
Bus 002 Device 001: ID 1d6b:0001 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Aurelien Jarno
On Mon, Aug 04, 2008 at 11:57:56PM +0200, Giuseppe Sacco wrote:
> On Mon, 4 Aug 2008 21:59:06 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> [...]
> > Could you please set the environment variable USB_DEBUG to 255 and run
> > lsusb or any other USB application. This should give you a hint about 
> > the problem. Also running lsusb with strace could give more details.
> 
> [EMAIL PROTECTED]:~$ sudo env USB_DEBUG=255 lsusb
> Password:
> usb_set_debug: Setting debugging level to 255 (on)
> usb_os_init: Found USB VFS at /dev/bus/usb
> usb_os_find_busses: Found 003
> usb_os_find_busses: Found 001
> usb_os_find_busses: Found 002
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/007
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/006
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/005
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/004
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/003
> usb_os_find_devices: Couldn't open /dev/bus/usb/003/002

So it seems it can't open the devices. The corresponding code in libusb
is:

fd = open(filename, O_RDWR);
if (fd < 0) {
  fd = open(filename, O_RDONLY);
  if (fd < 0) {
if (usb_debug >= 2)
  fprintf(stderr, "usb_os_find_devices: Couldn't open %s\n",
  filename);

So either it is a bug in the kernel, either udev creates the wrong
devices. Running "strace lsusb" will most probably give the answer.

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Giuseppe Sacco
On Tue, 5 Aug 2008 00:28:29 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
[...]
> So it seems it can't open the devices. The corresponding code in libusb
> is:
> 
> fd = open(filename, O_RDWR);
> if (fd < 0) {
>   fd = open(filename, O_RDONLY);
>   if (fd < 0) {
> if (usb_debug >= 2)
>   fprintf(stderr, "usb_os_find_devices: Couldn't open %s\n",
>   filename);
> 
> So either it is a bug in the kernel, either udev creates the wrong
> devices. Running "strace lsusb" will most probably give the answer.

strace shows
11584 fstat64(3, {st_mode=S_IFDIR|0755, st_size=180, ...}) = 0
11584 getdents(3, /* 9 entries */, 4096) = 144
11584 open("/dev/bus/usb/003/007", O_RDWR) = -1 ENOENT (No such file or 
directory)
11584 open("/dev/bus/usb/003/007", O_RDONLY) = -1 ENOENT (No such file or 
directory)
11584 open("/dev/bus/usb/003/006", O_RDWR) = -1 ENOENT (No such file or 
directory)
11584 open("/dev/bus/usb/003/006", O_RDONLY) = -1 ENOENT (No such file or 
directory)

but those files are there. (Strange thing: old files aren't deleted when
device is unplugged.)

[EMAIL PROTECTED]:~$ ls -l /dev/bus/usb/003/00*
crw-rw 1 root root189, 0 2008-08-05 08:07 /dev/bus/usb/003/001
crw-rw-r-- 1 root scanner 189, 1 2008-08-04 18:33 /dev/bus/usb/003/002
crw-rw 1 root root189, 2 2008-08-04 19:11 /dev/bus/usb/003/003
crw-rw 1 root root189, 3 2008-08-04 19:11 /dev/bus/usb/003/004
crw-rw-r-- 1 root scanner 189, 4 2008-08-04 19:13 /dev/bus/usb/003/005
crw-rw 1 root root189, 5 2008-08-04 23:55 /dev/bus/usb/003/006
crw-rw 1 root root189, 6 2008-08-04 23:55 /dev/bus/usb/003/007

major 189 is USB, as shown from:

[EMAIL PROTECTED]:~$ grep 189 /proc/devices 
189 usb_device



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Aurelien Jarno
On Tue, Aug 05, 2008 at 12:37:48AM +0200, Giuseppe Sacco wrote:
> On Tue, 5 Aug 2008 00:28:29 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> [...]
> > So it seems it can't open the devices. The corresponding code in libusb
> > is:
> > 
> > fd = open(filename, O_RDWR);
> > if (fd < 0) {
> >   fd = open(filename, O_RDONLY);
> >   if (fd < 0) {
> > if (usb_debug >= 2)
> >   fprintf(stderr, "usb_os_find_devices: Couldn't open %s\n",
> >   filename);
> > 
> > So either it is a bug in the kernel, either udev creates the wrong
> > devices. Running "strace lsusb" will most probably give the answer.
> 
> strace shows
> 11584 fstat64(3, {st_mode=S_IFDIR|0755, st_size=180, ...}) = 0
> 11584 getdents(3, /* 9 entries */, 4096) = 144
> 11584 open("/dev/bus/usb/003/007", O_RDWR) = -1 ENOENT (No such file or 
> directory)
> 11584 open("/dev/bus/usb/003/007", O_RDONLY) = -1 ENOENT (No such file or 
> directory)
> 11584 open("/dev/bus/usb/003/006", O_RDWR) = -1 ENOENT (No such file or 
> directory)
> 11584 open("/dev/bus/usb/003/006", O_RDONLY) = -1 ENOENT (No such file or 
> directory)
> 
> but those files are there. (Strange thing: old files aren't deleted when
> device is unplugged.)

The fact that the files are there doesn't mean they are usable, they
also have to be known by the kernel.

> [EMAIL PROTECTED]:~$ ls -l /dev/bus/usb/003/00*
> crw-rw 1 root root189, 0 2008-08-05 08:07 /dev/bus/usb/003/001
> crw-rw-r-- 1 root scanner 189, 1 2008-08-04 18:33 /dev/bus/usb/003/002
> crw-rw 1 root root189, 2 2008-08-04 19:11 /dev/bus/usb/003/003
> crw-rw 1 root root189, 3 2008-08-04 19:11 /dev/bus/usb/003/004
> crw-rw-r-- 1 root scanner 189, 4 2008-08-04 19:13 /dev/bus/usb/003/005
> crw-rw 1 root root189, 5 2008-08-04 23:55 /dev/bus/usb/003/006
> crw-rw 1 root root189, 6 2008-08-04 23:55 /dev/bus/usb/003/007
> 
> major 189 is USB, as shown from:
> 
> [EMAIL PROTECTED]:~$ grep 189 /proc/devices 
> 189 usb_device
> 

What is strange is that the minor should be (bus * 128) + device. This
is not the case here. Try to manually create the device node with mknod
according to this formula to see if it works.

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-04 Thread Giuseppe Sacco
On Tue, 5 Aug 2008 01:54:27 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
[...]
> Oh, and BTW, 133 + 256 = 389. Maybe this rule doesn't apply to all
> architectures, I gave the formula from my powerpc and my amd64 machines,
> maybe there is a different one on mips. Or maybe that's why accessing to
> USB devices doesn't work.

I don't know exactly what happened, but after upgrading udev to unstable
version and a reboot, lsusb works correctly.

When I rebooted the machine, I used sane-find-scanner to detect scanners.
It worked. Then I used "xscanimage" but this did not worked because it got
a problem connecting to the scanner.

>From that moment, I cannot use any USB device via libusb: when trying again
to identify the device I get a lot of "Operation not permitted" and
"Connection timed out":

[EMAIL PROTECTED]:~$ lsusb
Bus 002 Device 001: ID 1d6b:0001  
Bus 003 Device 001: ID 1d6b:0002  
Bus 001 Device 006: ID 04b8:011f Seiko Epson Corp. Perfection 1670
Bus 001 Device 001: ID 1d6b:0002  

[EMAIL PROTECTED]:~$ SANE_DEBUG_SANEI_USB=255 sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

[sanei_debug] Setting debug level of sanei_usb to 255.
[sanei_usb] sanei_usb_init: Looking for kernel scanner devices
[sanei_usb] sanei_usb_init: can't stat /dev/usb/: No such file or directory
[sanei_usb] sanei_usb_init: Looking for libusb devices
usb_set_debug: Setting debugging level to 255 (on)
usb_os_find_busses: Found 002
usb_os_find_busses: Found 003
usb_os_find_busses: Found 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 002
error obtaining child information: Operation not permitted
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 003
error obtaining child information: Operation not permitted
usb_os_find_devices: Found 006 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Operation not permitted
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0001, interface 0 doesn't look like 
a scanner (9/9)
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0001: no suitable interfaces
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0002, interface 0 doesn't look like 
a scanner (9/9)
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0002: no suitable interfaces
[sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x011f) interface 0  at 
libusb:001:006
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0002, interface 0 doesn't look like 
a scanner (9/9)
[sanei_usb] sanei_usb_init: device 0x1d6b/0x0002: no suitable interfaces
[sanei_usb] sanei_usb_init: found 1 devices
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner0'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner0' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner1'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner1' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner2'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner2' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner3'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner3' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner4'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner4' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner5'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner5' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner5'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner5' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner7'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner7' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner8'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner8' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner9'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner9' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner10'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner10' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner11'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb/scanner11' in list
[sanei_usb] sanei_usb_open: trying to open device `/dev/usb/scanner12'
[sanei_usb] sanei_usb_open: can't find device `/dev/usb

Bug#493751: Doesn't detect any device

2008-08-04 Thread Giuseppe Sacco
On Tue, 5 Aug 2008 00:48:27 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
[...]
> > [EMAIL PROTECTED]:~$ ls -l /dev/bus/usb/003/00*
> > crw-rw 1 root root189, 0 2008-08-05 08:07 /dev/bus/usb/003/001
> > crw-rw-r-- 1 root scanner 189, 1 2008-08-04 18:33 /dev/bus/usb/003/002
> > crw-rw 1 root root189, 2 2008-08-04 19:11 /dev/bus/usb/003/003
> > crw-rw 1 root root189, 3 2008-08-04 19:11 /dev/bus/usb/003/004
> > crw-rw-r-- 1 root scanner 189, 4 2008-08-04 19:13 /dev/bus/usb/003/005
> > crw-rw 1 root root189, 5 2008-08-04 23:55 /dev/bus/usb/003/006
> > crw-rw 1 root root189, 6 2008-08-04 23:55 /dev/bus/usb/003/007
> > 
> > major 189 is USB, as shown from:
> > 
> > [EMAIL PROTECTED]:~$ grep 189 /proc/devices 
> > 189 usb_device
> > 
> 
> What is strange is that the minor should be (bus * 128) + device. This
> is not the case here. Try to manually create the device node with mknod
> according to this formula to see if it works.

how can it be? Shouldn't minor be ledd than 256? I think in my case bus=003 amd 
device 014, so minor should be 389, but mknod create a different device:

sgi:/dev/bus/usb/003# rm 014
sgi:/dev/bus/usb/003# mknod 014 c 189 389 
sgi:/dev/bus/usb/003# ls -l
totale 0
crw-rw 1 root root189,   0 2008-08-05 08:07 001
crw-rw-r-- 1 root scanner 189,   1 2008-08-04 18:33 002
crw-rw 1 root root189,   2 2008-08-04 19:11 003
crw-rw 1 root root189,   3 2008-08-04 19:11 004
crw-rw-r-- 1 root scanner 189,   4 2008-08-04 19:13 005
crw-rw 1 root root189,   5 2008-08-04 23:55 006
crw-rw 1 root root189,   6 2008-08-04 23:55 007
crw-rw-r-- 1 root scanner 189,   9 2008-08-05 00:52 010
crw-rw-r-- 1 root root189,  10 2008-08-05 00:54 011
crw-rw-r-- 1 root root189,  11 2008-08-05 00:54 012
crw-rw-r-- 1 root root189,  12 2008-08-05 00:55 013
crw-r--r-- 1 root root189, 133 2008-08-05 01:00 014
sgi:/dev/bus/usb/003# lsusb
Bus 003 Device 001: ID 1d6b:0001  
Bus 001 Device 001: ID 1d6b:0001  
Bus 002 Device 001: ID 1d6b:0001  
sgi:/dev/bus/usb/003# 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-05 Thread Aurelien Jarno
On Tue, Aug 05, 2008 at 01:04:55AM +0200, Giuseppe Sacco wrote:
> On Tue, 5 Aug 2008 00:48:27 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> [...]
> > > [EMAIL PROTECTED]:~$ ls -l /dev/bus/usb/003/00*
> > > crw-rw 1 root root189, 0 2008-08-05 08:07 /dev/bus/usb/003/001
> > > crw-rw-r-- 1 root scanner 189, 1 2008-08-04 18:33 /dev/bus/usb/003/002
> > > crw-rw 1 root root189, 2 2008-08-04 19:11 /dev/bus/usb/003/003
> > > crw-rw 1 root root189, 3 2008-08-04 19:11 /dev/bus/usb/003/004
> > > crw-rw-r-- 1 root scanner 189, 4 2008-08-04 19:13 /dev/bus/usb/003/005
> > > crw-rw 1 root root189, 5 2008-08-04 23:55 /dev/bus/usb/003/006
> > > crw-rw 1 root root189, 6 2008-08-04 23:55 /dev/bus/usb/003/007
> > > 
> > > major 189 is USB, as shown from:
> > > 
> > > [EMAIL PROTECTED]:~$ grep 189 /proc/devices 
> > > 189 usb_device
> > > 
> > 
> > What is strange is that the minor should be (bus * 128) + device. This
> > is not the case here. Try to manually create the device node with mknod
> > according to this formula to see if it works.
> 
> how can it be? Shouldn't minor be ledd than 256? I think in my case bus=003 
> amd device 014, so minor should be 389, but mknod create a different device:

No, nothing prevents the minor part to be more than 256. But I was
actually wrong in my formula, counting bus and devices should start from
0, so it is actually:

minor = (bus - 1) * 128 + (device - 1)

That is 269 in your case.

> sgi:/dev/bus/usb/003# rm 014
> sgi:/dev/bus/usb/003# mknod 014 c 189 389 
> sgi:/dev/bus/usb/003# ls -l
> totale 0
> crw-rw 1 root root189,   0 2008-08-05 08:07 001
> crw-rw-r-- 1 root scanner 189,   1 2008-08-04 18:33 002
> crw-rw 1 root root189,   2 2008-08-04 19:11 003
> crw-rw 1 root root189,   3 2008-08-04 19:11 004
> crw-rw-r-- 1 root scanner 189,   4 2008-08-04 19:13 005
> crw-rw 1 root root189,   5 2008-08-04 23:55 006
> crw-rw 1 root root189,   6 2008-08-04 23:55 007
> crw-rw-r-- 1 root scanner 189,   9 2008-08-05 00:52 010
> crw-rw-r-- 1 root root189,  10 2008-08-05 00:54 011
> crw-rw-r-- 1 root root189,  11 2008-08-05 00:54 012
> crw-rw-r-- 1 root root189,  12 2008-08-05 00:55 013
> crw-r--r-- 1 root root189, 133 2008-08-05 01:00 014

Oh that's, strange, as it works here. Maybe you could try to create it
on another filesystem to see if you get the same strange effect. If not,
you can symlink this device node from /dev/bus/usb/003

Oh, and BTW, 133 + 256 = 389. Maybe this rule doesn't apply to all
architectures, I gave the formula from my powerpc and my amd64 machines,
maybe there is a different one on mips. Or maybe that's why accessing to
USB devices doesn't work.

-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#493751: Doesn't detect any device

2008-08-05 Thread Aurelien Jarno
reassign 493751 libc6
retitle 493751 libc6: mknod() only allow 8-bit minors on mips
thanks

On Tue, Aug 05, 2008 at 08:19:16AM +0200, Giuseppe Sacco wrote:
> On Tue, 5 Aug 2008 01:54:27 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote:
> [...]
> > Oh, and BTW, 133 + 256 = 389. Maybe this rule doesn't apply to all
> > architectures, I gave the formula from my powerpc and my amd64 machines,
> > maybe there is a different one on mips. Or maybe that's why accessing to
> > USB devices doesn't work.
> 
> I don't know exactly what happened, but after upgrading udev to unstable
> version and a reboot, lsusb works correctly.
> 
> When I rebooted the machine, I used sane-find-scanner to detect scanners.
> It worked. Then I used "xscanimage" but this did not worked because it got
> a problem connecting to the scanner.

I have found the problem: the glibc on mips only allow 8-bits for the
minor, and strips the upper bits. That's why it works when your device
appears on bus 1. This bugs has been fixed very recently upstream. I am
therefore reassigning this bug to the libc6 package.

> From that moment, I cannot use any USB device via libusb: when trying again
> to identify the device I get a lot of "Operation not permitted" and

"Operation not permitted" messages are normal, given that you are not 
root. Also some operations are not allowed on some USB devices, it is
safe to ignore them.

> "Connection timed out":

This looks more problematic, please first try to run sane-find-scanner
as root, to make sure it is not a permission issue. If it doesn't work,
it looks like a kernel issue. Also the device can be in autosuspend
mode, try to tweak /sys/bus/usb/devices/usb1/power/autosuspend .


-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]