Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2000 10:40:03 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "NandaKumar P.K." <p_k_nandan@yahoo.com>
Cc:        FreeBSD Hackers <hackers@freebsd.org>
Subject:   Re: IOCTL to the character driver is failing
Message-ID:  <20000610104003.B81728@wantadilla.lemis.com>
In-Reply-To: <20000609072804.27088.qmail@web1903.mail.yahoo.com>
References:  <20000609072804.27088.qmail@web1903.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[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<<PAGE_SHIFT)	/* bytes/page */

Even that is probably too big.  What are you trying to transfer that's
so big?

Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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