Skip to contentSkip to conversation

2.6.29rc1 brakes usb

DISCUSSION Folkert van Heusden 3 participants 9 messages Jan 26, 2009 – Feb 2, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

I googled for git bisect but it seems that will take a looong time (building kernel takes aprox 4 hours) so maybe there's a shortcut I can take?

Folkert van Heusden

Signature · 5 lines
www.vanheusden.com/multitail - win een vlaai van multivlaai! zorg
ervoor dat multitail opgenomen wordt in Fedora Core, AIX, Solaris of
HP/UX en win een vlaai naar keuze
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
#1 lore raw

Re: 2.6.29rc1 breakes usb: hiddev device no longer available

Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

This is the WORKING situation:

open("/dev/usb/hiddev0", O_RDWR)        = 3
ioctl(3, HIDIOCGDEVINFO, 0xbfa71a48)    = 0
ioctl(3, HIDIOCAPPLICATION, 0)          = -6291455
ioctl(3, HIDIOCGSTRING, 0x804e2c0)      = 7

the is the FAILURE situation (2.6.29-rc*):

open("/dev/usb/hiddev0", O_RDWR)        = 3
ioctl(3, HIDIOCGDEVINFO, 0xbf90c0d8)    = 0
ioctl(3, HIDIOCAPPLICATION, 0)          = -6291455
ioctl(3, HIDIOCGSTRING, 0x804e2c0)      = -1 ENODEV (No such device)

Bus 002 Device 003: ID 0d50:0008 Cleware GmbH
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10

  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0d50 Cleware GmbH
  idProduct          0x0008 
  bcdDevice            0.17
  iManufacturer           1 Cleware GmbH
  iProduct                2 USB-Switch
  iSerial                 3 000175C
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 120mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 48
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 50
Device Status: 0x0000
(Bus Powered)

Folkert van Heusden

Signature · 5 lines
To MultiTail einai ena polymorfiko ergaleio gia ta logfiles kai tin
eksodo twn entolwn. Prosferei: filtrarisma, xrwmatismo, sygxwneysi,
diaforetikes provoles. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
#2 lore raw

Re: 2.6.29rc1 breakes usb: hiddev device no longer available

Am Monday 26 January 2009 19:27:07 schrieb Folkert van Heusden:

Quoted 9 lines
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

the is the FAILURE situation (2.6.29-rc*):

open("/dev/usb/hiddev0", O_RDWR)        = 3
ioctl(3, HIDIOCGDEVINFO, 0xbf90c0d8)    = 0
ioctl(3, HIDIOCAPPLICATION, 0)          = -6291455
ioctl(3, HIDIOCGSTRING, 0x804e2c0)      = -1 ENODEV (No such device)

Please try this patch.

Regards
Oliver

--

drivers/hid/usbhid/hiddev.c renamed from drivers/hid/usbhid/hiddev.c.alt +1 -1
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *fi
 
 	case HIDIOCGSTRING:
 		mutex_lock(&hiddev->existancelock);
-		if (!hiddev->exist)
+		if (hiddev->exist)
 			r = hiddev_ioctl_string(hiddev, cmd, user_arg);
 		else
 			r = -ENODEV;
#3 lore raw

Re: 2.6.29rc1 breakes usb: hiddev device no longer available

Quoted 10 lines
Quoted 9 lines
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

the is the FAILURE situation (2.6.29-rc*):

open("/dev/usb/hiddev0", O_RDWR)        = 3
ioctl(3, HIDIOCGDEVINFO, 0xbf90c0d8)    = 0
ioctl(3, HIDIOCAPPLICATION, 0)          = -6291455
ioctl(3, HIDIOCGSTRING, 0x804e2c0)      = -1 ENODEV (No such device)

Please try this patch.

Yes, that fixes it! Thanks!

