Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2005 19:30:34 +0200
From:      Christian Brueffer <chris@unixpages.org>
To:        Sam Leffler <sam@errno.com>
Cc:        current@freebsd.org
Subject:   Re: [PATCH] fwip(4) panic on attach
Message-ID:  <20050731173034.GB18593@unixpages.org>
In-Reply-To: <42ED06D8.70506@errno.com>
References:  <20050731142625.GC1190@unixpages.org> <42ED06D8.70506@errno.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Jul 31, 2005 at 10:14:00AM -0700, Sam Leffler wrote:
> Christian Brueffer wrote:
> >Hi,
> >
> >in CURRENT and RELENG_6 I get a reproducible panic with fwip(4) when
> >plugging in my firewire cardbus card.  The following patch fixes it,
> >but I'm not sure if it's correct.
> >
> >The interface works after applying the patch.
> >
> >Index: if_fwip.c
> >===================================================================
> >RCS file: /data/ncvs/freebsd/src/sys/dev/firewire/if_fwip.c,v
> >retrieving revision 1.7
> >diff -u -r1.7 if_fwip.c
> >--- if_fwip.c   10 Jun 2005 16:49:08 -0000      1.7
> >+++ if_fwip.c   31 Jul 2005 14:01:52 -0000
> >@@ -171,11 +171,13 @@
> > 
> >        fwip = ((struct fwip_softc *)device_get_softc(dev));
> >        unit = device_get_unit(dev);
> >+       
> >+       bzero(fwip, sizeof(struct fwip_softc));
> >+
> >        ifp = fwip->fw_softc.fwip_ifp = if_alloc(IFT_IEEE1394);
> >        if (ifp == NULL)
> >                return (ENOSPC);
> > 
> >-       bzero(fwip, sizeof(struct fwip_softc));
> >        /* XXX */
> >        fwip->dma_ch = -1;
> >
> 
> I thought the softc was guaranteed to be zero'd; can't you just delete 
> the bzero?
> 

That was the other option I was considering and is also works.  I wasn't
sure about it though, so I left it in.

There's a similar bzero() call in if_fwe.c that should be removed then.

- Christian

-- 
Christian Brueffer	chris@unixpages.org	brueffer@FreeBSD.org
GPG Key:	 http://people.freebsd.org/~brueffer/brueffer.key.asc
GPG Fingerprint: A5C8 2099 19FF AACA F41B  B29B 6C76 178C A0ED 982D

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFC7Qq6bHYXjKDtmC0RAk8eAJ0U3ZEZ6jJ8GIlWYU2qgQmtYOnphQCfY88+
iqcI83wSzKUGtKu8e12DFkY=
=dp+S
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050731173034.GB18593>