From yoshiaki@kt.rim.or.jp  Sun Jun 13 10:44:31 2004
Return-Path: <yoshiaki@kt.rim.or.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9D8BD16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 10:44:31 +0000 (GMT)
Received: from serio.al.rim.or.jp (serio.al.rim.or.jp [202.247.191.123])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F260C43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 10:44:29 +0000 (GMT)
	(envelope-from yoshiaki@kt.rim.or.jp)
Received: from mail4.rim.or.jp
	by serio.al.rim.or.jp (3.7W/HMX-13) id TAA17968
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 19:43:51 +0900 (JST)
Received: from singer.tertio.atoll (flets5155.t3.rim.or.jp [202.247.160.155]) by mail4.rim.or.jp (8.9.3/3.7W)
	id TAA01563 for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Jun 2004 19:43:50 +0900 (JST)
Received: (from yoshiaki@localhost)
	by singer.tertio.atoll (8.12.11/8.12.9/Submit) id i5DAhpEx000697;
	Sun, 13 Jun 2004 19:43:51 +0900 (JST)
	(envelope-from yoshiaki)
Message-Id: <200406131043.i5DAhpEx000697@singer.tertio.atoll>
Date: Sun, 13 Jun 2004 19:43:51 +0900 (JST)
From: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
Reply-To: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: PS/2 mouse probrem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         67901
>Category:       i386
>Synopsis:       PS/2 mouse probrem
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 13 10:50:12 GMT 2004
>Closed-Date:    Mon Aug 23 21:08:33 GMT 2004
>Last-Modified:  Mon Aug 23 21:08:33 GMT 2004
>Originator:     Yoshiaki Uchikawa
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD singer.tertio.atoll 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Jun 13 17:16:58 JST 2004 root@singer.tertio.atoll:/usr/src/sys/i386/compile/CRUSE i386
>Description:
	After MAY 29 current, 
	I can't use PS/2 mouse (with X). 
	This probrem looks seem to be IRQ confrict.

	I have two machines, Aopen KT-600(VIA 5235 chepset + AMD AthelonXP)
	and GIGABYTE 6VTX(82C686B chipset + Intel Celeron 1.4GHz)
	Both machines have same probrem.

Before May,28 curent
--dmesg--
uhci2: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 5 at device 16.2 on p
ci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
 :
pcm0: <VIA VT8235> port 0xe400-0xe4ff irq 5 at device 17.5 on pci0
pcm0: [GIANT-LOCKED]
pcm0: <Avance Logic ALC650 AC97 Codec>
--------

 % vmstat -i

interrupt                          total       rate
irq0: clk                         717191         99
irq1: atkbd0                        3842          0
irq6: fdc0                             5          0
irq8: rtc                         918043        127
irq11: fxp0                         2900          0
irq12: psm0                        15316          2
irq13: npx0                            2          0
irq14: ata0                           42          0
irq15: ata1                        57241          7
Total                            1714582        239

After May, 29 curent
--dmesg--
uhci2: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 12 at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
 :
pcm0: <VIA VT8235> port 0xe400-0xe4ff irq 12 at device 17.5 on pci0
pcm0: [GIANT-LOCKED]
pcm0: <Avance Logic ALC650 AC97 Codec>
--------

 % vmstat -i

interrupt                          total       rate
irq0: clk                           4422         96
irq1: atkbd0                         205          4
irq6: fdc0                             5          0
irq7: fxp0                            15          0
irq8: rtc                           5660        123
irq12: pcm0 uhci2+                     1          0
irq13: npx0                            1          0
irq14: ata0                           42          0
irq15: ata1                         1805         39
Total                              12156        264

 description of the problem (multiple lines)>
>How-To-Repeat:
	
>Fix:
--- ../acpi_pci_link.c	Sun Jun 13 19:29:37 2004
+++ acpi_pci_link.c	Sun Jun 13 16:41:19 2004
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.15 2004/05/28 17:31:32 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.14 2004/04/14 03:34:11 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -48,6 +48,7 @@
 	TAILQ_ENTRY(acpi_pci_link_entry) links;
 	ACPI_HANDLE	handle;
 	UINT8		current_irq;
+	UINT8		initial_irq;
 	ACPI_RESOURCE	possible_resources;
 	UINT8		number_of_interrupts;
 	UINT8		interrupts[MAX_POSSIBLE_INTERRUPTS];
@@ -72,9 +73,6 @@
 
 static int	irq_penalty[MAX_ACPI_INTERRUPTS];
 
-static int	acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link,
-    UINT8 irq);
-
 #define ACPI_STA_PRESENT	0x00000001
 #define ACPI_STA_ENABLE		0x00000002
 #define ACPI_STA_SHOWINUI	0x00000004
@@ -384,12 +382,7 @@
 		    acpi_name(handle), AcpiFormatException(error)));
 	}
 
-	if (!acpi_pci_link_is_valid_irq(link, link->current_irq)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_WARN,
-		    "initial IRQ %u is invalid for link %s\n",
-		    link->current_irq, acpi_name(handle)));
-		link->current_irq = 0;
-	}
+	link->initial_irq = link->current_irq;
 
 	error = AcpiGetPossibleResources(handle, &buf);
 	if (ACPI_FAILURE(error)) {
@@ -532,6 +525,11 @@
 		if (link->interrupts[i] == irq)
 			return (1);
 	}
+
+	/* allow initial IRQ as valid one. */
+	if (link->initial_irq == irq)
+		return (1);
+
 	return (0);
 }
 


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Mon Aug 23 21:07:07 GMT 2004 
State-Changed-Why:  
This has been backed out by jhb the day after you sent the PR. 

As a rule of thumb, problems with FreeBSD CURRENT should be 
discussed on the freebsd-current Mailinglist first. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67901 
>Unformatted:
