2002-03-13 04:12:43

by Tim McDaniel

[permalink] [raw]
Subject: 2.4.1 Block Driver and mmap


I'm porting a working 2.2 driver to 2.4 . Unfortunately, the mmap
entry point is not defined in the block_device_operations. I've tried
forcing filp->f_op to an initialized file operations structure while
also registering the driver with block operations (as does the ramdisk
driver). My mmap routine is entered and appears to work, but now the
rest of the driver is experiencing strange failures such as:

1) errno 25 (decimal) on an ioctl that used to work even in 2.4
2) fsck fails with a short read error

Without the change for filep->f_op, the mmap fails with errno 19
decimal.

My driver sits between the file system and the low level block driver
and funnels ata commands in a manner that is more fair and thus more
appropriate for a PVR implementation.

Any help would be greatly appreciated.

Thanks,
Tim


2002-03-13 15:59:27

by Tommy Reynolds

[permalink] [raw]
Subject: Re: 2.4.1 Block Driver and mmap

Uttered "Tim McDaniel" <[email protected]>, spoke thus:

> I'm porting a working 2.2 driver to 2.4 . Unfortunately, the mmap
> entry point is not defined in the block_device_operations.

You can't just frob around with this. 2.2 is not 2.4, so first check this:

http://www.xml.com/ldd/chapter/book/index.html

for Rubini and Corbets Linux Device Drivers, 2nd Ed. Buy a copy.