[2.4.18/2.4.19 IDE] cannot read(2) from IDE-DVD-ROM drive

From: Joerg Wendland (jorgland@sol.wh-hms.uni-ulm.de)
Date: Mon Jun 17 2002 - 19:07:54 EST


Hi folks,
I have a MATSHITADVD-ROM SR-8176 (as reported in /proc) on a i830 chipset
integrated IDE controller running with PIIX4 drivers in a 2.4.18 or
2.4.19-pre10 kernel. Everything works fine except read()ing and e.g.
llseek()ing on that drive when a DVD-ROM is inserted. CD-ROM make now
problems but DVD-ROMs (_not_ video DVDs with that RPC crap but data DVDs).
I can mount them and use them but I simply cannot use basic file operations.
I verified the following:

sam:~# mount /dev/hdc -t iso9660 /cdrom/
mount: block device /dev/hdc is write-protected, mounting read-only
sam:~# ls /cdrom/
audio_ts desktop dvd gamestarter.exe patches start.exe
autorun.inf directx extras leser programme treiber
demos dlh gamestar mods screens video_ts
sam:~# umount /cdrom/
sam:~# dd if=/dev/hdc of=/tmp/test
0+0 records in
0+0 records out
sam:~# cat /dev/hdc
# test.c is quoted at the end of that mail
sam:~# ./test /dev/hdc
read 0 bytes

All that works with CD-ROMs in that drive and google had nothing to say
about that phenomenon.
Any objections?

Thanks in advance,
  Joerg

PS: please CC me as I am currently not subscribed to lkml.

test.c as used for the test above:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#define __USE_LARGEFILE64
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

int main(int argc, char **argv)
{
        int fd, c;
        char buf[4096];

        if(argc < 2)
                exit(1);

        if((fd = open(argv[1], O_RDONLY|O_LARGEFILE)) == -1) {
                printf("open failed: %s\n", strerror(errno));
                exit(1);
        }

        if((c = read(fd, buf, 4096)) == -1) {
                printf("read failed: %s\n", strerror(errno));
                close(fd);
                exit(1);
        }

        printf("read %d bytes\n", c);
        close(fd);

        return 0;
}

-- 
Joerg "joergland" Wendland
GPG: 51CF8417 FP: 79C0 7671 AFC7 315E 657A  F318 57A3 7FBD 51CF 8417


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:15 EST