Re: cdrom problem(s)

BOSZORMENYI Zoltan (zboszor@mol.hu)
Fri, 3 Sep 1999 09:46:40 +0100


Jens Axboe wrote:
> It's not the speed setting you should be after, but
> rather CDROMSETSPINDOWN (and the equivalent GETSPINDOWN).

Thanks, but doesn't hdparm do the same thing?
As I wrote, hdparm -S 0 succeeded but the drive
spinned down after that. :-(

BTW, is is right what the hdparm manpage writes
about the spindown settings?

> > Here came the first problem: we tried several kernel
> > versions and some IDE drives: (a RedHat 6.0 shipped)
> > 2.2.5-15, a 2.2.12, 2.3.15 and 2.3.16 and a 16x Toshiba
> > CD-ROM and a 8x <I do not know which vendor> one.
> >
> > With 2.2.x the capability mask was 0xfff and with 2.3.15
> > it was 0x3ffff, which are definitely wrong.
>
> What do you mean? I assume you just mean the capability
> bits minus the mask.

I should have been written capability "value" not "mask".
My program writes this value it gets from the kernel in hex
and in a human readable way.

The value it wrote was 0xfff on 2.2.x, 0x3ffff on 2.3.15
and 0x1fef on 2.3.16 on the same drive. (The Toshiba one.)

> > And the drives are CD-ROMs, not CD-R, not CD-RW
> > and not DVD, so 2.3.15 is plain wrong in reporting
> > capabilities.
>
> 2.3.15 is not plain wrong in reporting capabilities,
> but many drives are!

You may be right. I did not read ide-cd.c et.al.,
would you please enlighten me which techniques you use
to find out the correct capabilities of a drive
if it misreports them?

> > But with 2.3.16, we have another problem:
> > it does not play audio CDs. Starting CD player
> > applications fail with packet error on a vanilla
> > 2.3.16 and other lines show up in dmesg or on the
> > console:
> >
> > /dev/cdrom: Wrong medium type
> > cdrom: pid X is buggy!
> > cdrom: open failed.
> >
> > After applying the posted cdrom fix, we do not get
> > the packet error but those lines do appear.
>
> The second patch that followed had a correction to
> that error message - it just wasn't very telling what
> exactly was wrong. Basically, fix the cd playing
> application to open the device O_NONBLOCK.

Hmm, the comments in cdrom.h tell that this change
was in 2.1.x, the cd player application in question (cdp)
works in 2.2.x. But I will look at its code deeper.
Thanks for the quick answer.

Best regards,
Zoltan Boszormenyi

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