From owner-freebsd-hackers Fri Jun 9 18:10:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id A570337BBB5; Fri, 9 Jun 2000 18:10:20 -0700 (PDT) (envelope-from grog@wantadilla.lemis.com) Received: (from grog@localhost) by wantadilla.lemis.com (8.9.3/8.9.3) id KAA82612; Sat, 10 Jun 2000 10:40:04 +0930 (CST) (envelope-from grog) Date: Sat, 10 Jun 2000 10:40:03 +0930 From: Greg Lehey To: "NandaKumar P.K." Cc: FreeBSD Hackers Subject: Re: IOCTL to the character driver is failing Message-ID: <20000610104003.B81728@wantadilla.lemis.com> References: <20000609072804.27088.qmail@web1903.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000609072804.27088.qmail@web1903.mail.yahoo.com> Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [moved to -hackers; this is an in-depth technical question] On Friday, 9 June 2000 at 0:28:04 -0700, NandaKumar P.K. wrote: > Hi, > > I am in the process of debugging my character driver > interface to the RAID controller card. Lots of my > IOCTLs i sent from the user code works with the driver > but some IOCTLs are not reaching the driver. I found > that one of the IOCTL that failed is having a size of > data as 8096 bytes. Does FreeBSD has got any size > restriction in IOCTL data size ? I know that there is > no problem with Linux and Windows NT. Indeed, you're limited to 4096 bytes. From sys/ioccom.h: #define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */ #define IOCPARM_MAX PAGE_SIZE /* max size of ioctl, mult. of PAGE_SIZE */ From sys/param.h: #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ #define PAGE_SIZE (1<