Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2016 01:07:17 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296329 - head/sys/dev/sbni
Message-ID:  <201603030107.u2317HJU026506@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Thu Mar  3 01:07:17 2016
New Revision: 296329
URL: https://svnweb.freebsd.org/changeset/base/296329

Log:
  Allocate the PCI BAR resource with bus_alloc_resource_any()
  
  We don't support allocating any other range with PCI BARs.

Modified:
  head/sys/dev/sbni/if_sbni_pci.c

Modified: head/sys/dev/sbni/if_sbni_pci.c
==============================================================================
--- head/sys/dev/sbni/if_sbni_pci.c	Wed Mar  2 23:53:08 2016	(r296328)
+++ head/sys/dev/sbni/if_sbni_pci.c	Thu Mar  3 01:07:17 2016	(r296329)
@@ -95,8 +95,8 @@ sbni_pci_probe(device_t dev)
 		device_set_desc(dev, "Granch SBNI12/PCI adapter");
 
 	sc->io_rid = PCIR_BAR(0);
- 	sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid,
-					0ul, ~0ul, ports, RF_ACTIVE);
+ 	sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
+					    &sc->io_rid, RF_ACTIVE);
 	if (!sc->io_res) {
 		device_printf(dev, "cannot allocate io ports!\n");
 		if (sc->slave_sc)



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