public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.29rc1 brakes usb
@ 2009-01-26 17:01 Folkert van Heusden
  2009-01-26 18:27 ` 2.6.29rc1 breakes usb: hiddev device no longer available Folkert van Heusden
  2009-01-26 19:11 ` 2.6.29rc1 brakes usb Oliver Neukum
  0 siblings, 2 replies; 9+ messages in thread
From: Folkert van Heusden @ 2009-01-26 17:01 UTC (permalink / raw)
  To: linux-kernel

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

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 breakes usb: hiddev device no longer available
  2009-01-26 17:01 2.6.29rc1 brakes usb Folkert van Heusden
@ 2009-01-26 18:27 ` Folkert van Heusden
  2009-01-26 19:05   ` Oliver Neukum
  2009-01-26 19:11 ` 2.6.29rc1 brakes usb Oliver Neukum
  1 sibling, 1 reply; 9+ messages in thread
From: Folkert van Heusden @ 2009-01-26 18:27 UTC (permalink / raw)
  To: linux-kernel

> 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

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 breakes usb: hiddev device no longer available
  2009-01-26 18:27 ` 2.6.29rc1 breakes usb: hiddev device no longer available Folkert van Heusden
@ 2009-01-26 19:05   ` Oliver Neukum
  2009-01-27 19:52     ` Folkert van Heusden
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2009-01-26 19:05 UTC (permalink / raw)
  To: Folkert van Heusden, linux-input; +Cc: linux-kernel

Am Monday 26 January 2009 19:27:07 schrieb Folkert van Heusden:
> > 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

--

--- linux-2.6/drivers/hid/usbhid/hiddev.c.alt	2009-01-26 20:03:10.000000000 +0100
+++ linux-2.6/drivers/hid/usbhid/hiddev.c	2009-01-26 20:03:17.000000000 +0100
@@ -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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 brakes usb
  2009-01-26 17:01 2.6.29rc1 brakes usb Folkert van Heusden
  2009-01-26 18:27 ` 2.6.29rc1 breakes usb: hiddev device no longer available Folkert van Heusden
@ 2009-01-26 19:11 ` Oliver Neukum
  2009-01-27 19:55   ` Folkert van Heusden
  1 sibling, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2009-01-26 19:11 UTC (permalink / raw)
  To: Folkert van Heusden, linux-usb; +Cc: linux-kernel

Am Monday 26 January 2009 18:01:30 schrieb Folkert van Heusden:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 breakes usb: hiddev device no longer available
  2009-01-26 19:05   ` Oliver Neukum
@ 2009-01-27 19:52     ` Folkert van Heusden
  2009-02-02 12:33       ` Jiri Kosina
  0 siblings, 1 reply; 9+ messages in thread
From: Folkert van Heusden @ 2009-01-27 19:52 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-input, linux-kernel

> > > 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!


Ack-by: folkert@vanheusden.com

> --- linux-2.6/drivers/hid/usbhid/hiddev.c.alt	2009-01-26 20:03:10.000000000 +0100
> +++ linux-2.6/drivers/hid/usbhid/hiddev.c	2009-01-26 20:03:17.000000000 +0100
> @@ -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

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 brakes usb
  2009-01-26 19:11 ` 2.6.29rc1 brakes usb Oliver Neukum
@ 2009-01-27 19:55   ` Folkert van Heusden
  2009-01-27 21:04     ` Oliver Neukum
  0 siblings, 1 reply; 9+ messages in thread
From: Folkert van Heusden @ 2009-01-27 19:55 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb, linux-kernel

On Mon, Jan 26, 2009 at 08:11:19PM +0100, Oliver Neukum wrote:
> > 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

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 brakes usb
  2009-01-27 19:55   ` Folkert van Heusden
@ 2009-01-27 21:04     ` Oliver Neukum
  2009-01-27 21:05       ` Folkert van Heusden
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Neukum @ 2009-01-27 21:04 UTC (permalink / raw)
  To: Folkert van Heusden; +Cc: linux-usb, linux-kernel

Am Tuesday 27 January 2009 20:55:20 schrieb Folkert van Heusden:
> On Mon, Jan 26, 2009 at 08:11:19PM +0100, Oliver Neukum wrote:
> > > 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/

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

	Regards
		Oliver

---

--- linux-2.6/drivers/hid/usbhid/hiddev.c.alt	2009-01-26 20:03:10.000000000 +0100
+++ linux-2.6/drivers/hid/usbhid/hiddev.c	2009-01-26 20:03:17.000000000 +0100
@@ -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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 brakes usb
  2009-01-27 21:04     ` Oliver Neukum
@ 2009-01-27 21:05       ` Folkert van Heusden
  0 siblings, 0 replies; 9+ messages in thread
From: Folkert van Heusden @ 2009-01-27 21:05 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb, linux-kernel

> > > > 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/
> 
> There's a known bug in hiddev. Please test the included patch.

Works!

Acked-by: Folkert van Heusden <folkert@vanheusden.com>

> --- linux-2.6/drivers/hid/usbhid/hiddev.c.alt	2009-01-26 20:03:10.000000000 +0100
> +++ linux-2.6/drivers/hid/usbhid/hiddev.c	2009-01-26 20:03:17.000000000 +0100
> @@ -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

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.6.29rc1 breakes usb: hiddev device no longer available
  2009-01-27 19:52     ` Folkert van Heusden
@ 2009-02-02 12:33       ` Jiri Kosina
  0 siblings, 0 replies; 9+ messages in thread
From: Jiri Kosina @ 2009-02-02 12:33 UTC (permalink / raw)
  To: Folkert van Heusden; +Cc: Oliver Neukum, linux-input, linux-kernel

On Tue, 27 Jan 2009, Folkert van Heusden wrote:

> > > > 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,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-02 12:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 17:01 2.6.29rc1 brakes usb Folkert van Heusden
2009-01-26 18:27 ` 2.6.29rc1 breakes usb: hiddev device no longer available Folkert van Heusden
2009-01-26 19:05   ` Oliver Neukum
2009-01-27 19:52     ` Folkert van Heusden
2009-02-02 12:33       ` Jiri Kosina
2009-01-26 19:11 ` 2.6.29rc1 brakes usb Oliver Neukum
2009-01-27 19:55   ` Folkert van Heusden
2009-01-27 21:04     ` Oliver Neukum
2009-01-27 21:05       ` Folkert van Heusden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox