linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xpad - led/rumble completely disables controller
@ 2008-03-22 12:26 M G
  0 siblings, 0 replies; 3+ messages in thread
From: M G @ 2008-03-22 12:26 UTC (permalink / raw)
  To: linux-input

Hi, I'm trying to use my Xbox360 Controller with the xpad driver. But
as soon as the led status is set (i.e. right after pluging it in) it
becomes unresponsive. If I comment out the led-setting code in xpad.c
the controller works but only until a rumble effect is played, then it
will become unresponsive again.

I have found that this does not occur if transfer_buffer_length is set
to the exact value, 3 for the led and 8 for rumble, like so:

--- a/xpad.c	2008-03-21 16:39:58.000000000 +0100
+++ b/xpad.c	2008-03-21 16:38:41.000000000 +0100
@@ -469,6 +469,7 @@
 		xpad->odata[5] = 0x00;
 		xpad->odata[6] = 0x00;
 		xpad->odata[7] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 8;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}

@@ -502,6 +503,7 @@
 		xpad->odata[0] = 0x01;
 		xpad->odata[1] = 0x03;
 		xpad->odata[2] = command;
+		xpad->irq_out->transfer_buffer_length = 3;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 		mutex_unlock(&xpad->odata_mutex);
 	}


Does that seem right?

^ permalink raw reply	[flat|nested] 3+ messages in thread
* xpad - led/rumble completely disables controller
@ 2008-03-24 13:46 M G
  0 siblings, 0 replies; 3+ messages in thread
From: M G @ 2008-03-24 13:46 UTC (permalink / raw)
  To: linux-input

Hi, I'm trying to use my Xbox360 Controller with the xpad driver. But
as soon as the led status is set (i.e. right after pluging it in) it
becomes unresponsive. If I comment out the led-setting code in xpad.c
the controller works but only until a rumble effect is played, then it
will become unresponsive again.

I have found that this does not occur if transfer_buffer_length is set
to the exact value, 3 for the led and 8 for rumble, like so:

--- a/xpad.c	2008-03-21 16:39:58.000000000 +0100
+++ b/xpad.c	2008-03-21 16:38:41.000000000 +0100
@@ -469,6 +469,7 @@
 		xpad->odata[5] = 0x00;
 		xpad->odata[6] = 0x00;
 		xpad->odata[7] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 8;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}

@@ -502,6 +503,7 @@
 		xpad->odata[0] = 0x01;
 		xpad->odata[1] = 0x03;
 		xpad->odata[2] = command;
+		xpad->irq_out->transfer_buffer_length = 3;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 		mutex_unlock(&xpad->odata_mutex);
 	}


Does that seem right?

^ permalink raw reply	[flat|nested] 3+ messages in thread
* xpad - led/rumble completely disables controller
@ 2008-03-21 17:52 M G
  0 siblings, 0 replies; 3+ messages in thread
From: M G @ 2008-03-21 17:52 UTC (permalink / raw)
  To: linux-input

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

Hi, I'm trying to use my Xbox360 Controller with the xpad driver. But
as soon as the led status is set (i.e. right after pluging it in) it
becomes completely unresponsive. If I comment out the led-setting code
in xpad.c the controller works but only until a rumble effect is
played, then it will become unresponsive again.

I have found that this does not occur if transfer_buffer_length is set
to the exact value, 3 for the led and 8 for rumble.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xpad-transferlength.patch --]
[-- Type: text/x-diff; name=xpad-transferlength.patch, Size: 528 bytes --]

--- a/xpad.c	2008-03-21 16:39:58.000000000 +0100
+++ b/xpad.c	2008-03-21 16:38:41.000000000 +0100
@@ -469,6 +469,7 @@
 		xpad->odata[5] = 0x00;
 		xpad->odata[6] = 0x00;
 		xpad->odata[7] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 8;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}
 
@@ -502,6 +503,7 @@
 		xpad->odata[0] = 0x01;
 		xpad->odata[1] = 0x03;
 		xpad->odata[2] = command;
+		xpad->irq_out->transfer_buffer_length = 3;
 		usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 		mutex_unlock(&xpad->odata_mutex);
 	}

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

end of thread, other threads:[~2008-03-24 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-22 12:26 xpad - led/rumble completely disables controller M G
  -- strict thread matches above, loose matches on Subject: below --
2008-03-24 13:46 M G
2008-03-21 17:52 M G

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