Problem with my mtd driver

adr mtd at mcmen.demon.co.uk
Sun Sep 1 15:26:42 EDT 2002


I am writing a driver for the Dreamcast's mtd device.

Reads now work fine. But writes fail - without, it seems my code being toched 
at all (I am using the demo char driver in the kernel to test).

cat foo > /dev/mtd/0

Generates....

MTD_open
cannot create /dev/mtd/0: Permission denied

Yet /dev/mtd/0 already exists....

ls -l /dev/mtd
crw-rw-rw-		1 0 	0	90, 0 Jan 1 1970 0
crw-rw-rw-		1 0    0	90, 1 Jan 1 1970 0ro

As you can see, I am using devfs.

Any ideas as to what is up?

I have put a simply printk at the start of my write routine....

static int vmu_flash_write(struct mtd_info *mtd, loff_t from, size_t len,
			   size_t * retlen, const u_char * buf)
{
  printk("Got here\n");


But it never seems to get called....


Adrian




More information about the linux-mtd mailing list