Skip to contentSkip to conversation

readcd with 2.5 kernels and ide-cd

DISCUSSION Andy Polyakov 2 participants 2 messages May 29, 2003 – May 30, 2003 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 10 lines
Quoted 8 lines

Is there work going on to get readcd working with 2.5 kernels and ide-cd (without ide-scsi)?

strace readcd dev=/dev/dvd f=/dev/null
...
ioctl(4, SNDCTL_TMR_TIMEBASE, 0xbfffedd8) = -1 ENOTTY (Inappropriate ioctl for device)
...
ioctl(3, 0x2285, 0xbfffef9c) = -1 ENOTTY (Inappropriate ioctl for device)

Something _very_ fishy is going on there.

Nothing fishy, nothing at all... It's as simple as driver/block/scsi_ioctl.c doesn't accepts requestes larger than 64KB, while readcd asks for 256KB.

Quoted 1 line

0x2285 is the SG_IO ioctl.

sg_io returns EINVAL (line 163), but driver/block/ioctl.c transforms it to ENOTTY (see last 8 lines).

Quoted 3 lines

First call to it completes, second one returns -ENOTTY. Looks very much like some kernel bug, see the SNDCTL_TMR_TIMEBASE ioctl returning -ENOTTY in-between.

SNDCTL_TMR_TIMEBASE is actually TCGETS, originates in stdio and is not relevant.

Quoted 1 line

I've seen this before (this very bug), but haven't chased it down.

It's not a bug, but implementation deficiency. Cheers. A.

#3 lore raw
Quoted 9 lines · Andy Polyakov
Quoted 9 lines
Quoted 8 lines

Is there work going on to get readcd working with 2.5 kernels and ide-cd (without ide-scsi)?

strace readcd dev=/dev/dvd f=/dev/null
...
ioctl(4, SNDCTL_TMR_TIMEBASE, 0xbfffedd8) = -1 ENOTTY (Inappropriate ioctl for device)
...
ioctl(3, 0x2285, 0xbfffef9c) = -1 ENOTTY (Inappropriate ioctl for device)

Quoted 5 lines
Quoted 1 line

Something _very_ fishy is going on there.

Nothing fishy, nothing at all... It's as simple as driver/block/scsi_ioctl.c doesn't accepts requestes larger than 64KB, while readcd asks for 256KB.

Hmm you are right, well we can increase that without any problems. For bio transfers at least, kmalloc() runs into problems much beyond that. But for larger transfers, they better be aligned.

Quoted 4 lines
Quoted 1 line

0x2285 is the SG_IO ioctl.

sg_io returns EINVAL (line 163), but driver/block/ioctl.c transforms it to ENOTTY (see last 8 lines).

Ah, so that is the bug.

Quoted 6 lines
Quoted 3 lines

First call to it completes, second one returns -ENOTTY. Looks very much like some kernel bug, see the SNDCTL_TMR_TIMEBASE ioctl returning -ENOTTY in-between.

SNDCTL_TMR_TIMEBASE is actually TCGETS, originates in stdio and is not relevant.

Well yes it's resolved incorrectly, the line was the interesting part. The -ENOTTY was the interesting part, but no not relevant.

Signature · 1 line
Jens Axboe