Deleted Added
full compact
pccard_cis_quirks.c (182142) pccard_cis_quirks.c (298411)
1/* $NetBSD: pcmcia_cis_quirks.c,v 1.6 2000/04/12 21:07:55 scw Exp $ */
2
3#include <sys/cdefs.h>
1/* $NetBSD: pcmcia_cis_quirks.c,v 1.6 2000/04/12 21:07:55 scw Exp $ */
2
3#include <sys/cdefs.h>
4__FBSDID("$FreeBSD: head/sys/dev/pccard/pccard_cis_quirks.c 182142 2008-08-25 04:59:43Z imp $");
4__FBSDID("$FreeBSD: head/sys/dev/pccard/pccard_cis_quirks.c 298411 2016-04-21 15:38:28Z pfg $");
5
6#define PCCARDDEBUG
7
8/*-
9 * Copyright (c) 1998 Marc Horowitz. All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions

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

252 { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3C1, PCMCIA_CIS_INVALID,
253 &pccard_3c1_func0, &pccard_3c1_func0_cfe0 },
254 { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, PCMCIA_CIS_SVEC_LANCARD,
255 &pccard_sveclancard_func0, &pccard_sveclancard_func0_cfe0 },
256 { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, PCMCIA_CIS_NDC_ND5100_E,
257 &pccard_ndc_nd5100_func0, &pccard_ndc_nd5100_func0_cfe0 },
258};
259
5
6#define PCCARDDEBUG
7
8/*-
9 * Copyright (c) 1998 Marc Horowitz. All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions

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

252 { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3C1, PCMCIA_CIS_INVALID,
253 &pccard_3c1_func0, &pccard_3c1_func0_cfe0 },
254 { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, PCMCIA_CIS_SVEC_LANCARD,
255 &pccard_sveclancard_func0, &pccard_sveclancard_func0_cfe0 },
256 { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, PCMCIA_CIS_NDC_ND5100_E,
257 &pccard_ndc_nd5100_func0, &pccard_ndc_nd5100_func0_cfe0 },
258};
259
260static int n_pccard_cis_quirks =
261 sizeof(pccard_cis_quirks)/sizeof(pccard_cis_quirks[0]);
262
263static int
264pccard_cis_quirk_match(struct pccard_softc *sc, struct pccard_cis_quirk *q)
265{
266 if ((sc->card.manufacturer == q->manufacturer) &&
267 (sc->card.product == q->product) &&
268 (((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) &&
269 (sc->card.product != PCMCIA_PRODUCT_INVALID)) ||
270 ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) &&

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

284 int i, j;
285 struct pccard_function *pf, *pf_next, *pf_last;
286 struct pccard_config_entry *cfe, *cfe_next;
287 struct pccard_cis_quirk *q;
288
289 pf = NULL;
290 pf_last = NULL;
291
260static int
261pccard_cis_quirk_match(struct pccard_softc *sc, struct pccard_cis_quirk *q)
262{
263 if ((sc->card.manufacturer == q->manufacturer) &&
264 (sc->card.product == q->product) &&
265 (((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) &&
266 (sc->card.product != PCMCIA_PRODUCT_INVALID)) ||
267 ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) &&

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

281 int i, j;
282 struct pccard_function *pf, *pf_next, *pf_last;
283 struct pccard_config_entry *cfe, *cfe_next;
284 struct pccard_cis_quirk *q;
285
286 pf = NULL;
287 pf_last = NULL;
288
292 for (i=0; i<n_pccard_cis_quirks; i++) {
289 for (i = 0; i < nitems(pccard_cis_quirks); i++) {
293 q = &pccard_cis_quirks[i];
294 if (!pccard_cis_quirk_match(sc, q))
295 continue;
296 if (!wiped) {
297 if (bootverbose) {
298 device_printf(dev, "using CIS quirks for ");
299 for (j = 0; j < 4; j++) {
300 if (sc->card.cis1_info[j] == NULL)

--- 53 unchanged lines hidden ---
290 q = &pccard_cis_quirks[i];
291 if (!pccard_cis_quirk_match(sc, q))
292 continue;
293 if (!wiped) {
294 if (bootverbose) {
295 device_printf(dev, "using CIS quirks for ");
296 for (j = 0; j < 4; j++) {
297 if (sc->card.cis1_info[j] == NULL)

--- 53 unchanged lines hidden ---