From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 25 00:45:24 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB7B5106566B for ; Wed, 25 Mar 2009 00:45:24 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 682668FC13 for ; Wed, 25 Mar 2009 00:45:24 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1777214ywh.13 for ; Tue, 24 Mar 2009 17:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=etJGrE7KTAcRj+k/L3jN20DOTlv1H7Pwrib4vYfYQ+U=; b=sWTJTI2IMr4lS1sSZ9KmZGDJSe90Gerg2Vxiu19lhUdkRakqKRczyAt5Pz5k1QNRQI 0KYCwbQx6dhR8MG/eJ7O1ZeQes2W89V0eXuKZaCB6tlRU2VqlPc3bjDj4qDLMhB/l0V7 dnCYhqhBzKMlhpVUfdDfUFwSh4dKL7lpZ5MKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kl8ivXeMs4IYglRW1STGGZ5UeVRCu/kWgOjJuj765ivaven+HxgOQhCqmokSdu4S0U QSEIQnpYCimBFfSNWwPc41hPkTEWE3lF5ZQSLYaRVHb3lhfDQ92TP/oq7LVGNQEilBC7 P5P8t2iL/bOTwFCs6E2pNnD+AstJCc+BxL+Wk= MIME-Version: 1.0 Received: by 10.142.191.5 with SMTP id o5mr3647897wff.53.1237941923311; Tue, 24 Mar 2009 17:45:23 -0700 (PDT) In-Reply-To: <49C90791.7040807@delphij.net> References: <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> <49710E4F.6020404@delphij.net> <2e566b9e0903232328y45801f76lc6d64acb4fef3dc@mail.gmail.com> <49C90791.7040807@delphij.net> Date: Wed, 25 Mar 2009 08:45:23 +0800 Message-ID: <2e566b9e0903241745p6dc9ba4bq38a555b3896c23fb@mail.gmail.com> From: "Shaowei Wang (wsw)" To: d@delphij.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: A patch of HPTIOP driver for 7.1-RELEASE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2009 00:45:25 -0000 On Wed, Mar 25, 2009 at 12:17 AM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Shaowei Wang (wsw) wrote: > > Hi, delphij > > > > The problem about FreeBSD-7.x-amd64's hptiop driver is solved by > > patching our RAID-manage software (userland utils). > > > > The hptrr driver is a soft RAID so a 32-bit compatibility ioctl > > structure is necessary. The hptiop is a hardware RAID controller, the > > firmware is 32-bit. > > So do we need to patch the driver at our side? My reading is that we > will not need it anymore? Please feel free to let me know if you want > the patch be committed. Since we are going to have 7.2-RELEASE by early > May, it's important to merge stuff back early so they get more through > tests, etc. > Yes, this patch should be committed when we going to have the next FreeBSD release. Thanks! > > I'm not so familiar with FreeBSD's development community. I'm sorry > > Posting the infomation here. > > Never mind, the PR system is just a more convenient way of tracking > issues (i.e. you can check back if a problem has been resolved at a > later time, etc.). I'll try to use the PR system next time and thank you again. > > > On Sat, Jan 17, 2009 at 6:46 AM, Xin LI > > wrote: > > > > Hi, Shaowei, > > > > It seems that I can not apply your patch directly, I have tried to do i= t > > manually, as attached, please let me know if it's Ok. I can commit for > > you against -HEAD if it looks fine and take care for MFC. > > > > Note that, however, I am more or less concerned about the driver if > > 32-bit utility is running on amd64 platform. There seems to have three > > pointer style field in hpt_iop_ioctl_param. I have checked hptrr(4) an= d > > found that it has defined a 32-bit compatibility ioctl structure. > > According to my understanding to hptiop(4), this could be a problem. > > > > PS. For faster handling it is probably a good idea to submit patch > > through our PR system: http://www.freebsd.org/send-pr.html > > > > Shaowei Wang (wsw) wrote: > >> Hi, guys > > > >> hptiop driver in the 7.1 release has a little bug. > >> Because this issue the Raid-manage GUI program which we provided > > can NOT > >> work anymore. > > > >> So we give the patch: > > > >> Index: hptiop.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 > >> --- hptiop.h (revision 186851) > >> +++ hptiop.h (working copy) > >> @@ -260,7 +260,7 @@ > >> unsigned long lpOutBuffer; /* output data buffer */ > >> u_int32_t nOutBufferSize; /* size of output > > data buffer > >> */ > >> unsigned long lpBytesReturned; /* count of HPT_U8s > > returned */ > >> -}; > >> +}__attribute__((packed)); > > > >> #define HPT_IOCTL_FLAG_OPEN 1 > >> #define HPT_CTL_CODE_BSD_TO_IOP(x) ((x)-0xff00) > > > >> =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 > > > >> -wsw > > > > > > > /************************************************************************= / > > > >> '=C2=B6} > > > >> hptiop=E2=80=9Eq=C2=A8(7.1=C3=91LH- * =C3=AF > >> =C3=99* =C3=AF=C3=BC=C3=B4=E2=80=A0 =C3=AC=C3=90=E2=80=BA=E2=80=9E5 = =C2=A1 =C3=A0=C3=95=C3=90L > > > >> =C3=AC=C3=99=C3=BA=E2=80=A0e > > > >> Index: hptiop.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 > >> --- hptiop.h (revision 186851) > >> +++ hptiop.h (working copy) > >> @@ -260,7 +260,7 @@ > >> unsigned long lpOutBuffer; /* output data buffer */ > >> u_int32_t nOutBufferSize; /* size of output > > data buffer > >> */ > >> unsigned long lpBytesReturned; /* count of HPT_U8s > > returned */ > >> -}; > >> +}__attribute__((packed)); > > > >> #define HPT_IOCTL_FLAG_OPEN 1 > >> #define HPT_CTL_CODE_BSD_TO_IOP(x) ((x)-0xff00) > > > >> =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 > > > >> -wsw > > > > > > > > -----------------------------------------------------------------------= - > > > >> _______________________________________________ > >> freebsd-hackers@freebsd.org > > mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >> To unsubscribe, send any mail to > > "freebsd-hackers-unsubscribe@freebsd.org > > " > > > > > > Index: sys/dev/hptiop/hptiop.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 > - --- sys/dev/hptiop/hptiop.h =EF=BC=88=E7=89=88=E6=9C=AC 187338=EF= =BC=89 > +++ sys/dev/hptiop/hptiop.h =EF=BC=88=E5=B7=A5=E4=BD=9C=E5=89=AF=E6= =9C=AC=EF=BC=89 > @@ -260,7 +260,7 @@ > unsigned long lpOutBuffer; /* output data buffer */ > u_int32_t nOutBufferSize; /* size of output > data buffer */ > unsigned long lpBytesReturned; /* count of HPT_U8s > returned */ > - -}; > +} __attribute__((packed)); > > #define HPT_IOCTL_FLAG_OPEN 1 > #define HPT_CTL_CODE_BSD_TO_IOP(x) ((x)-0xff00) > > > > > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.11 (FreeBSD) > > iEYEARECAAYFAknJB5EACgkQi+vbBBjt66CPRwCeLna7weWqMVK8G/MPFcpIR5Xb > z3QAn39CaWIMqTUBmj/EnAc9i09byweF > =3DylVm > -----END PGP SIGNATURE----- >