From owner-freebsd-current@FreeBSD.ORG Sun Jul 31 17:31:07 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADBE416A41F for ; Sun, 31 Jul 2005 17:31:07 +0000 (GMT) (envelope-from chris@haakonia.hitnet.rwth-aachen.de) Received: from ms-dienst.rz.rwth-aachen.de (ms-1.rz.RWTH-Aachen.DE [134.130.3.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B71043D45 for ; Sun, 31 Jul 2005 17:31:07 +0000 (GMT) (envelope-from chris@haakonia.hitnet.rwth-aachen.de) Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0IKI008GS5ZTY8@ms-dienst.rz.rwth-aachen.de> for current@freebsd.org; Sun, 31 Jul 2005 19:31:06 +0200 (MEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Sun, 31 Jul 2005 19:31:05 +0200 (MEST) Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by relay.rwth-aachen.de (8.13.3/8.13.3/1) with ESMTP id j6VHV4hq012426; Sun, 31 Jul 2005 19:31:04 +0200 (MEST) Received: from moria.hitnet.rwth-aachen.de ([137.226.181.149] helo=haakonia.hitnet.rwth-aachen.de) by bigboss.hitnet.rwth-aachen.de with esmtp (Exim 3.35 #1 (Debian)) id 1DzHeS-0002Tu-00; Sun, 31 Jul 2005 19:31:04 +0200 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id 945EE2846F; Sun, 31 Jul 2005 19:30:34 +0200 (CEST) Date: Sun, 31 Jul 2005 19:30:34 +0200 From: Christian Brueffer In-reply-to: <42ED06D8.70506@errno.com> To: Sam Leffler Message-id: <20050731173034.GB18593@unixpages.org> MIME-version: 1.0 Content-type: multipart/signed; boundary="2B/JsCI69OhZNC5r"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-disposition: inline User-Agent: Mutt/1.5.6i X-Operating-System: FreeBSD 5.4-STABLE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D References: <20050731142625.GC1190@unixpages.org> <42ED06D8.70506@errno.com> Cc: current@freebsd.org Subject: Re: [PATCH] fwip(4) panic on attach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 17:31:07 -0000 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >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 @@ > >=20 > > fwip =3D ((struct fwip_softc *)device_get_softc(dev)); > > unit =3D device_get_unit(dev); > >+ =20 > >+ bzero(fwip, sizeof(struct fwip_softc)); > >+ > > ifp =3D fwip->fw_softc.fwip_ifp =3D if_alloc(IFT_IEEE1394); > > if (ifp =3D=3D NULL) > > return (ENOSPC); > >=20 > >- bzero(fwip, sizeof(struct fwip_softc)); > > /* XXX */ > > fwip->dma_ch =3D -1; > > >=20 > I thought the softc was guaranteed to be zero'd; can't you just delete=20 > the bzero? >=20 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 --=20 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 --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFC7Qq6bHYXjKDtmC0RAk8eAJ0U3ZEZ6jJ8GIlWYU2qgQmtYOnphQCfY88+ iqcI83wSzKUGtKu8e12DFkY= =dp+S -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r--