Deleted Added
full compact
aacraid_pci.c (250963) aacraid_pci.c (254263)
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>
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 250963 2013-05-24 09:22:43Z achim $");
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 */
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);
172 command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
173 command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
173 command |= PCIM_CMD_BUSMASTEREN;
174 pci_write_config(dev, PCIR_COMMAND, command, 2);
175 command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
176 if (!(command & PCIM_CMD_BUSMASTEREN)) {
177 device_printf(sc->aac_dev, "can't enable bus-master feature\n");
178 goto out;
179 }
174 if (!(command & PCIM_CMD_BUSMASTEREN)) {
175 device_printf(sc->aac_dev, "can't enable bus-master feature\n");
176 goto out;
177 }
180 if ((command & PCIM_CMD_MEMEN) == 0) {
181 device_printf(sc->aac_dev, "memory window not available\n");
182 goto out;
183 }
184
185 /*
186 * Detect the hardware interface version, set up the bus interface
187 * indirection.
188 */
189 id = aac_find_ident(dev);
190 sc->aac_hwif = id->hwif;
191 switch(sc->aac_hwif) {

--- 74 unchanged lines hidden ---
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 ---