Re: cardbus support broken? (Was Re: cvs commit:src/sys/dev/cardbus cardbus.c)

From: Daniel Eischen <deischen_at_freebsd.org>
Date: Tue, 8 Mar 2005 21:16:07 -0500 (EST)
On Tue, 8 Mar 2005, Daniel Eischen wrote:

> On Tue, 8 Mar 2005, Daniel Eischen wrote:
>
> >
> > I tried a kernel from today and now I don't get a panic.  But,
> > the dc-based Xircom isn't even recognized any longer.  I get:
> >
> >    NEW_UNRHDR 0-ffffff -> 0xc1b8c5c0
> >    cbb0: Unsupported card type detected
> >
> > Full dmesg from today and previously working kernel are attached.
> > I'll try reverting to r1.48 of cardbus.c and see if that helps.
>
> Reverting to r1.48 of cardbus.c fixed the problem for me as well.

And removing the pci_cfg_save() and pci_cfg_restore() also
fixed the problem.

With patch from below:

pcib2: cardbus0 requested memory range 0xf4000000-0xfbffffff: good
pcib2: cardbus0 requested memory range 0xf4000000-0xfbffffff: good
pcib2: cardbus0 requested I/O range 0xe000-0xffff: in range
found-> vendor=0x115d, dev=0x0003, revid=0x03
        bus=4, slot=0, func=0
        class=02-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0000, statreg=0x0210, cachelnsz=8 (dwords)
        lattimer=0xa8 (5040 ns), mingnt=0x14 (5000 ns), maxlat=0x28 (10000 ns)
        intpin=a, irq=222
        powerspec 1  supports D0 D1 D2 D3  current D0
dc0: <Xircom X3201 10/100BaseTX> port 0xe000-0xe07f mem 0xf4002000-0xf40027ff,0xf4002800-0xf4002fff irq 10 at device 0.0 on cardbus0
pcib2: dc0 requested I/O range 0xe000-0xe07f: in range
miibus0: <MII bus> on dc0
tdkphy0: <TDK 78Q2120 media interface> on miibus0
tdkphy0: OUI 0x00c039, model 0x0014, rev. 11
tdkphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: bpf attached
dc0: Ethernet address: 00:10:a4:8a:17:17
dc0: if_start running deferred for Giant
dc0: [GIANT-LOCKED]


Index: cardbus.c
===================================================================
RCS file: /opt/FreeBSD/cvs/src/sys/dev/cardbus/cardbus.c,v
retrieving revision 1.49
diff -u -r1.49 cardbus.c
--- cardbus.c   28 Feb 2005 01:27:24 -0000      1.49
+++ cardbus.c   9 Mar 2005 01:45:18 -0000
_at__at_ -471,8 +471,8 _at__at_
                        }
                        cardbus_pickup_maps(cbdev, child);
                        cardbus_alloc_resources(cbdev, child);
-                       pci_cfg_save(child, &dinfo->pci, 0);
-                       pci_cfg_restore(child, &dinfo->pci);
+//                     pci_cfg_save(child, &dinfo->pci, 0);
+//                     pci_cfg_restore(child, &dinfo->pci);
                        pci_print_verbose(&dinfo->pci);
                        if (device_probe_and_attach(child) == 0)
                                cardattached++;
_at__at_ -545,7 +545,7 _at__at_
                        continue;
                dinfo = device_get_ivars(dev);
                pci_print_verbose(&dinfo->pci);
-               pci_cfg_restore(dev, &dinfo->pci);
+//             pci_cfg_restore(dev, &dinfo->pci);
                device_probe_and_attach(dev);
        }
        free(devlist, M_TEMP);
Received on Wed Mar 09 2005 - 01:16:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:29 UTC