From owner-svn-src-all@FreeBSD.ORG Fri Oct 15 00:12:47 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EAAA106564A; Fri, 15 Oct 2010 00:12:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id E5E508FC12; Fri, 15 Oct 2010 00:12:46 +0000 (UTC) Received: from c122-106-146-165.carlnfd1.nsw.optusnet.com.au (c122-106-146-165.carlnfd1.nsw.optusnet.com.au [122.106.146.165]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o9F0Cfk3004435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Oct 2010 11:12:43 +1100 Date: Fri, 15 Oct 2010 11:12:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jung-uk Kim In-Reply-To: <201010141558.03154.jkim@FreeBSD.org> Message-ID: <20101015111106.P1144@besplex.bde.org> References: <201010131717.o9DHHobD094458@svn.freebsd.org> <201010131359.44590.jkim@FreeBSD.org> <20101014113203.N1092@besplex.bde.org> <201010141558.03154.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, Rui Paulo , Roman Divacky , Bruce Evans , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r213793 - in head/sys/dev: ce cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2010 00:12:47 -0000 On Thu, 14 Oct 2010, Jung-uk Kim wrote: > On Wednesday 13 October 2010 09:16 pm, Bruce Evans wrote: >> On Wed, 13 Oct 2010, Jung-uk Kim wrote: >>> ... >>> I think the attached patch should do. >> >> % Index: sys/dev/ce/if_ce.c >> % >> =================================================================== >> % --- sys/dev/ce/if_ce.c (revision 213782) >> % +++ sys/dev/ce/if_ce.c (working copy) >> % @@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, >> u_long cmd, % IFP2SP(d->ifp)->pp_flags &= ~(PP_FR); >> % IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE; >> % d->ifp->if_flags |= PP_CISCO; >> % - } else if (! strcmp ("fr", (char*)data) && PP_FR) { >> % +#if PP_FR > 0 >> % + } else if (! strcmp ("fr", (char*)data)) { >> % d->ifp->if_flags &= ~(PP_CISCO); >> % IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; >> % +#endif >> % } else if (! strcmp ("ppp", (char*)data)) { >> % IFP2SP(d->ifp)->pp_flags &= ~PP_FR; >> % IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE; >> % ... >> >> This gives different behaviour if PP_FR is even or negative. Even >> values used to fail the match, but now the match succeeds for even >> values > 0 and then the bits of PP_FR are put in pp_flags. >> Negative values used to pass the match if they were odd, but now >> the match is not attempted for any negative value. It just might >> be useful for PP_FR to have multiple bits set, with the 1 bit used >> for enabling this and the other bits used for setting pp_flags. If >> not, then only values of 0 and 1 for PP_FR make sense, and the >> ifdef should be "#if PP_FR == 1". > > I don't understand your remarks about PP_FR being even/odd. Maybe you > are confused '&&' with '&'? ;-) Oops. > Is the attached patch okay for you, then? This seems to restore the original behaviour. [... Patch lost to attachment.] Bruce