Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 14:28:28 +0800
From:      "Shaowei Wang (wsw)" <wsw1wsw2@gmail.com>
To:        d@delphij.net
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: A patch of HPTIOP driver for 7.1-RELEASE
Message-ID:  <2e566b9e0903232328y45801f76lc6d64acb4fef3dc@mail.gmail.com>
In-Reply-To: <49710E4F.6020404@delphij.net>
References:  <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> <49710E4F.6020404@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <delphij@delphij.net> 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 <delphij@delphij.net>    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)
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2e566b9e0903232328y45801f76lc6d64acb4fef3dc>