LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6.5] problems with synaptics/psmouse/atkbd
@ 2004-04-16 15:22 Svetoslav Slavtchev
  0 siblings, 0 replies; 5+ messages in thread
From: Svetoslav Slavtchev @ 2004-04-16 15:22 UTC (permalink / raw)
  To: lkml 

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

i happen to find the attached fix in the latest SuSE kernels

hope it works for you

best,

svetljo

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: psmouse-usb-fix-3.diff --]
[-- Type: text/x-patch; name="psmouse-usb-fix-3.diff", Size: 2610 bytes --]

ChangeSet@1.1831, 2004-04-03 23:30:39+02:00, vojtech@suse.cz
  input: Disable USB Legacy emulation in PCI quirks.


 quirks.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+)


diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c	Sat Apr  3 23:30:49 2004
+++ b/drivers/pci/quirks.c	Sat Apr  3 23:30:49 2004
@@ -868,6 +868,66 @@
 }
 #endif /* CONFIG_SCSI_SATA */
 
+
+#define UHCI_USBLEGSUP		0xc0		/* legacy support */
+#define UHCI_USBCMD		0		/* command register */
+#define UHCI_USBINTR		4		/* interrupt register */
+#define UHCI_USBLEGSUP_DEFAULT	0x2000		/* only PIRQ enable set */
+#define UHCI_USBCMD_GRESET	0x0004		/* Global reset */
+
+#define OHCI_CONTROL		0x04
+#define OHCI_CMDSTATUS		0x08
+#define OHCI_INTRENABLE		0x10
+#define OHCI_OCR		(1 << 3)	/* ownership change request */
+#define OHCI_CTRL_IR		(1 << 8)	/* interrupt routing */
+#define OHCI_INTR_OC		(1 << 30)	/* ownership change */
+
+static void __init quirk_usb_disable_smm_bios(struct pci_dev *pdev)
+{
+
+	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x00)) { /* UHCI */
+		int i;
+		unsigned long base = 0;;
+
+		for (i = 0; i < PCI_ROM_RESOURCE; i++) 
+			if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
+				base = pci_resource_start(pdev, i);
+				break;
+			}
+
+		if (!base)
+			return;
+
+		outw(0, base + UHCI_USBINTR);
+		outw(UHCI_USBCMD_GRESET, base + UHCI_USBCMD);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+       		schedule_timeout((HZ*50+999) / 1000);
+		outw(0, base + UHCI_USBCMD);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout((HZ*10+999) / 1000);
+
+		pci_write_config_word(pdev, UHCI_USBLEGSUP, UHCI_USBLEGSUP_DEFAULT);
+	}
+
+	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10)) { /* OHCI */
+		char *base = ioremap_nocache(pci_resource_start(pdev, 0),
+							pci_resource_len(pdev, 0));
+		if (base == NULL) return;
+
+		if (readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
+			int temp = 500;     /* arbitrary: five seconds */
+			writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
+			writel(OHCI_OCR, base + OHCI_CMDSTATUS);
+			while (temp && readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
+				temp--;
+				set_current_state(TASK_UNINTERRUPTIBLE);
+				schedule_timeout( HZ / 100);
+			}
+		}
+		iounmap(base);
+	}
+}
+
 /*
  *  The main table of quirks.
  *
@@ -983,6 +1043,8 @@
 	{ PCI_FIXUP_FINAL,      PCI_VENDOR_ID_INTEL,    PCI_ANY_ID,
 	  quirk_intel_ide_combined },
 #endif /* CONFIG_SCSI_SATA */
+
+	{ PCI_FIXUP_FINAL,	PCI_ANY_ID,		PCI_ANY_ID,			quirk_usb_disable_smm_bios },
 
 	{ 0 }
 };

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

* Re: [2.6.5] problems with synaptics/psmouse/atkbd
  2004-04-16 12:53 ` Dmitry Torokhov
  2004-04-16 13:35   ` Mattia Dongili
