Hi,

I was trying to gather large info from my driver  thru I_STR ioctl. But it 
seems it is failing in some cases with large bufs like 12K, stack shown below. 
Please correct me If I need to do anything more in user app or driver:
User App::::::::::
#define BUF_SIZE2 12*1024
char buf2[BUF_SIZE];
       fd = open(string, O_RDWR));
        stri.ic_cmd = 3;
        stri.ic_timout = 0;
        bzero(buf2, BUF_SIZE2);
        stri.ic_len = BUF_SIZE2;
        stri.ic_dp = (char *)buf2;
        if (ioctl(fd, I_STR, &stri) 


Driver IOCTL :::::::::::::::::::

iocp = (struct iocblk *)(uintptr_t)mp->b_rptr;
cmd = iocp->ioc_cmd;


If (cmd == MINE) {
                ptr = (void *) mp->b_cont->b_rptr;
                (void) bcopy(driver->ptr, ptr, 12*1024);
mp->b_cont->b_wptr = mp->b_cont->b_rptr + 12*1024;
                miocack(q, mp, 12*1024, 0);
                return;
}


Stack:
strdoioctl+0x7a7()
strioctl+0x15cc()
spec_ioctl+0x67()
fop_ioctl+0x25()
ioctl+0xac()
sys_syscall+0x17b()

Regards
Raghu
-- 
This message posted from opensolaris.org
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to