linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Guillemot joystick not working since 2.6.14
@ 2006-01-22 11:50 Marek Vašut
  2006-01-22 19:55 ` Alexey Dobriyan
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Vašut @ 2006-01-22 11:50 UTC (permalink / raw)
  To: linux-kernel

Hi,
I found a problem with guillemot "force feedback joystick". It´s not working 
since 2.6.13.2-mm3. 2.6.14.2 wasn´t working too. 2.6.15-mm2 is the same. When 
I plug it in, it prints "configuration #1 chosen from 1 choice" "registered 
new driver iforce" and >"iforce: probe of 4-2:1.0 failed with error -12"<
It was working well on 2.6.13.1, but now it doesnt. I am not able to debug the 
kernel. Could you please fix this or tell me what am I doing wrong? Thanks.

Marex

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

* Re: Guillemot joystick not working since 2.6.14
  2006-01-22 11:50 Guillemot joystick not working since 2.6.14 Marek Vašut
@ 2006-01-22 19:55 ` Alexey Dobriyan
  2006-01-23  5:48   ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Alexey Dobriyan @ 2006-01-22 19:55 UTC (permalink / raw)
  To: Marek Va?ut; +Cc: linux-kernel

On Sun, Jan 22, 2006 at 12:50:26PM +0100, Marek Va?ut wrote:
> I found a problem with guillemot "force feedback joystick". It?s not working
> since 2.6.13.2-mm3. 2.6.14.2 wasn?t working too. 2.6.15-mm2 is the same. When
> I plug it in, it prints "configuration #1 chosen from 1 choice" "registered
> new driver iforce" and >"iforce: probe of 4-2:1.0 failed with error -12"<
> It was working well on 2.6.13.1, but now it doesnt. I am not able to debug the 
> kernel. Could you please fix this or tell me what am I doing wrong? Thanks.

Please try this patch

