From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 16 22:46:55 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 12D0C10656E4 for ; Fri, 16 Jan 2009 22:46:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7D9348FC0A for ; Fri, 16 Jan 2009 22:46:54 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id ACF4E28448 for ; Sat, 17 Jan 2009 06:46:53 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 3A033EC3905; Sat, 17 Jan 2009 06:46:53 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id iqXB4UiGC2LZ; Sat, 17 Jan 2009 06:46:47 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id A4356EC3885; Sat, 17 Jan 2009 06:46:45 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=vDfqF2lU79xjjGiZm/iHwX1gv9Snin5FbdMWLSCoc3BeaDgUVKUNjaD0sFNdp7iZ4 FKY4EpIaKRCZrInPyu9Hg== Message-ID: <49710E4F.6020404@delphij.net> Date: Fri, 16 Jan 2009 14:46:39 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.19 (X11/20090112) MIME-Version: 1.0 To: "Shaowei Wang (wsw)" References: <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> In-Reply-To: <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------080608000400060203020104" 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 Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 22:46:55 -0000 This is a multi-part message in MIME format. --------------080608000400060203020104 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -----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@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 =1xSB -----END PGP SIGNATURE----- --------------080608000400060203020104 Content-Type: text/plain; name="hptiop.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="hptiop.diff" SW5kZXg6IHN5cy9kZXYvaHB0aW9wL2hwdGlvcC5oCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9k ZXYvaHB0aW9wL2hwdGlvcC5oCe+8iOeJiOacrCAxODczMzjvvIkKKysrIHN5cy9kZXYvaHB0 aW9wL2hwdGlvcC5oCe+8iOW3peS9nOWJr+acrO+8iQpAQCAtMjYwLDcgKzI2MCw3IEBACiAJ dW5zaWduZWQgbG9uZyAgICBscE91dEJ1ZmZlcjsgICAgICAgICAgIC8qIG91dHB1dCBkYXRh IGJ1ZmZlciAqLwogCXVfaW50MzJfdCAgICAgICAgbk91dEJ1ZmZlclNpemU7ICAgICAgICAv KiBzaXplIG9mIG91dHB1dCBkYXRhIGJ1ZmZlciAqLwogCXVuc2lnbmVkIGxvbmcgICAgbHBC eXRlc1JldHVybmVkOyAgICAgICAvKiBjb3VudCBvZiBIUFRfVThzIHJldHVybmVkICovCi19 OworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKIAogI2RlZmluZSBIUFRfSU9DVExfRkxB R19PUEVOIDEKICNkZWZpbmUgSFBUX0NUTF9DT0RFX0JTRF9UT19JT1AoeCkgKCh4KS0weGZm MDApCg== --------------080608000400060203020104--