drivers/hid/usbhid/hiddev.c static long hiddev_ioctl(struct file *fi · line 662

Quoted 11 lines
drivers/hid/usbhid/hiddev.c renamed from drivers/hid/usbhid/hiddev.c.alt +1 -1
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *fi
 
 	case HIDIOCGSTRING:
 		mutex_lock(&hiddev->existancelock);
-		if (!hiddev->exist)
+		if (hiddev->exist)
 			r = hiddev_ioctl_string(hiddev, cmd, user_arg);
 		else
 			r = -ENODEV;

Folkert van Heusden

Signature · 9 lines
MultiTail è uno flexible tool per seguire di logfiles e effettuazione
di commissioni. Feltrare, provedere da colore, merge, 'diff-view',
etc. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

Re: 2.6.29rc1 breakes usb: hiddev device no longer available

Quoted 9 lines · Folkert van Heusden
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

the is the FAILURE situation (2.6.29-rc*):

open("/dev/usb/hiddev0", O_RDWR)        = 3
ioctl(3, HIDIOCGDEVINFO, 0xbf90c0d8)    = 0
ioctl(3, HIDIOCAPPLICATION, 0)          = -6291455
ioctl(3, HIDIOCGSTRING, 0x804e2c0)      = -1 ENODEV (No such device)

Please try this patch.

Yes, that fixes it! Thanks!

Fixed in Linus' tree now. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#5 lore raw
In reply to Folkert van Heusden

Am Monday 26 January 2009 18:01:30 schrieb Folkert van Heusden:

Quoted 4 lines

Hi,

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

What kind of device is this? What happens if you try to use the device? Isn't it detected, do you get an error?

Regards
Oliver

#6 lore raw
Quoted 5 lines · Oliver Neukum
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

What kind of device is this? What happens if you try to use the device? Isn't it detected, do you get an error?

It is a powerswitch that can be toggled via USB. Cleware also has sensors (temperature, humidity, etc.) that all can be handled via a commandline utility I wrote.
It has been a while but if i remember correctly the failing ioctl is for determing the serial number of the device. That is required to talk to the right device. http://www.vanheusden.com/clewarecontrol/

Folkert van Heusden

Signature · 5 lines
MultiTail is een flexibele tool voor het volgen van logfiles en
uitvoer van commando's. Filteren, van kleur voorzien, mergen,
'diff-view', etc. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
#7 lore raw

Am Tuesday 27 January 2009 20:55:20 schrieb Folkert van Heusden:

Quoted 7 lines · Oliver Neukum
Quoted 5 lines
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

What kind of device is this? What happens if you try to use the device? Isn't it detected, do you get an error?

Quoted 6 lines

It is a powerswitch that can be toggled via USB. Cleware also has sensors (temperature, humidity, etc.) that all can be handled via a commandline utility I wrote.
It has been a while but if i remember correctly the failing ioctl is for determing the serial number of the device. That is required to talk to the right device. http://www.vanheusden.com/clewarecontrol/

There's a known bug in hiddev. Please test the included patch.

Regards
Oliver

---

drivers/hid/usbhid/hiddev.c renamed from drivers/hid/usbhid/hiddev.c.alt +1 -1
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *fi
 
 	case HIDIOCGSTRING:
 		mutex_lock(&hiddev->existancelock);
-		if (!hiddev->exist)
+		if (hiddev->exist)
 			r = hiddev_ioctl_string(hiddev, cmd, user_arg);
 		else
 			r = -ENODEV;
author Acked-by
#8 lore raw
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Since version 2.6.29rc1 querying cleware USb devices no longer works. 2.6.28 works fine. 2.6.29-rc2 also no longer works.

What kind of device is this? What happens if you try to use the device? Isn't it detected, do you get an error?

Quoted 8 lines
Quoted 6 lines

It is a powerswitch that can be toggled via USB. Cleware also has sensors (temperature, humidity, etc.) that all can be handled via a commandline utility I wrote.
It has been a while but if i remember correctly the failing ioctl is for determing the serial number of the device. That is required to talk to the right device. http://www.vanheusden.com/clewarecontrol/

There's a known bug in hiddev. Please test the included patch.

Works!

drivers/hid/usbhid/hiddev.c static long hiddev_ioctl(struct file *fi · line 662

Quoted 11 lines
drivers/hid/usbhid/hiddev.c renamed from drivers/hid/usbhid/hiddev.c.alt +1 -1
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *fi
 
 	case HIDIOCGSTRING:
 		mutex_lock(&hiddev->existancelock);
-		if (!hiddev->exist)
+		if (hiddev->exist)
 			r = hiddev_ioctl_string(hiddev, cmd, user_arg);
 		else
 			r = -ENODEV;

Folkert van Heusden

Signature · 5 lines
MultiTail is een flexibele tool voor het volgen van logfiles en
uitvoer van commando's. Filteren, van kleur voorzien, mergen,
'diff-view', etc. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com