panic inserting CF card.

Don Lewis truckman at FreeBSD.org
Thu Nov 27 19:33:59 PST 2003


On 27 Nov, masta wrote:
> I'm able to reproduce a panic on demand. I simply insert my IBM Microdrive
> CF card into the PCM/CIA slot of the laptop, which is a Dell CPi, and
> panic! I build a kernel.debug in the hope somebody can help me analyze the
> back-trace.
> 
> Oh by the way, the sources from this backtrace are from 11/27/2003, and
> inserting the CF card used to be functional in early November. I have no
> begun the process of targeting various dates/time to find when
> functionality was lost.

> (kgdb) where
> #10 0xc06995d8 in calltrap () at {standard input}:94
> #11 0xc06be8de in __udivdi3 (a=0, b=0) at ../../../libkern/udivdi3.c:51
> #12 0xc044ac53 in ad_print (adp=0x0) at ../../../dev/ata/ata-disk.c:384
> #13 0xc044a3fb in ad_attach (atadev=0xc243d4a4) at
> ../../../dev/ata/ata-disk.c:162
> #14 0xc0435e99 in ata_attach (dev=0x0) at ../../../dev/ata/ata-all.c:165
> #15 0xc04752f5 in pccard_compat_do_attach (bus=0xc13a6b00, dev=0xc243d400)
> at card_if.h:120
> #16 0xc043c927 in pccard_compat_attach (dev=0xc243d400) at card_if.h:138
> #17 0xc052fdf9 in device_probe_and_attach (dev=0xc243d400) at device_if.h:39
> #18 0xc0473fa8 in pccard_attach_card (dev=0xc13a6b00) at
> ../../../dev/pccard/pccard.c:262
> #19 0xc04628c8 in exca_insert (exca=0xc138d204) at card_if.h:66
> #20 0xc047c4f3 in cbb_insert (sc=0xc138d204) at
> ../../../dev/pccbb/pccbb.c:1078
> #21 0xc047c30b in cbb_event_thread (arg=0xc138d200) at
> ../../../dev/pccbb/pccbb.c:1028
> #22 0xc0502b84 in fork_exit (callout=0xc047c1d0 <cbb_event_thread>,
> arg=0x0, frame=0x0) at ../../../kern/kern_fork.c:793
> (kgdb) q

In ad_print() there is the following statement:

        ata_prtdev(adp->device,"%lluMB <%.40s> [%lld/%d/%d] at ata%d-%s %s%s\n",
                   (unsigned long long)(adp->total_secs /
                                        ((1024L * 1024L) / DEV_BSIZE)),
                   adp->device->param->model,
                   (unsigned long long)(adp->total_secs /
                                        (adp->heads * adp->sectors)),
                   adp->heads, adp->sectors,
                   device_get_unit(adp->device->channel->dev),
                   (adp->device->unit == ATA_MASTER) ? "master" : "slave",
                   (adp->flags & AD_F_TAG_ENABLED) ? "tagged " : "",
                   ata_mode2str(adp->device->mode));   

Offhand I'd guess that adp->heads and/or adp->sectors is zero.  If
you've got a core file, try backtracking from there with gdb, otherwise
sprinkle some printf's around.  Either this calculation is new, or some
recent change is causing the heads and sectors to be initialized to
zero.


More information about the freebsd-current mailing list