Date: Sun, 13 Jan 2008 18:33:12 +0200 From: "Taras Kopets" <tkopets@gmail.com> To: freebsd-questions@freebsd.org Subject: pccard problem - old toshiba 440cdx Message-ID: <ce3f16fd0801130833h12b5ea4sf247635cf9c66cb2@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi list! I'm trying to make my PCMCIA ethernet card (3C589D-TP) to work, but with no luck. At boot time I get: CIS is too long -- truncating pccard1: Card has no functions! cbb1: PC Card card activation failed I've tried to google this problem on the web, but no solutions found, so I've decided to look at source of pccard. The origin of my problem comes from src/sys/dev/pccard/pccard_cis.c. I'm not expert in C, but the code I see in this file seems to be strange: --------------- CODE ------------- .................... #define PCCARD_CIS_SIZE 4096 .................... .................... int pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg) { .................... struct pccard_tuple tuple; .................... .................... tuple.memt = rman_get_bustag(res); tuple.memh = rman_get_bushandle(res); tuple.ptr = 0; DPRINTF(("cis mem map 0x%x (resource: 0x%lx)\n", (unsigned int) tuple.memh, rman_get_start(res))); tuple.mult = 2; .................... .................... if (tuple.mult * tuple.ptr >= PCCARD_CIS_SIZE - 1 - 32 /* ad hoc value */ ) { printf("CIS is too long -- truncating\n"); tuple.code = CISTPL_END; } else { /* get the tuple code */ tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); } --------------- END OF CODE ------------- The strange thing is this: if (tuple.mult * tuple.ptr >= PCCARD_CIS_SIZE-1- 32) >From the code we have this values: tuple.mult=2 tuple.ptr=0 PCCARD_CIS_SIZE=4096 So we will always get to the "CIS is too long -- truncating" piece of code: if (0*2 >= 4096-1-32). Can this be the cause of problems? Please someone tell me I'm wrong. Thanks in advance, Sorry for my English, Taras Kopets
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ce3f16fd0801130833h12b5ea4sf247635cf9c66cb2>