Deleted Added
full compact
aac_pci.c (129879) aac_pci.c (133606)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#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 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac_pci.c 129879 2004-05-30 20:08:47Z phk $");
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac_pci.c 133606 2004-08-13 01:44:09Z scottl $");
32
33/*
34 * PCI bus interface and resource allocation.
35 */
36
37#include "opt_aac.h"
38
39#include <sys/param.h>

--- 87 unchanged lines hidden (view full) ---

127 {0x9005, 0x0285, 0x9005, 0x0286, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB |
128 AAC_FLAGS_256FIBS, "Adaptec SCSI RAID 2120S"},
129 {0x9005, 0x0285, 0x9005, 0x0290, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
130 "Adaptec SCSI RAID 2410SA"},
131 {0x9005, 0x0285, 0x1028, 0x0291, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
132 "Dell CERC SATA RAID 2"},
133 {0x9005, 0x0285, 0x9005, 0x0292, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
134 "Adaptec SCSI RAID 2810SA"},
32
33/*
34 * PCI bus interface and resource allocation.
35 */
36
37#include "opt_aac.h"
38
39#include <sys/param.h>

--- 87 unchanged lines hidden (view full) ---

127 {0x9005, 0x0285, 0x9005, 0x0286, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB |
128 AAC_FLAGS_256FIBS, "Adaptec SCSI RAID 2120S"},
129 {0x9005, 0x0285, 0x9005, 0x0290, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
130 "Adaptec SCSI RAID 2410SA"},
131 {0x9005, 0x0285, 0x1028, 0x0291, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
132 "Dell CERC SATA RAID 2"},
133 {0x9005, 0x0285, 0x9005, 0x0292, AAC_HWIF_I960RX, AAC_FLAGS_NO4GB,
134 "Adaptec SCSI RAID 2810SA"},
135 {0x9005, 0x0286, 0x9005, 0x028d, AAC_HWIF_RKT, 0,
136 "Adaptec SCSI RAID 2130S"},
135 {0, 0, 0, 0, 0, 0, 0}
136};
137
138/*
139 * Determine whether this is one of our supported adapters.
140 */
141static int
142aac_pci_probe(device_t dev)

--- 117 unchanged lines hidden (view full) ---

260 device_printf(sc->aac_dev, "can't allocate parent DMA tag\n");
261 goto out;
262 }
263
264 /*
265 * Detect the hardware interface version, set up the bus interface
266 * indirection.
267 */
137 {0, 0, 0, 0, 0, 0, 0}
138};
139
140/*
141 * Determine whether this is one of our supported adapters.
142 */
143static int
144aac_pci_probe(device_t dev)

--- 117 unchanged lines hidden (view full) ---

262 device_printf(sc->aac_dev, "can't allocate parent DMA tag\n");
263 goto out;
264 }
265
266 /*
267 * Detect the hardware interface version, set up the bus interface
268 * indirection.
269 */
268 sc->aac_hwif = AAC_HWIF_UNKNOWN;
269 for (i = 0; aac_identifiers[i].vendor != 0; i++) {
270 if ((aac_identifiers[i].vendor == pci_get_vendor(dev)) &&
271 (aac_identifiers[i].device == pci_get_device(dev)) &&
272 (aac_identifiers[i].subvendor == pci_get_subvendor(dev)) &&
273 (aac_identifiers[i].subdevice == pci_get_subdevice(dev))) {
274 sc->aac_hwif = aac_identifiers[i].hwif;
275 switch(sc->aac_hwif) {
276 case AAC_HWIF_I960RX:
277 debug(2, "set hardware up for i960Rx");
278 sc->aac_if = aac_rx_interface;
279 break;
270 for (i = 0; aac_identifiers[i].vendor != 0; i++) {
271 if ((aac_identifiers[i].vendor == pci_get_vendor(dev)) &&
272 (aac_identifiers[i].device == pci_get_device(dev)) &&
273 (aac_identifiers[i].subvendor == pci_get_subvendor(dev)) &&
274 (aac_identifiers[i].subdevice == pci_get_subdevice(dev))) {
275 sc->aac_hwif = aac_identifiers[i].hwif;
276 switch(sc->aac_hwif) {
277 case AAC_HWIF_I960RX:
278 debug(2, "set hardware up for i960Rx");
279 sc->aac_if = aac_rx_interface;
280 break;
280
281 case AAC_HWIF_STRONGARM:
282 debug(2, "set hardware up for StrongARM");
283 sc->aac_if = aac_sa_interface;
284 break;
285 case AAC_HWIF_FALCON:
286 debug(2, "set hardware up for Falcon/PPC");
287 sc->aac_if = aac_fa_interface;
288 break;
281 case AAC_HWIF_STRONGARM:
282 debug(2, "set hardware up for StrongARM");
283 sc->aac_if = aac_sa_interface;
284 break;
285 case AAC_HWIF_FALCON:
286 debug(2, "set hardware up for Falcon/PPC");
287 sc->aac_if = aac_fa_interface;
288 break;
289 case AAC_HWIF_RKT:
290 debug(2, "setu hardware up for Rocket/MIPS");
291 sc->aac_if = aac_rkt_interface;
292 break;
293 default:
294 sc->aac_hwif = AAC_HWIF_UNKNOWN;
295 break;
289 }
290
291 /* Set up quirks */
292 sc->flags = aac_identifiers[i].quirks;
293
294 break;
295 }
296 }

--- 17 unchanged lines hidden ---
296 }
297
298 /* Set up quirks */
299 sc->flags = aac_identifiers[i].quirks;
300
301 break;
302 }
303 }

--- 17 unchanged lines hidden ---