public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: "Marek Vašut" <marek.vasut@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iforce: fix -ENOMEM check
Date: Sun, 29 Jan 2006 22:26:50 -0500	[thread overview]
Message-ID: <200601292226.51488.dtor_core@ameritech.net> (raw)
In-Reply-To: <200601291209.15864.marek.vasut@gmail.com>

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

  reply	other threads:[~2006-01-30  3:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-28 18:03 [PATCH] iforce: fix -ENOMEM check 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 [this message]
2006-01-30 13:47       ` Marek Vašut
  -- strict thread matches above, loose matches on Subject: below --
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

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=200601292226.51488.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    /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