Skip to contentSkip to conversation

Problem with my mtd driver

DISCUSSION adr 1 participant 1 message Sep 1, 2002 Memory technology devices (MTD)

lore
Share & tools
lore

adr

author
#0 lore raw

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