linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "johann deneux" <johann.deneux@gmail.com>
To: dmitry <dmitry.torokhov@gmail.com>,
	linux-input <linux-input@atrey.karlin.mff.cuni.cz>
Subject: [PATCH] iforce: Use interrupt URBs
Date: Sat, 12 May 2007 16:18:26 +0200	[thread overview]
Message-ID: <38b3b7c0705120718m55073ca3i6f3d0012a93d7956@mail.gmail.com> (raw)

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

    Bug fix: Force feedback stopped working in 2.7.18.

    Use an interrupt bulk URB to send force-feedback data to the device
    instead of a bulk URB.

    Signed-off-by: Johann Deneux <johann.deneux@gmail.com>

diff --git a/drivers/input/joystick/iforce/iforce-usb.c
b/drivers/input/joystick/iforce/iforce-usb.c
index 750099d..1457b73 100644
--- a/drivers/input/joystick/iforce/iforce-usb.c
+++ b/drivers/input/joystick/iforce/iforce-usb.c
@@ -65,6 +65,7 @@ void iforce_usb_xmit(struct iforce *iforce)
 	XMIT_INC(iforce->xmit.tail, n);

 	if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) {
+		clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
 		warn("usb_submit_urb failed %d\n", n);
 	}

@@ -163,8 +164,8 @@ static int iforce_usb_probe(struct usb_interface *intf,
 	usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev,
epirq->bEndpointAddress),
 			iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval);

-	usb_fill_bulk_urb(iforce->out, dev, usb_sndbulkpipe(dev,
epout->bEndpointAddress),
-			iforce + 1, 32, iforce_usb_out, iforce);
+	usb_fill_int_urb(iforce->out, dev, usb_sndintpipe(dev,
epout->bEndpointAddress),
+			iforce + 1, 32, iforce_usb_out, iforce, epout->bInterval);

 	usb_fill_control_urb(iforce->ctrl, dev, usb_rcvctrlpipe(dev, 0),
 			(void*) &iforce->cr, iforce->edata, 16, iforce_usb_ctrl, iforce);

[-- Attachment #2: patch-2007-05-12.txt --]
[-- Type: text/plain, Size: 1486 bytes --]

commit 8fdabb780f4e59faa928a8040d4d7da4ce5e9bb7
Author: Johann Deneux <johann.deneux@gmail.com>
Date:   Sat May 12 16:01:46 2007 +0200

    Bug fix: Force feedback stopped working in 2.7.18.
    
    Use an interrupt bulk URB to send force-feedback data to the device
    instead of a bulk URB.
    
    Signed-off-by: Johann Deneux <johann.deneux@gmail.com>

diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c
index 750099d..1457b73 100644
--- a/drivers/input/joystick/iforce/iforce-usb.c
+++ b/drivers/input/joystick/iforce/iforce-usb.c
@@ -65,6 +65,7 @@ void iforce_usb_xmit(struct iforce *iforce)
 	XMIT_INC(iforce->xmit.tail, n);
 
 	if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) {
+		clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
 		warn("usb_submit_urb failed %d\n", n);
 	}
 
@@ -163,8 +164,8 @@ static int iforce_usb_probe(struct usb_interface *intf,
 	usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress),
 			iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval);
 
-	usb_fill_bulk_urb(iforce->out, dev, usb_sndbulkpipe(dev, epout->bEndpointAddress),
-			iforce + 1, 32, iforce_usb_out, iforce);
+	usb_fill_int_urb(iforce->out, dev, usb_sndintpipe(dev, epout->bEndpointAddress),
+			iforce + 1, 32, iforce_usb_out, iforce, epout->bInterval);
 
 	usb_fill_control_urb(iforce->ctrl, dev, usb_rcvctrlpipe(dev, 0),
 			(void*) &iforce->cr, iforce->edata, 16, iforce_usb_ctrl, iforce);

             reply	other threads:[~2007-05-12 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 14:18 johann deneux [this message]
2007-05-14  4:13 ` [PATCH] iforce: Use interrupt URBs Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38b3b7c0705120718m55073ca3i6f3d0012a93d7956@mail.gmail.com \
    --to=johann.deneux@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).