Deleted Added
full compact
aac_pci.c (174368) aac_pci.c (174412)
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 174368 2007-12-06 18:25:29Z emaste $");
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac_pci.c 174412 2007-12-07 18:05:41Z emaste $");
32
33/*
34 * PCI bus interface and resource allocation.
35 */
36
37#include "opt_aac.h"
38
39#include <sys/param.h>

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

267 {0x9005, 0x0285, 0x15d9, 0x2ca, AAC_HWIF_I960RX, 0,
268 "AOC-USAS-S8iR"},
269 {0x9005, 0x0285, 0x15d9, 0x2d2, AAC_HWIF_I960RX, 0,
270 "AOC-USAS-S8i-LP"},
271 {0x9005, 0x0285, 0x15d9, 0x2d3, AAC_HWIF_I960RX, 0,
272 "AOC-USAS-S8iR-LP"},
273 {0, 0, 0, 0, 0, 0, 0}
274};
32
33/*
34 * PCI bus interface and resource allocation.
35 */
36
37#include "opt_aac.h"
38
39#include <sys/param.h>

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

267 {0x9005, 0x0285, 0x15d9, 0x2ca, AAC_HWIF_I960RX, 0,
268 "AOC-USAS-S8iR"},
269 {0x9005, 0x0285, 0x15d9, 0x2d2, AAC_HWIF_I960RX, 0,
270 "AOC-USAS-S8i-LP"},
271 {0x9005, 0x0285, 0x15d9, 0x2d3, AAC_HWIF_I960RX, 0,
272 "AOC-USAS-S8iR-LP"},
273 {0, 0, 0, 0, 0, 0, 0}
274};
275struct aac_ident
276aac_family_identifiers[] = {
277 {0x9005, 0x0285, 0, 0, AAC_HWIF_I960RX, 0,
278 "Adaptec RAID Controller"},
279 {0x9005, 0x0286, 0, 0, AAC_HWIF_RKT, 0,
280 "Adaptec RAID Controller"},
281 {0, 0, 0, 0, 0, 0, 0}
282};
275
276static struct aac_ident *
277aac_find_ident(device_t dev)
278{
279 struct aac_ident *m;
283
284static struct aac_ident *
285aac_find_ident(device_t dev)
286{
287 struct aac_ident *m;
288 u_int16_t vendid, devid, sub_vendid, sub_devid;
280
289
290 vendid = pci_get_vendor(dev);
291 devid = pci_get_device(dev);
292 sub_vendid = pci_get_subvendor(dev);
293 sub_devid = pci_get_subdevice(dev);
294
281 for (m = aac_identifiers; m->vendor != 0; m++) {
295 for (m = aac_identifiers; m->vendor != 0; m++) {
282 if ((m->vendor == pci_get_vendor(dev)) &&
283 (m->device == pci_get_device(dev)) &&
284 (m->subvendor == pci_get_subvendor(dev)) &&
285 (m->subdevice == pci_get_subdevice(dev)))
286 return (m);
296 if ((m->vendor == vendid) && (m->device == devid) &&
297 (m->subvendor == sub_vendid) &&
298 (m->subdevice == sub_devid))
299 return (m);
287 }
288
300 }
301
302 for (m = aac_family_identifiers; m->vendor != 0; m++) {
303 if ((m->vendor == vendid) && (m->device == devid))
304 return (m);
305 }
306
289 return (NULL);
290}
291
292/*
293 * Determine whether this is one of our supported adapters.
294 */
295static int
296aac_pci_probe(device_t dev)

--- 194 unchanged lines hidden ---
307 return (NULL);
308}
309
310/*
311 * Determine whether this is one of our supported adapters.
312 */
313static int
314aac_pci_probe(device_t dev)

--- 194 unchanged lines hidden ---