From owner-freebsd-mobile Wed Apr 25 3:18:36 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from skinner.codefactory.se (skinner.codefactory.se [212.32.187.2]) by hub.freebsd.org (Postfix) with ESMTP id C15E237B422; Wed, 25 Apr 2001 03:18:31 -0700 (PDT) (envelope-from anders@codefactory.se) Received: from jellyfish.codefactory.se (unknown [212.28.197.186]) by skinner.codefactory.se (Postfix) with ESMTP id CBC2319133; Wed, 25 Apr 2001 12:22:08 +0200 (CEST) Received: by jellyfish.codefactory.se (Postfix, from userid 1001) id C58452BDB0; Wed, 25 Apr 2001 12:17:57 +0200 (CEST) Date: Wed, 25 Apr 2001 12:17:57 +0200 From: Anders Andersson To: gollum Cc: freebsd-mobile@freebsd.org, cg@FreeBSD.org Subject: Re: Fix for csa driver under 4.x Message-ID: <20010425121757.A480@jellyfish.codefactory.se> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from gollum@hobbit.ccrypt.net on Tis, Apr 24, 2001 at 10:10:44pm -0700 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tis, Apr 24, 2001 at 10:10:44pm -0700, gollum wrote: > The follow fix solved the sound issue on my T21 (CS461x) laptop running > 4.3 FreeBSD. The issue was two function parameters that were backwards > in the pci_write_config call in the csa_attach function. This fix sould > solve the sound issue for the csa driver under 4.2 also, however, I have > yet to test it. NOTE: This fix has been added to the HEAD CVS tree, but > has yet to be added to RELENG_4. > > The following diff shows the fix for the csa.c file under > /usr/src/sys/dev/sound/pci: > > *** csa.c Tue Apr 24 21:51:45 2001 > --- csa.c.broken Tue Apr 24 20:47:38 2001 > *************** > *** 131,137 **** > stcmd = pci_read_config(dev, PCIR_COMMAND, 4); > if ((stcmd & PCIM_CMD_MEMEN) == 0 || (stcmd & PCIM_CMD_BUSMASTEREN) == 0) { > stcmd |= (PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); > ! pci_write_config(dev, PCIR_COMMAND, stcmd, 4); > } > > /* Allocate the resources. */ > --- 131,137 ---- > stcmd = pci_read_config(dev, PCIR_COMMAND, 4); > if ((stcmd & PCIM_CMD_MEMEN) == 0 || (stcmd & PCIM_CMD_BUSMASTEREN) == 0) { > stcmd |= (PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); > ! pci_write_config(dev, PCIR_COMMAND, 4, stcmd); > } > > /* Allocate the resources. */ > > > > This patch makes sound work on my IBM ThinkPad A20p csa0: mem 0xf0000000-0xf00fffff,0xf0121000-0xf0121fff irq 11 at device 5.0 on pci0 pcm0: on csa0 -- Anders Andersson anders@codefactory.se CodeFactory AB http://www.codefactory.se/ Office: +46 (0)31 711 99 35 Cell: +46 (0)70 587 53 35 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message