@ 2004-05-16 19:39   ` Mattia Dongili
  1 sibling, 0 replies; 5+ messages in thread
From: Mattia Dongili @ 2004-05-16 19:39 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, vojtech, svetljo

On Fri, Apr 16, 2004 at 07:53:00AM -0500, Dmitry Torokhov wrote:
> On Friday 16 April 2004 05:29 am, Mattia Dongili wrote:
> > [please could you Cc me as I'm not subscribed to linux-kernel]
> > 
> > Hi,
> > 
> > I'm having problems (since 2.6.3 now trying with 2.6.5).
> > Main symptom is that my synaptics touchpad isn't detected after a cold
> > boot. After a warm boot it's detected correctly though.
> 
> Does it help if you load USB modules (*hci-hcd) first and then psmouse?

Hi there, I found the answer to my thread from Svetoslav Slavtchev [1]
(unfortunately he didn't cc-ed me) in the list archives.

His patch solves my problem, any chance to see it included in the
official kernel?
BTW, if more infos on this issue are needed I can easily supply them,
eg:
this is a boot showing the problem:
  Apr 21 15:12:59 inferi kernel: serio: i8042 AUX0 port at 0x60,0x64 irq 12
  Apr 21 15:12:59 inferi kernel: serio: i8042 AUX1 port at 0x60,0x64 irq 12
  Apr 21 15:12:59 inferi kernel: serio: i8042 AUX2 port at 0x60,0x64 irq 12
  Apr 21 15:12:59 inferi kernel: serio: i8042 AUX3 port at 0x60,0x64 irq 12

this doesn't:
  Apr 21 15:15:13 inferi kernel: serio: i8042 AUX port at 0x60,0x64 irq 12

thanks

[1]
http://marc.theaimsgroup.com/?l=linux-kernel&m=108213030732425&w=2
-- 
mattia
:wq!

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

* Re: [2.6.5] problems with synaptics/psmouse/atkbd
  2004-04-16 12:53 ` Dmitry Torokhov
@ 2004-04-16 13:35   ` Mattia Dongili
  2004-05-16 19:39   ` Mattia Dongili
  1 sibling, 0 replies; 5+ messages in thread
From: Mattia Dongili @ 2004-04-16 13:35 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, vojtech

On Fri, Apr 16, 2004 at 07:53:00AM -0500, Dmitry Torokhov wrote:
> On Friday 16 April 2004 05:29 am, Mattia Dongili wrote:
> > [please could you Cc me as I'm not subscribed to linux-kernel]
> > 
> > Hi,
> > 
> > I'm having problems (since 2.6.3 now trying with 2.6.5).
> > Main symptom is that my synaptics touchpad isn't detected after a cold
> > boot. After a warm boot it's detected correctly though.
> 
> Does it help if you load USB modules (*hci-hcd) first and then psmouse?

no, it's already that way (I changed the modules loading order at 2.6.1
time when the synaptics mouse was being stolen by usb[1]):
# cat /etc/modules
uhci-hcd
hid
agpgart
intel-agp
radeon
pcspkr
evdev
speedstep-ich
sonypi
#parport_pc
#lp
psmouse

Also, I cannot disable USB Legacy support from bios.

I'm using a sony vaio gr7/k - same chipset as
PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP:
# lspci | grep -i usb
0000:00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 01)
0000:00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 01)
0000:00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 01)

the really weird things are the *This is an XFree86 bug* messages, when
xfree isn't even running. Any idea? more debug printks I might add?

thanks (please still Cc me)

[1]: http://marc.theaimsgroup.com/?l=linux-kernel&m=107512283220051&w=2
-- 
mattia
:wq!
Hodie decimo sexto Kalendas Maias MMDCCLVII ab urbe condita est

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

* Re: [2.6.5] problems with synaptics/psmouse/atkbd
  2004-04-16 10:29 Mattia Dongili
