Re: ns558 mis-detects gameport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Neil Darlow wrote:
> Hi Vojtech,
> 
> On Friday 08 Jul 2005 22:24, Vojtech Pavlik wrote:
> 
>>In the current input GIT tree there is a patch to reverse the order of
>>probing (PnP first) for exactly this reason. I expect 2.6.13 should have
>>the fix.
> 
> 
> Daniel, is it worth backporting this fix for gentoo-sources-2.6.12 so others 
> aren't bitten or will we have to wait for 2.6.13?

Sure, but only after you have confirmed it fixes the problem for you. I've
attached the patch. Please let me know how you get on.

Thanks,
Daniel
From: Vojtech Pavlik <[email protected]>
Date: Sun, 29 May 2005 07:25:01 +0000 (-0500)
Subject: Input: Probe PnP gameports first, ISA after that.
X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/dtor/input.git;a=commitdiff;h=f6397cecadc52779902bdd8f8cd3ea5af3a19ad1

  Input: Probe PnP gameports first, ISA after that.
  
  Signed-off-by: Vojtech Pavlik <[email protected]>
  Signed-off-by: Dmitry Torokhov <[email protected]>
---

--- a/drivers/input/gameport/ns558.c
+++ b/drivers/input/gameport/ns558.c
@@ -258,18 +258,18 @@ static int __init ns558_init(void)
 {
 	int i = 0;
 
+	if (pnp_register_driver(&ns558_pnp_driver) >= 0)
+		pnp_registered = 1;
+
 /*
- * Probe ISA ports first so that PnP gets to choose free port addresses
- * not occupied by the ISA ports.
+ * Probe ISA ports after PnP, so that PnP ports that are already
+ * enabled get detected as PnP. This may be suboptimal in multi-device
+ * configurations, but saves hassle with simple setups.
  */
 
 	while (ns558_isa_portlist[i])
 		ns558_isa_probe(ns558_isa_portlist[i++]);
 
-	if (pnp_register_driver(&ns558_pnp_driver) >= 0)
-		pnp_registered = 1;
-
-
 	return (list_empty(&ns558_list) && !pnp_registered) ? -ENODEV : 0;
 }
 

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux