From pete@ns.altadena.net  Thu Jun 12 18:04:18 2003
Return-Path: <pete@ns.altadena.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 837E137B404; Thu, 12 Jun 2003 18:04:18 -0700 (PDT)
Received: from ns.altadena.net (ns.altadena.net [207.151.161.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 5F82F43FDF; Thu, 12 Jun 2003 18:04:17 -0700 (PDT)
	(envelope-from pete@ns.altadena.net)
Received: from ns.altadena.net (localhost [127.0.0.1])
	by ns.altadena.net (8.12.8p1/8.12.3) with ESMTP id h5D14GbG023003;
	Thu, 12 Jun 2003 18:04:17 -0700 (PDT)
	(envelope-from pete@ns.altadena.net)
Received: (from pete@localhost)
	by ns.altadena.net (8.12.8p1/8.12.3/Submit) id h5D14G1G023002;
	Thu, 12 Jun 2003 18:04:16 -0700 (PDT)
	(envelope-from pete)
Message-Id: <200306130104.h5D14G1G023002@ns.altadena.net>
Date: Thu, 12 Jun 2003 18:04:16 -0700 (PDT)
From: Pete Carah <pete@ns.altadena.net>
Reply-To: Pete Carah <pete@ns.altadena.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: rwatson@freebsd.org
Subject: PCM interrupt not routed on Sony VAIO laptop
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53264
>Category:       kern
>Synopsis:       [sound] [patch] PCM interrupt not routed on Sony VAIO laptop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 12 18:10:15 PDT 2003
>Closed-Date:    Fri Sep 02 17:50:41 GMT 2005
>Last-Modified:  Fri Sep 02 17:50:41 GMT 2005
>Originator:     Pete Carah
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Altadena Internet
>Environment:
System: FreeBSD port2.altadena.net 5.1-CURRENT FreeBSD 5.1-CURRENT #6: Wed Jun 11 19:47:51 CDT 2003     pete@port2.altadena.net:/d/obj-c/usr/src/sys/PORT2  i386

>Description:
	Sound doesn't work unless something else using irq 9 is kicked
	(e.g. USB mouse)

>How-To-Repeat:
	See description.  Originated by Chuck McCrobie.  Patch from his
	web site, but I can't get to the site anymore.  (his comment about
	GRX670 also applies to Vaio R505E models and probably others.)

>Fix:
*** sys/dev/pci/pci.c.orig	Thu Mar 20 23:42:29 2003
--- sys/dev/pci/pci.c	Sat Mar  8 00:42:07 2003
***************
*** 168,179 ****
--- 168,186 ----
  SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters");
  
  static int pci_enable_io_modes = 1;
+ static int pci_route_existing = 1;
  TUNABLE_INT("hw.pci.enable_io_modes", (int *)&pci_enable_io_modes);
+ TUNABLE_INT("hw.pci.route.existing", (int *)&pci_route_existing);
  SYSCTL_INT(_hw_pci, OID_AUTO, enable_io_modes, CTLFLAG_RW,
      &pci_enable_io_modes, 1,
      "Enable I/O and memory bits in the config register.  Some BIOSes do not\n\
  enable these bits correctly.  We'd like to do this all the time, but there\n\
  are some peripherals that this causes problems with.");
+ SYSCTL_INT(_hw_pci, OID_AUTO, route_existing, CTLFLAG_RW,
+     &pci_route_existing, 1,
+     "Perform interrupt routing for devices with wired PCI interrupt pins\n\
+ and legacy interrupt lines.  Sony VAIO GRX670 requires this for audio\n\
+ interrupts.");
  
  /* Find a device_t by bus/slot/function */
  
***************
*** 768,773 ****
--- 775,786 ----
  		 * PIC interrupt numbers in the intline registers).
  		 */
  		cfg->intline = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin);
+ #else
+                 /*
+                  * XXX: Do we need to re-program the device's PCIREG intline?
+                  */
+                 if (pci_route_existing)
+                         cfg->intline = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin);
  #endif
  		resource_list_add(rl, SYS_RES_IRQ, 0, cfg->intline,
  		  cfg->intline, 1);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sun Jul 13 02:53:04 PDT 2003 
Responsible-Changed-Why:  
Assign to sound maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53264 
Responsible-Changed-From-To: sound->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Wed Mar 23 21:07:59 GMT 2005 
Responsible-Changed-Why:  
I'll take this one, it should already be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53264 

From: John Baldwin <jhb@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, pete@ns.altadena.net
Cc:  
Subject: Re: kern/53264: [sound] [patch] PCM interrupt not routed on Sony VAIO laptop
Date: Wed, 23 Mar 2005 16:09:31 -0500

 This should be fixed as of 5.2 and later as we now route all PCI interrupts by 
 default.  Can the submitter test a more recent version of FreeBSD (5.2.1 or 
 later) to verify this?
 
 -- 
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
State-Changed-From-To: open->closed 
State-Changed-By: jhb 
State-Changed-When: Fri Sep 2 17:50:16 GMT 2005 
State-Changed-Why:  
Problem should be fixed and timed out waiting for feedback from submitter. 

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