--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -345,7 +345,7 @@ int iforce_init_device(struct iforce *if
 	int i;
 
 	input_dev = input_allocate_device();
-	if (input_dev)
+	if (!input_dev)
 		return -ENOMEM;
 
 	init_waitqueue_head(&iforce->wait);


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

* Re: Guillemot joystick not working since 2.6.14
  2006-01-22 19:55 ` Alexey Dobriyan
@ 2006-01-23  5:48   ` Dmitry Torokhov
  2006-01-23 15:28     ` [PATCH] iforce: fix -ENOMEM check Alexey Dobriyan
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Torokhov @ 2006-01-23  5:48 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Marek Va?ut, linux-kernel

On Sunday 22 January 2006 14:55, Alexey Dobriyan wrote:
> On Sun, Jan 22, 2006 at 12:50:26PM +0100, Marek Va?ut wrote:
> > I found a problem with guillemot "force feedback joystick". It?s not working
> > since 2.6.13.2-mm3. 2.6.14.2 wasn?t working too. 2.6.15-mm2 is the same. When
> > I plug it in, it prints "configuration #1 chosen from 1 choice" "registered
> > new driver iforce" and >"iforce: probe of 4-2:1.0 failed with error -12"<
> > It was working well on 2.6.13.1, but now it doesnt. I am not able to debug the 
> > kernel. Could you please fix this or tell me what am I doing wrong? Thanks.
> 
> Please try this patch
> 
> --- a/drivers/input/joystick/iforce/iforce-main.c
> +++ b/drivers/input/joystick/iforce/iforce-main.c
> @@ -345,7 +345,7 @@ int iforce_init_device(struct iforce *if
>  	int i;
>  
>  	input_dev = input_allocate_device();
> -	if (input_dev)
> +	if (!input_dev)
>  		return -ENOMEM;
>  
>  	init_waitqueue_head(&iforce->wait);
> 

Doh! Could you please add your signoff so I'd add it to the input tree?

Anyway, dynalloc went in 2.6.15 so something else is amiss...

-- 
Dmitry

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

* [PATCH] iforce: fix -ENOMEM check
  2006-01-23  5:48   ` Dmitry Torokhov
@ 2006-01-23 15:28     ` Alexey Dobriyan
  2006-01-25  5:51       ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Alexey Dobriyan @ 2006-01-23 15:28 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Marek Va?ut, linux-kernel

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/input/joystick/iforce/iforce-main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -345,7 +345,7 @@ int iforce_init_device(struct iforce *if
 	int i;
 
 	input_dev = input_allocate_device();
-	if (input_dev)
+	if (!input_dev)
 		return -ENOMEM;
 
 	init_waitqueue_head(&iforce->wait);


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

* Re: [PATCH] iforce: fix -ENOMEM check
  2006-01-23 15:28     ` [PATCH] iforce: fix -ENOMEM check Alexey Dobriyan
@ 2006-01-25  5:51       ` Dmitry Torokhov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Torokhov @ 2006-01-25  5:51 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Marek Va?ut, linux-kernel

On Monday 23 January 2006 10:28, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  drivers/input/joystick/iforce/iforce-main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/input/joystick/iforce/iforce-main.c
> +++ b/drivers/input/joystick/iforce/iforce-main.c
> @@ -345,7 +345,7 @@ int iforce_init_device(struct iforce *if
>  	int i;
>  
>  	input_dev = input_allocate_device();
> -	if (input_dev)
> +	if (!input_dev)
>  		return -ENOMEM;
>  
>  	init_waitqueue_head(&iforce->wait);
> 
> 

Applied to the input tree, thank you.

-- 
Dmitry

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

* Re: [PATCH] iforce: fix -ENOMEM check
  2006-01-30  3:26     ` Dmitry Torokhov
@ 2006-01-30 13:47       ` Marek Vašut
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Vašut @ 2006-01-30 13:47 UTC (permalink / raw)
  To: dtor_core; +Cc: linux-kernel

Dne pondělí 30 ledna 2006 04:26 jste napsal(a):
> OK, the patch below should get it going... Please let me know if it makes
> device appear.
Yeah, it works :-)
Thanks a lot. Maybe this fix should get somehow in kernel tree.

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

* Re: [PATCH] iforce: fix -ENOMEM check
  2006-01-29 11:09   ` Marek Vašut
@ 2006-01-30  3:26     ` Dmitry Torokhov
  2006-01-30 13:47       ` Marek Vašut
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Torokhov @ 2006-01-30  3:26 UTC (permalink / raw)
  To: Marek Vašut; +Cc: linux-kernel

On Sunday 29 January 2006 06:09, Marek Vašut wrote:
> Dne neděle 29 ledna 2006 05:14 jste napsal(a):
> > On Saturday 28 January 2006 13:03, Marek Vašut wrote:
> > > I have tried that patch, but nothing changed ...
> > > That error is still there and no new device in /dev/input appears
> >
> > You do have updated udev, don't you? Could you pease post your dmesg
> > with the patch applied?
> 
> usb 4-2: new full speed USB device using uhci_hcd and address 2
> usb 4-2: configuration #1 chosen from 1 choice
> iforce-main.c: Timeout waiting for response from device.
> usbcore: registered new driver iforce
> 
> I´ve cut off the unnecessary parts. This is what shows up when I connect it.
> There is no js0 in /dev/input ... thats weird, isn´t it?
> 

OK, the patch below should get it going... Please let me know if it makes
device appear.

-- 
Dmitry

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/joystick/iforce/iforce-packets.c |    4 ++--
 drivers/input/joystick/iforce/iforce-usb.c     |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

Index: work/drivers/input/joystick/iforce/iforce-packets.c
===================================================================
--- work.orig/drivers/input/joystick/iforce/iforce-packets.c
+++ work/drivers/input/joystick/iforce/iforce-packets.c
@@ -167,9 +167,9 @@ void iforce_process_packet(struct iforce
 		iforce->expect_packet = 0;
 		iforce->ecmd = cmd;
 		memcpy(iforce->edata, data, IFORCE_MAX_LENGTH);
-		wake_up(&iforce->wait);
 	}
 #endif
+	wake_up(&iforce->wait);
 
 	if (!iforce->type) {
 		being_used--;
@@ -264,7 +264,7 @@ int iforce_get_id_packet(struct iforce *
 		wait_event_interruptible_timeout(iforce->wait,
 			iforce->ctrl->status != -EINPROGRESS, HZ);
 
-		if (iforce->ctrl->status != -EINPROGRESS) {
+		if (iforce->ctrl->status) {
 			usb_unlink_urb(iforce->ctrl);
 			return -1;
 		}
Index: work/drivers/input/joystick/iforce/iforce-usb.c
===================================================================
--- work.orig/drivers/input/joystick/iforce/iforce-usb.c
+++ work/drivers/input/joystick/iforce/iforce-usb.c
@@ -95,7 +95,6 @@ static void iforce_usb_irq(struct urb *u
 		goto exit;
 	}
 
-	wake_up(&iforce->wait);
 	iforce_process_packet(iforce,
 		(iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1, regs);
 

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

* Re: [PATCH] iforce: fix -ENOMEM check
  2006-01-29  4:14 ` Dmitry Torokhov
@ 2006-01-29 11:09   ` Marek Vašut
  2006-01-30  3:26     ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Vašut @ 2006-01-29 11:09 UTC (permalink / raw)
  To: dtor_core; +Cc: linux-kernel

Dne neděle 29 ledna 2006 05:14 jste napsal(a):
> On Saturday 28 January 2006 13:03, Marek Vašut wrote:
> > I have tried that patch, but nothing changed ...
> > That error is still there and no new device in /dev/input appears
>
> You do have updated udev, don't you? Could you pease post your dmesg
> with the patch applied?

usb 4-2: new full speed USB device using uhci_hcd and address 2
usb 4-2: configuration #1 chosen from 1 choice
iforce-main.c: Timeout waiting for response from device.
usbcore: registered new driver iforce

I´ve cut off the unnecessary parts. This is what shows up when I connect it.
There is no js0 in /dev/input ... thats weird, isn´t it?

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

* Re: [PATCH] iforce: fix -ENOMEM check
  2006-01-28 18:03 Marek Vašut
@ 2006-01-29  4:14 ` Dmitry Torokhov
  2006-01-29 11:09   ` Marek Vašut
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Torokhov @ 2006-01-29  4:14 UTC (permalink / raw)
  To: Marek Vašut; +Cc: linux-kernel

On Saturday 28 January 2006 13:03, Marek Vašut wrote:
> I have tried that patch, but nothing changed ...
> That error is still there and no new device in /dev/input appears

You do have updated udev, don't you? Could you pease post your dmesg
with the patch applied?

-- 
Dmitry

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

* Re: [PATCH] iforce: fix -ENOMEM check
@ 2006-01-28 18:03 Marek Vašut
  2006-01-29  4:14 ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Vašut @ 2006-01-28 18:03 UTC (permalink / raw)
  To: linux-kernel

I have tried that patch, but nothing changed ...
That error is still there and no new device in /dev/input appears

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

end of thread, other threads:[~2006-01-30 13:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-22 11:50 Guillemot joystick not working since 2.6.14 Marek Vašut
2006-01-22 19:55 ` Alexey Dobriyan
2006-01-23  5:48   ` Dmitry Torokhov
2006-01-23 15:28     ` [PATCH] iforce: fix -ENOMEM check Alexey Dobriyan
2006-01-25  5:51       ` Dmitry Torokhov
2006-01-28 18:03 Marek Vašut
2006-01-29  4:14 ` Dmitry Torokhov
2006-01-29 11:09   ` Marek Vašut
2006-01-30  3:26     ` Dmitry Torokhov
2006-01-30 13:47       ` Marek Vašut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).