Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2007 18:22:30 GMT
From:      Christopher Davis <loafier@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 123815 for review
Message-ID:  <200707201822.l6KIMUud010739@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707201822.l6KIMUud010739>