diff options
author | imp <imp@FreeBSD.org> | 2005-09-20 06:45:38 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-20 06:45:38 +0000 |
commit | ad1a6d37e082463b1e42ab69672645bbe05963a6 (patch) | |
tree | ae488d39c3e694a2c09ab456a9c10a8b8c2383c4 /sys/dev | |
parent | e808439374679936f3cf53c6b7988b6b350da04a (diff) | |
download | FreeBSD-src-ad1a6d37e082463b1e42ab69672645bbe05963a6.zip FreeBSD-src-ad1a6d37e082463b1e42ab69672645bbe05963a6.tar.gz |
Call the passed function on cis scanning for all nodes in the CIS
chains, not just the 'real' ones.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pccard/pccard_cis.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 357f205..ce2c23d 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -45,6 +45,7 @@ #include <dev/pccard/pccardreg.h> #include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccardvarp.h> #include <dev/pccard/pccard_cis.h> #include "card_if.h" @@ -181,6 +182,10 @@ pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg) DPRINTF(("TOO MANY CIS_NONE\n")); cis_none_cnt--; #endif + if ((*fct)(&tuple, arg)) { + ret = 1; + goto done; + } tuple.ptr++; continue; } else if (tuple.code == CISTPL_END) { @@ -200,6 +205,10 @@ pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg) switch (tuple.code) { case CISTPL_LONGLINK_A: case CISTPL_LONGLINK_C: + if ((*fct)(&tuple, arg)) { + ret = 1; + goto done; + } if (tuple.length < 4) { DPRINTF(("CISTPL_LONGLINK_%s too " "short %d\n", @@ -216,10 +225,18 @@ pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg) longlink_addr)); break; case CISTPL_NO_LINK: + if ((*fct)(&tuple, arg)) { + ret = 1; + goto done; + } longlink_present = 0; DPRINTF(("CISTPL_NO_LINK\n")); break; case CISTPL_CHECKSUM: + if ((*fct)(&tuple, arg)) { + ret = 1; + goto done; + } if (tuple.length < 5) { DPRINTF(("CISTPL_CHECKSUM too " "short %d\n", tuple.length)); |