diff options
author | imp <imp@FreeBSD.org> | 2002-03-29 08:05:39 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-03-29 08:05:39 +0000 |
commit | 835285fed83665fa6aa8836889e7ec6d16c7368e (patch) | |
tree | 136b1dc419e38661bfb5cadc8d87e22bce8b3af1 | |
parent | 7e2815151910249a594e5d75996d568f67874efc (diff) | |
download | FreeBSD-src-835285fed83665fa6aa8836889e7ec6d16c7368e.zip FreeBSD-src-835285fed83665fa6aa8836889e7ec6d16c7368e.tar.gz |
Improve support of MFC cards (Multi-function cards). This commit
allows us to properly parse cards with attribute memory based CIS that
before wouldn't parse correctly, sometimes with a panic. This allows
me to get my 3C562 modem/ethernet card to fail to attach due to
problems in the ep and sio drivers rather than due to problems in the
CIS parsing code :-).
We weren't setting the address to jump to for the function entries.
This caused us to only work when the addional entries were after the
first ones. On the 3C562/3C563 card this was not the case.
We were also mapping Attribute memory when common memory was asked for
in the target of the LONGLINK_{A,C} or LONGLINK_MFC.
My IBM Home And Away Modem/LAN card still fails for reasons unknown.
-rw-r--r-- | sys/dev/pccard/pccard_cis.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 294aa89..923f32e 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -335,21 +335,23 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), if (longlink_present) { CARD_SET_RES_FLAGS(device_get_parent(dev), dev, SYS_RES_MEMORY, rid, longlink_common ? - PCCARD_A_MEM_ATTR : PCCARD_A_MEM_ATTR); + PCCARD_A_MEM_COM : PCCARD_A_MEM_ATTR); DPRINTF(("cis mem map %x\n", (unsigned int) tuple.memh)); tuple.mult = longlink_common ? 1 : 2; + tuple.ptr = longlink_addr; longlink_present = 0; longlink_common = 1; longlink_addr = 0; } else if (mfc_count && (mfc_index < mfc_count)) { CARD_SET_RES_FLAGS(device_get_parent(dev), dev, SYS_RES_MEMORY, rid, mfc[mfc_index].common - ? PCCARD_A_MEM_ATTR : PCCARD_A_MEM_ATTR); + ? PCCARD_A_MEM_COM : PCCARD_A_MEM_ATTR); DPRINTF(("cis mem map %x\n", (unsigned int) tuple.memh)); /* set parse state, and point at the next one */ tuple.mult = mfc[mfc_index].common ? 1 : 2; + tuple.ptr = mfc[mfc_index].addr; mfc_index++; } else { goto done; |