From owner-freebsd-current@FreeBSD.ORG Sat Jun 25 11:48:42 2005 Return-Path: X-Original-To: freebsd-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 6C5C116A41C; Sat, 25 Jun 2005 11:48:42 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A7C543D49; Sat, 25 Jun 2005 11:48:42 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 4D7355CB16; Sat, 25 Jun 2005 04:48:42 -0700 (PDT) Date: Sat, 25 Jun 2005 13:48:42 +0200 From: Maxime Henrion To: Ruslan Ermilov Message-ID: <20050625114842.GJ14567@elvis.mu.org> References: <42BCA0A0.8040902@savvis.net> <20050625064229.GA56086@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050625064229.GA56086@ip.net.ua> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@FreeBSD.org Subject: Re: [patch] ep(4) panic 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: Sat, 25 Jun 2005 11:48:42 -0000 Ruslan Ermilov wrote: > On Fri, Jun 24, 2005 at 05:09:04PM -0700, Maksim Yevmenkin wrote: > > Dear Hackers, > > > > my -current panics when i insert ep(4) pcmcia network adapter. following > > is the patch to fix the panic. > > > > --- if_ep_pccard.c.orig Fri Jun 10 12:04:44 2005 > > +++ if_ep_pccard.c Fri Jun 24 16:51:12 2005 > > @@ -73,6 +73,7 @@ > > struct ep_board *epb = &sc->epb; > > const char *desc; > > uint16_t result; > > + u_char eaddr[6]; > > int error; > > > > error = ep_alloc(dev); > > @@ -120,7 +121,7 @@ > > * Newer cards supported by this device need to have their > > * MAC address set. > > */ > > - error = ep_get_macaddr(sc, (u_char *)&IFP2ENADDR(sc->ifp)); > > + error = ep_get_macaddr(sc, eaddr); > > > > ep_free(dev); > > return (0); > > > That's odd. You're saving the MAC address nowhere (it's reused > later). But ep_get_macaddr() does a little bit more than what its name suggests. Cheers, Maxime