linux-mips
[Top] [All Lists]

Ioctl size mask

To: <linux-mips@oss.sgi.com>
Subject: Ioctl size mask
From: Shay Deloya <shay@jungo.com>
Date: Mon, 16 Apr 2001 13:44:42 +0300
Organization: Jungo Corp.
Reply-to: shay@jungo.com
Sender: owner-linux-mips@oss.sgi.com
Hi all,

On asm-mips/ioctl.h , there is a mask on the size transfered to the ioctl , 
e.g. : when implementing an ioctl that handles IO , the max size the 
supported in mips is 0xff  as defined in the code below: 


#define _IOWR(type,nr,size)                     
        _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))                     
     


and _IOC uses size in this way:

(((size) & _IOC_SLMASK) << _IOC_SIZESHIFT))           // (_IOC_SLMMASK = 0xff)


The limited size causes problems on drivers that use size mask to their 
needs, while officialy the allowed limit is 2^13 ( 8kB) by definition .

Does anyone know the reason for this masking and limit  ? 

Thanks,
Shay Deloya
______________________________________
Software Developer
Jungo - R&D
email: shayd@jungo.com
web: http://www.jungo.com
Phone: 1-877-514-0537(USA)  +972-9-8859365(Worldwide) ext. 221
Fax:   1-877-514-0538(USA)  +972-9-8859366(Worldwide)

<Prev in Thread] Current Thread [Next in Thread>