From owner-freebsd-hackers Thu Jun 15 21:51:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from web1901.mail.yahoo.com (web1901.mail.yahoo.com [128.11.23.50]) by hub.freebsd.org (Postfix) with SMTP id ED8CD37BBF0 for ; Thu, 15 Jun 2000 21:51:14 -0700 (PDT) (envelope-from p_k_nandan@yahoo.com) Received: (qmail 23157 invoked by uid 60001); 16 Jun 2000 04:51:13 -0000 Message-ID: <20000616045113.23156.qmail@web1901.mail.yahoo.com> Received: from [203.197.172.105] by web1901.mail.yahoo.com; Thu, 15 Jun 2000 21:51:13 PDT Date: Thu, 15 Jun 2000 21:51:13 -0700 (PDT) From: "NandaKumar P.K." Subject: Re: IOCTL to the character driver is failing To: Mike Smith , Greg Lehey , freebsd-hackers@freebsd.org Cc: "NandaKumar P.K." , FreeBSD Hackers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, Thanks for that suggestions. I changed my character driver a little bit to take care of the more than 4K IOCTLs. My firmware download needs more than 4K size of IOCTL since i have to download a file of around 1MB. Regards Nandan --- Mike Smith wrote: > > [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< > > > Even that is probably too big. What are you > trying to transfer that's > > so big? > > NB. if you want to move more than 4k, you should > pass a pointer to the > buffer in userspace and use copyin/copyout. > > -- > \\ Give a man a fish, and you feed him for a day. \\ > Mike Smith > \\ Tell him he should learn how to fish himself, \\ > msmith@freebsd.org > \\ and he'll hate you for a lifetime. \\ > msmith@cdrom.com > > __________________________________________________ Do You Yahoo!? Send instant messages with Yahoo! Messenger. http://im.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message