From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 24 06:50:08 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 2B2C5106566C for ; Tue, 24 Mar 2009 06:50:08 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id F15BA8FC19 for ; Tue, 24 Mar 2009 06:50:07 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so2221816rvb.43 for ; Mon, 23 Mar 2009 23:50:07 -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=b0KircyRnXHv+f9a1gzBIzV70WmBQVDE6wXmm+IWwxc=; b=c5c2qN9q7Kml4iDjWGw0bw/qy+ho5BS5C2xVCq9J1qaWK+llvcOJ8SG4aEfBG0i2HJ da+WGCtsO/CSn/N4L3WXo3Rdp1ppO+Xen48o/A64DKPRRVAzH4hGBWBXaGSoJo2btVag A1ulWds5Xp9xEVGKtQ+eKVbiDfOyM6oSEu1Tw= 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=XOmsF36o14f21XNZjbvouOiAp08BSTXY8TrOsxo49sJiWaq83QW29ZDerVUMzzPNP4 FGrd3Zu/LfmChjKsgQMkehyo/nY3xdcEIMOR+JSclTOFFY0/PrvAq/PsfL7vFp5r79Xo JD1PIJTww7Zq9fuCKFMozWcfP5emOtTaFr1xM= MIME-Version: 1.0 Received: by 10.142.82.6 with SMTP id f6mr3239992wfb.182.1237876108513; Mon, 23 Mar 2009 23:28:28 -0700 (PDT) In-Reply-To: <49710E4F.6020404@delphij.net> References: <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> <49710E4F.6020404@delphij.net> Date: Tue, 24 Mar 2009 14:28:28 +0800 Message-ID: <2e566b9e0903232328y45801f76lc6d64acb4fef3dc@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: Tue, 24 Mar 2009 06:50:08 -0000 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 i= s necessary. The hptiop is a hardware RAID controller, the firmware is 32-bit= . I'm not so familiar with FreeBSD's development community. I'm sorry Posting the infomation here. On Sat, Jan 17, 2009 at 6:46 AM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, Shaowei, > > It seems that I can not apply your patch directly, I have tried to do it > 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) and > 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 NO= T > > 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 return= ed > */ > > -}; > > +}__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 > > > > > /************************************************************************= / > > > > =E5=A4=A7=E5=AE=B6=E5=A5=BD=EF=BC=9A > > > > hptiop=E7=9A=84=E9=A9=B1=E5=8A=A8=E5=9C=A87.1=E5=8F=91=E8=A1=8C=E7=89= =88=E4=B8=AD=E6=9C=89=E4=B8=AA=E5=B0=8F=E9=94=99=E8=AF=AF=E3=80=82 > > =E8=BF=99=E4=B8=AA=E5=B0=8F=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E4=BA= =86=E6=88=91=E4=BB=AC=E6=8F=90=E4=BE=9B=E7=9A=84=E9=98=B5=E5=88=97=E7=AE=A1= =E7=90=86=E7=A8=8B=E5=BA=8F=E6=97=A0=E6=B3=95=E8=BF=90=E8=A1=8C=E3=80=82 > > > > =E6=88=91=E4=BB=AC=E7=BB=99=E5=87=BA=E4=BA=86=E8=A1=A5=E4=B8=81=EF=BC= =9A > > > > 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 return= ed > */ > > -}; > > +}__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" > > > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.10 (FreeBSD) > > iEYEARECAAYFAklxDk4ACgkQi+vbBBjt66CvUQCfaAnk0XQTh3Wrn2O4Dy0pEUFW > oqsAoIvlTSNGRDg71SNyGfZ5VjDh9Z93 > =3D1xSB > -----END PGP SIGNATURE----- > > 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 return= ed > */ > -}; > +} __attribute__((packed)); > > #define HPT_IOCTL_FLAG_OPEN 1 > #define HPT_CTL_CODE_BSD_TO_IOP(x) ((x)-0xff00) > >