@ 2004-04-16 12:53 ` Dmitry Torokhov
  2004-04-16 13:35   ` Mattia Dongili
  2004-05-16 19:39   ` Mattia Dongili
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2004-04-16 12:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mattia Dongili, vojtech

On Friday 16 April 2004 05:29 am, Mattia Dongili wrote:
> [please could you Cc me as I'm not subscribed to linux-kernel]
> 
> Hi,
> 
> I'm having problems (since 2.6.3 now trying with 2.6.5).
> Main symptom is that my synaptics touchpad isn't detected after a cold
> boot. After a warm boot it's detected correctly though.

Does it help if you load USB modules (*hci-hcd) first and then psmouse?

-- 
Dmitry

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

* [2.6.5] problems with synaptics/psmouse/atkbd
@ 2004-04-16 10:29 Mattia Dongili
  2004-04-16 12:53 ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Mattia Dongili @ 2004-04-16 10:29 UTC (permalink / raw)
  To: vojtech, linux-kernel

[please could you Cc me as I'm not subscribed to linux-kernel]

Hi,

I'm having problems (since 2.6.3 now trying with 2.6.5).
Main symptom is that my synaptics touchpad isn't detected after a cold
boot. After a warm boot it's detected correctly though.
In the cold boot case I have some weird behaviours loading psmouse:
[...]
 psmouse_probe(): Probing mouse
 psmouse_probe(): sending 0xa5
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
 psmouse_probe(): Probing mouse
 psmouse_probe(): sending 0xa5
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
 psmouse_probe(): Probing mouse
 psmouse_probe(): sending 0xa5
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
 psmouse_probe(): Probing mouse
 psmouse_probe(): sending 0xa5
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.

but XFree86 is not running! (I also added some further debug printks in
psmouse_probe and psmouse_extensions but the latter is never reached)

unloading psmouse also disables the keyboard and prints a flood of 
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.

this is /proc/bus/input/devices without synaptics touchpad

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event0 
B: EV=120003 
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe 
B: LED=7 

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
H: Handlers=kbd event1 
B: EV=40001 
B: SND=6 

I: Bus=0010 Vendor=104d Product=0000 Version=0000
N: Name="Sony VAIO Jog Dial"
P: Phys=
H: Handlers=mouse0 event2 
B: EV=7 
B: KEY=40000 0 0 0 0 0 0 0 0 
B: REL=100 

I: Bus=0003 Vendor=046d Product=c001 Version=0410
N: Name="Logitech USB Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
H: Handlers=mouse1 event3 
B: EV=f 
B: KEY=70000 0 0 0 0 0 0 0 0 
B: REL=103 
B: ABS=100 0 

after a warm boot it adds:

I: Bus=0011 Vendor=0002 Product=0007 Version=0000
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse2 event4 
B: EV=b 
B: KEY=6420 0 670000 0 0 0 0 0 0 0 0 
B: ABS=11000003 

and this is the relevant part of dmesg:
...
 psmouse_probe(): Probing mouse
 psmouse_probe(): sending 0xa5
 psmouse_probe(): has an extended protocol?
 psmouse_extensions(): Going to probe Synaptics
  psmouse_extensions(): Synaptics seems to be here
usb 2-1: new low speed USB device using address 2
input: USB HID v1.10 Mouse [Logitech USB Mouse] on usb-0000:00:1d.1-1
Synaptics Touchpad, model: 1
 Firmware: 5.9
 Sensor: 37
 new absolute packet format
 Touchpad has extended capability bits
 -> multifinger detection
 -> palm detection
  psmouse_extensions(): Synaptics inited!
input: SynPS/2 Synaptics TouchPad on isa0060/serio1
...

any help/patch to spot the problem? Need more info?
thanks in advance
-- 
mattia
:wq!
Hodie decimo sexto Kalendas Maias MMDCCLVII ab urbe condita est

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

end of thread, other threads:[~2004-05-16 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-16 15:22 [2.6.5] problems with synaptics/psmouse/atkbd Svetoslav Slavtchev
  -- strict thread matches above, loose matches on Subject: below --
2004-04-16 10:29 Mattia Dongili
2004-04-16 12:53 ` Dmitry Torokhov
2004-04-16 13:35   ` Mattia Dongili
2004-05-16 19:39   ` Mattia Dongili

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