1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001-2010 Adaptec, Inc. 6 * Copyright (c) 2010-2012 PMC-Sierra, Inc. 7 * All rights reserved. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/aacraid/aacraid_pci.c 254263 2013-08-12 23:30:01Z scottl $"); |
33 34/* 35 * PCI bus interface and resource allocation. 36 */ 37 38#include "opt_aacraid.h" 39 40#include <sys/param.h> --- 123 unchanged lines hidden (view full) --- 164 sc->aac_dev = dev; 165 166 /* assume failure is 'not configured' */ 167 error = ENXIO; 168 169 /* 170 * Verify that the adapter is correctly set up in PCI space. 171 */ |
172 pci_enable_busmaster(dev); |
173 command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2); |
174 if (!(command & PCIM_CMD_BUSMASTEREN)) { 175 device_printf(sc->aac_dev, "can't enable bus-master feature\n"); 176 goto out; 177 } |
178 179 /* 180 * Detect the hardware interface version, set up the bus interface 181 * indirection. 182 */ 183 id = aac_find_ident(dev); 184 sc->aac_hwif = id->hwif; 185 switch(sc->aac_hwif) { --- 74 unchanged lines hidden --- |