From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f7a963d07c55f607 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-08-26 15:40:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.he.net!chekhov.conxion.net!news.oracle.com!not-for-mail Message-ID: <3D6AAEBE.2010105@attbi.com> From: Vipin Gokhale User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: mmap API never make it to my driver on Tru64 5.1A References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 26 Aug 2002 15:42:06 -0700 NNTP-Posting-Host: 141.144.1.214 X-Trace: news.oracle.com 1030401815 141.144.1.214 (Mon, 26 Aug 2002 15:43:35 PDT) NNTP-Posting-Date: Mon, 26 Aug 2002 15:43:35 PDT Xref: archiver1.google.com comp.unix.tru64:8495 Ron Jolly wrote: > Hello all, > > Back on July 19,2002 another poster, Bob Irwin posted a message about > having difficulty getting a call to mmap() to get down to his xx_mmap( > call in his driver. Bob's original message: > > ////////////////////////////////////////////////////// > Running tru64 on a compaq alpha. (tru64 V5.1A Rev 1885). I've written > a device driver for a pci card that seems to identify and configure > OK. printfs in the configure code shows correct PCI id and unique > values in the PCI memory via BAR0. A test program shows that xxopen, > xxioctl, xxclose functions are being entered. However mmap() call > fails with error 22 (EINVAL). The xxmmap function in the driver is not > entered. It appears that the mmap() never makes it to the kernel. > ///////////////////////////////////////////////////// > > > I too am having the exact same problem on the same OS (V5.1A Rev 1885) > running > on an Alpha DS20. All of the other functions, xx_open, > xx_ioctl,xx_close functions are being entered. > My xx_mmap() function in the driver is never getting called. > > As an experiment, I replaced all of the unused > function calls in the DSENT structure that would normally be sent to > nodev() to a dummy function I created called xx_dummy(). > Low and behold, when I called the mmap() api from an > application, I got a printout that my xx_dummy routine was entered. > I then replaced the xx_dummy() func with seperate dummy funcs. The > function > that is actually getting called is the one directly after the xx_mmap > call > which is the one that is defined d_segmap. I would suspect calling the > d_segmap > function instead of the d_mmap function will not produce the desired > results. > I suspect this has to do with DDI/DKI specs. If driver has segmap entry point, mmap will always call it. Segmap is supposed to be able to figure out what to do based on the arguments it is passed. > Any one at HP/Compaq/DEC have any insights on this??? > > > thanks > Ron Jolly > Software Driver Development > VMIC > ron.jolly@gefanuc.com > 256-382-8285 Tel >