From owner-p4-projects@FreeBSD.ORG Fri Jul 20 18:22:30 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 94D3016A41F; Fri, 20 Jul 2007 18:22:30 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6931216A41B for ; Fri, 20 Jul 2007 18:22:30 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 572F213C48D for ; Fri, 20 Jul 2007 18:22:30 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6KIMUdT010742 for ; Fri, 20 Jul 2007 18:22:30 GMT (envelope-from loafier@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6KIMUud010739 for perforce@freebsd.org; Fri, 20 Jul 2007 18:22:30 GMT (envelope-from loafier@FreeBSD.org) Date: Fri, 20 Jul 2007 18:22:30 GMT Message-Id: <200707201822.l6KIMUud010739@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to loafier@FreeBSD.org using -f From: Christopher Davis To: Perforce Change Reviews Cc: Subject: PERFORCE change 123815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 18:22:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=123815 Change 123815 by loafier@chrisdsoc on 2007/07/20 18:21:42 Used pci_enable_busmaster() and pci_enable_io() Affected files ... .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sound/pci/solo.c#3 edit Differences ... ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sound/pci/solo.c#3 (text+ko) ==== @@ -861,14 +861,11 @@ ess_resume(device_t dev) { uint16_t ddma; - uint32_t data; struct ess_info *sc = pcm_getdevinfo(dev); ess_lock(sc); - data = pci_read_config(dev, PCIR_COMMAND, 2); - data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, data, 2); - data = pci_read_config(dev, PCIR_COMMAND, 2); + pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_IOPORT); ddma = rman_get_start(sc->res[RES_VC]) | 1; pci_write_config(dev, ESS_PCI_LEGACYCONTROL, 0x805f, 2); @@ -900,13 +897,10 @@ struct ess_info *sc; char status[SND_STATUSLEN]; u_int16_t ddma; - u_int32_t data; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); - data = pci_read_config(dev, PCIR_COMMAND, 2); - data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, data, 2); - data = pci_read_config(dev, PCIR_COMMAND, 2); + pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_IOPORT); if (bus_alloc_resources(dev, ess_res_spec, sc->res) != 0) goto no;