Date: Fri, 22 Jun 2012 23:03:40 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Max Khon <fjoe@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237350 - head/sys/dev/puc Message-ID: <6526CF11-F29B-4BEC-B577-5F5392D17223@xcllnt.net> In-Reply-To: <201206210310.q5L3AmLd084976@svn.freebsd.org> References: <201206210310.q5L3AmLd084976@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6526CF11-F29B-4BEC-B577-5F5392D17223>