reading file hangs rtems

Philippe Simons loki_666 at
Sun Jul 24 20:38:31 UTC 2005

Ok, iv found the problem with my mmc block driver.
well for now, the driver is read-only (didnt implemented the write fct
so here is my smc_ioctl...

static int
smc_ioctl(dev_t dev, uint32_t req, void *argp)
    switch (req)
        case BLKIO_REQUEST:
            blkdev_request *r = argp;
            switch (r->req)
                case BLKDEV_REQ_READ:
                    return smc_read(r);
                case BLKDEV_REQ_WRITE:
		/* return smc_write(r);*/
		    return -1;
                    errno = EBADRQC;
                    return -1;

            errno = EBADRQC;
            return -1;

well the output of this shows me that after a "read file" the fat layer
seems to try to write something and hangs in a endless loop...
(the output is full of BLKDEV_REQ_WRITE).

So my question is, how to tell the fat layer not to try to write on the
maybe i should change my return value for BLKDEV_REQ_WRITE?



On Thu, 14 Jul 2005 16:15:09 +0200, "Philippe Simons"
<loki_666 at> said:
> Hi ,i've been working now on a MMC block driver for the bp32 bsp, with
> some partial results.
> The driver install correctly (the /dev/smc file appears), and the fat
> initialisation find the FAT12 partition.
> Using the fileio sample, I can browse the MMC tree whithout any
> problems,
> but if i try to output a file with cat or try to read a file with the
> fileio menu...
> the file seems to be read correctly, but just after rtems hangs.
> I've added a simple task which output some dots in a endless loop, and
> after the file is read, this task stop.
> I used the ramdisk block driver as template to build the mmc block
> driver.
> ne1 has a clue on this issue?
> Philippe
> -- 
> - Or how I learned to stop worrying and
>                           love email again

-- - Faster than the air-speed velocity of an
                          unladen european swallow

More information about the users mailing list