A patch of HPTIOP driver for 7.1-RELEASE
Xin LI
delphij at delphij.net
Fri Jan 16 14:46:55 PST 2009
-----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 NOT
> work anymore.
>
> So we give the patch:
>
> Index: hptiop.h
> ===================================================================
> --- 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)
>
> ====================================================================
>
> -wsw
>
> /************************************************************************/
>
> 大家好:
>
> hptiop的驱动在7.1发行版中有个小错误。
> 这个小错误导致了我们提供的阵列管理程序无法运行。
>
> 我们给出了补丁:
>
> Index: hptiop.h
> ===================================================================
> --- 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)
>
> ====================================================================
>
> -wsw
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
- --
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)
iEYEARECAAYFAklxDk4ACgkQi+vbBBjt66CvUQCfaAnk0XQTh3Wrn2O4Dy0pEUFW
oqsAoIvlTSNGRDg71SNyGfZ5VjDh9Z93
=1xSB
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: sys/dev/hptiop/hptiop.h
===================================================================
--- sys/dev/hptiop/hptiop.h (版本 187338)
+++ sys/dev/hptiop/hptiop.h (工作副本)
@@ -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)
More information about the freebsd-hackers
mailing list