From owner-svn-src-all@FreeBSD.ORG Sat Jun 23 06:03:52 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A65B106566C; Sat, 23 Jun 2012 06:03:52 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 4545F8FC16; Sat, 23 Jun 2012 06:03:52 +0000 (UTC) Received: from [192.168.2.58] (wifi.xcllnt.net [70.36.220.6] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q5N63e9M061390 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 22 Jun 2012 23:03:51 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201206210310.q5L3AmLd084976@svn.freebsd.org> Date: Fri, 22 Jun 2012 23:03:40 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6526CF11-F29B-4BEC-B577-5F5392D17223@xcllnt.net> References: <201206210310.q5L3AmLd084976@svn.freebsd.org> To: Max Khon X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237350 - head/sys/dev/puc 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: Sat, 23 Jun 2012 06:03:52 -0000 On Jun 20, 2012, at 8:10 PM, Max Khon wrote: >=20 > Modified: head/sys/dev/puc/puc_cfg.h > = =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=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/puc/puc_cfg.h Thu Jun 21 02:48:49 2012 = (r237349) > +++ head/sys/dev/puc/puc_cfg.h Thu Jun 21 03:10:48 2012 = (r237350) > @@ -79,7 +79,7 @@ struct puc_cfg { > int8_t ports; > int8_t rid; /* Rid of first port */ > int8_t d_rid; /* Delta rid of next ports */ > - int8_t d_ofs; /* Delta offset of next ports */ > + int16_t d_ofs; /* Delta offset of next ports */ > puc_config_f *config_function; > }; The purpose of the uint8_t is to minimize wastage. For the uncommon cases there's the config_function. Given that uint8_t has been adequate for a very long time, I think it's fair to say that the MOXA devices have an uncommon configuration and that you shouldn't pessimize the common case by extending the type of d_ofs and as a side-effect add padding before it *and* after it -- the structure was optimal for both ILP32 and LP64. Please revert the above change and handle the uncommonly large offset by extending the existing moxa configuration file. It's the precedence that should have been followed anyway. Thanks, --=20 Marcel Moolenaar marcel@xcllnt.net