2001-02-03 22:10:08

by patrick.mourlhon

[permalink] [raw]
Subject: ATAPI CDRW which doesn't work

Hi,

I've never could make this CDRW ATAPI to work, if someone could
provide me any clue about the baby. I just said that people on the
kernel mailing list may care of its but. It looks like the baby didn't
even noticed. ;-)

kernel is 2.4.1, but never worked even before this release.
Never maintained speed.

Thanks in advance for any reply,

Patrick Mourlhon


----mount atapi cd writer outpu

Line:/mnt/home/pmo# mount /dev/hdb /cdrom
/dev/hdb: Input/output error
mount: block device /dev/hdb is write-protected, mounting read-only
/dev/hdb: Input/output error

mount: you must specify the filesystem type
Line:/mnt/home/pmo#


----/var/log/messages from start to the end of the previous mount command

Feb 3 22:08:25 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 3 22:08:25 Line kernel: hdb: DMA disabled
Feb 3 22:08:55 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:08:55 Line kernel: hda: DMA disabled
Feb 3 22:08:55 Line kernel: ide0: reset: success
Feb 3 22:09:06 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:09:36 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:09:36 Line kernel: ide0: reset: success
Feb 3 22:09:47 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:09:47 Line kernel: end_request: I/O error, dev 03:40 (hdb), sector 2
Feb 3 22:09:48 Line kernel: hdb: status timeout: status=0x90 { Busy }
Feb 3 22:09:48 Line kernel: hdb: drive not ready for command
Feb 3 22:10:11 Line kernel: hdb: ATAPI reset complete
Feb 3 22:10:21 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 3 22:10:51 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:10:51 Line kernel: ide0: reset: success
Feb 3 22:11:02 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:11:32 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:11:32 Line kernel: ide0: reset: success
Feb 3 22:11:42 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:11:42 Line kernel: end_request: I/O error, dev 03:40 (hdb), sector 2
Feb 3 22:11:43 Line kernel: hdb: status timeout: status=0x90 { Busy }
Feb 3 22:11:43 Line kernel: hdb: drive not ready for command
Feb 3 22:12:06 Line kernel: hdb: ATAPI reset complete
Feb 3 22:12:16 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 3 22:12:46 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:12:46 Line kernel: ide0: reset: success
Feb 3 22:12:57 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:13:27 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:13:27 Line kernel: ide0: reset: success
Feb 3 22:13:37 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:13:37 Line kernel: end_request: I/O error, dev 03:40 (hdb), sector 0
Feb 3 22:13:37 Line kernel: FAT bread failed
Feb 3 22:13:38 Line kernel: hdb: status timeout: status=0x90 { Busy }
Feb 3 22:13:38 Line kernel: hdb: drive not ready for command
Feb 3 22:14:02 Line kernel: hdb: ATAPI reset complete
Feb 3 22:14:12 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 3 22:14:42 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:14:42 Line kernel: ide0: reset: success
Feb 3 22:14:53 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:15:23 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:15:23 Line kernel: ide0: reset: success
Feb 3 22:15:33 Line kernel: hdb: irq timeout: status=0x90 { Busy }
Feb 3 22:15:33 Line kernel: end_request: I/O error, dev 03:40 (hdb), sector 0
Feb 3 22:15:33 Line kernel: FAT bread failed
Feb 3 22:15:35 Line kernel: hdb: status timeout: status=0x90 { Busy }
Feb 3 22:15:35 Line kernel: hdb: drive not ready for command
Feb 3 22:16:09 Line kernel: hdb: ATAPI reset timed-out, status=0x90
Feb 3 22:16:09 Line kernel: ide0: reset: success
Feb 3 22:16:12 Line kernel: hdb: packet command error: status=0x51 { DriveReady SeekComplete Error }
Feb 3 22:16:12 Line kernel: hdb: packet command error: error=0xb0
Feb 3 22:16:13 Line kernel: ATAPI device hdb:
Feb 3 22:16:13 Line kernel: Error: Aborted command -- (Sense key=0x0b)
Feb 3 22:16:13 Line kernel: (reserved error code) -- (asc=0x00, ascq=0x00)
Feb 3 22:16:13 Line kernel: The failed "Prevent/Allow Medium Removal" packet command was:
Feb 3 22:16:13 Line kernel: "1e 00 00 00 00 00 00 00 00 00 00 00 "


----cat /proc/interrupts

CPU0
0: 147746 XT-PIC timer
1: 2 XT-PIC keyboard
2: 0 XT-PIC cascade
4: 0 XT-PIC serial
10: 0 XT-PIC usb-uhci
12: 3622 XT-PIC PCnet/PCI II 79C970A
14: 11727 XT-PIC ide0
15: 127 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0


----cat /proc/ioports

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial(set)
0376-0376 : ide1
0378-037a : parport0
037b-037f : parport0
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(set)
0cf8-0cff : PCI conf1
5000-50ff : VIA Technologies, Inc. VT82C586B ACPI
d000-dfff : PCI Bus #01
d000-d0ff : ATI Technologies Inc Rage XL AGP
e000-e00f : VIA Technologies, Inc. Bus Master IDE
e000-e007 : ide0
e008-e00f : ide1
e400-e41f : VIA Technologies, Inc. UHCI USB
e400-e41f : usb-uhci
e800-e8ff : Tseng Labs Inc ET6000
ec00-ec1f : Advanced Micro Devices [AMD] 79c970 [PCnet LANCE]
ec00-ec1f : PCnet/PCI II 79C970A


----/proc/ide/ide0/hdb

Line:/proc/ide/ide0/hdb# cat media
cdrom

Line:/proc/ide/ide0/hdb# cat model
R/RW 4x4x24

Line:/proc/ide/ide0/hdb# cat driver
ide-cdrom version 4.59

Line:/proc/ide/ide0/hdb# cat settings
name value min max mode
---- ----- --- --- ----
breada_readahead 4 0 127 rw
current_speed 34 0 69 rw
dsc_overlap 1 0 1 rw
file_readahead 0 0 2097151 rw
ide_scsi 0 0 1 rw
init_speed 12 0 69 rw
io_32bit 0 0 3 rw
keepsettings 0 0 1 rw
max_kb_per_request 128 1 127 rw
nice1 1 0 1 rw
number 1 0 3 rw
pio_mode write-only 0 255 w
slow 0 0 1 rw
unmaskirq 0 0 1 rw
using_dma 0 0 1 rw

Line:/proc/ide/ide0/hdb# cat identify
85c0 0000 0000 0000 0000 0000 0000 0000
0000 0000 3456 4f30 3934 3544 4530 3530
3232 2020 0000 0000 0000 1000 0000 2031
2e30 3400 0000 522f 5257 2034 7834 7832
3420 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 0000
0000 0b00 0000 0200 0200 0002 0000 0000
0000 0000 0000 0000 0000 0000 0007 0407
0003 0078 0078 0078 0078 0000 0000 0000
0000 0004 0009 0000 0000 0000 0000 0000
...


2001-02-04 00:56:42

by Marko Kreen

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

On Sat, Feb 03, 2001 at 11:05:44PM +0100, [email protected] wrote:
> Hi,
>
> I've never could make this CDRW ATAPI to work, if someone could
> provide me any clue about the baby. I just said that people on the
> kernel mailing list may care of its but. It looks like the baby didn't
> even noticed. ;-)

Compile in options 'SCSI generic', 'SCSI cdrom and 'SCSI
emulation support' then add 'hdb=scsi' to kernel parameters.

Now you can use it as SCSI cdrom, and cd-writers recognize it
too. Eg. for cdrecord you should probably put 'dev=0,0,0' to
command line (I assume you have no other SCSI controller).


--
marko

2001-02-04 06:42:16

by patrick.mourlhon

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

Be happy, it was not that simple. ;-)

On Sat, 03 Feb 2001, Bob_Tracy wrote:

> [email protected] wrote:
> > ----mount atapi cd writer outpu
> >
> > Line:/mnt/home/pmo# mount /dev/hdb /cdrom
> > /dev/hdb: Input/output error
> > mount: block device /dev/hdb is write-protected, mounting read-only
> > /dev/hdb: Input/output error
> >
> > mount: you must specify the filesystem type
> > Line:/mnt/home/pmo#
>
> I'd hate to think your problem is *really* this simple, but if you
> really typed what is quoted above, and the CD you have in the drive
> really has something valid on it, try the following instead:
>
> mount -t iso9660 /dev/hdb /cdrom -r
>
> You have to specify the filesystem type, as well as specify the
> "readonly" flag. Although there are other filesystem types that
> can be found on CDROMs, it's unlikely in your case.
>
> --Bob Tracy
> [email protected]

2001-02-04 06:42:06

by patrick.mourlhon

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work


You were my best hope, cause i did something similar for
a Hp 720c on parallel port, and it worked. I did excatly
what you've just said.
But the whole thing still doesn't work properly.

I finally could mount the device, then read the first root directory.
But couldn't get more... always got what you see at the end of the
error message.. I/O error, which resulted in no files appearing from
a 'ls' command.

I've got those kind of message now :

Feb 4 07:18:35 Line kernel: scsi : aborting command due to timeout : pid 0, scsi0, channel 0, id 0, lun 0 Read (10) 00 00 00 00 2e 00 00 01 00
Feb 4 07:18:35 Line kernel: SCSI host 0 abort (pid 0) timed out - resetting
Feb 4 07:18:35 Line kernel: SCSI bus is being reset for host 0 channel 0.
Feb 4 07:18:35 Line kernel: hdb: ATAPI reset complete
Feb 4 07:18:35 Line kernel: scsi : aborting command due to timeout : pid 0, scsi0, channel 0, id 0, lun 0 Read (10) 00 00 00 00 2e 00 00 01 00
Feb 4 07:18:35 Line kernel: SCSI host 0 abort (pid 0) timed out - resetting
Feb 4 07:18:35 Line kernel: SCSI bus is being reset for host 0 channel 0.
Feb 4 07:18:37 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 4 07:18:41 Line kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: Request Sense 00 00 00 40 00
Feb 4 07:18:41 Line kernel: Info fld=0x0, Current sd0b:00: sense key Medium Error
Feb 4 07:18:41 Line kernel: I/O error: dev 0b:00, sector 184
Feb 4 07:20:09 Line kernel: scsi : aborting command due to timeout : pid 0, scsi0, channel 0, id 0, lun 0 Read (10) 00 00 00 00 2e 00 00 01 00
Feb 4 07:20:09 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 4 07:20:09 Line kernel: hdb: ATAPI reset complete
Feb 4 07:20:09 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 4 07:20:09 Line kernel: hdb: ATAPI reset complete
Feb 4 07:20:10 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
Feb 4 07:20:10 Line kernel: scsi0 channel 0 : resetting for second half of retries.
Feb 4 07:20:10 Line kernel: SCSI bus is being reset for host 0 channel 0.
Feb 4 07:20:10 Line kernel: hdb: status timeout: status=0xd0 { Busy }
Feb 4 07:20:10 Line kernel: hdb: drive not ready for command
Feb 4 07:20:21 Line kernel: hdb: ATAPI reset complete
Feb 4 07:20:22 Line kernel: Device 0b:00 not ready.
Feb 4 07:20:22 Line kernel: I/O error: dev 0b:00, sector 184


On Sun, 04 Feb 2001, Marko Kreen wrote:

> On Sat, Feb 03, 2001 at 11:05:44PM +0100, [email protected] wrote:
> > Hi,
> >
> > I've never could make this CDRW ATAPI to work, if someone could
> > provide me any clue about the baby. I just said that people on the
> > kernel mailing list may care of its but. It looks like the baby didn't
> > even noticed. ;-)
>
> Compile in options 'SCSI generic', 'SCSI cdrom and 'SCSI
> emulation support' then add 'hdb=scsi' to kernel parameters.
>
> Now you can use it as SCSI cdrom, and cd-writers recognize it
> too. Eg. for cdrecord you should probably put 'dev=0,0,0' to
> command line (I assume you have no other SCSI controller).
>
>
> --
> marko

2001-02-04 10:16:36

by Joachim 'roh' Steiger

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

On Sun, 4 Feb 2001, Marko Kreen wrote:

> On Sat, Feb 03, 2001 at 11:05:44PM +0100, [email protected] wrote:
> Compile in options 'SCSI generic', 'SCSI cdrom and 'SCSI
> emulation support' then add 'hdb=scsi' to kernel parameters.
is there someone working on direct support for Atapi-cdrw this time?
i would like to use a clean solution and am ready to help testing such
stuff (if existing) with my yamaha atapi-cdrw connected to an asus a7v

regards

roh

2001-02-04 10:33:53

by Friedrich Lindenberg

[permalink] [raw]
Subject: AW: ATAPI CDRW which doesn't work -> devfs problems


Hi
I was trying to burn cds under linux-2.4.1 with
devFS enabled. But x-cd-roast (and also cdrecord)
do not find any scsi drives. I guess they have been
renamed or something like that, I cannot find them
in /dev, nor anywhere in /dev/scsi ...
Oh, and could anybody tell me, how I stop RH7
creating /dev/lp* every time I boot ? I don't
use devices attached to lp* ....

thanks & greetings,
Friedrich


2001-02-04 11:51:02

by Friedrich Lindenberg

[permalink] [raw]
Subject: AW: ATAPI CDRW which doesn't work -> devfs problems part2



-----Urspr?ngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]]Im Auftrag von Friedrich
Lindenberg
Gesendet: Sonntag, 4. Februar 2001 11:36
An: [email protected]
Betreff: AW: ATAPI CDRW which doesn't work -> devfs problems



Hi
I was trying to burn cds under linux-2.4.1 with
devFS enabled. But x-cd-roast (and also cdrecord)
do not find any scsi drives.
I AM USING hdd=ide-scsi && hdc=ide-scsi !!!

I guess they have been
renamed or something like that, I cannot find them
in /dev, nor anywhere in /dev/scsi ...
Oh, and could anybody tell me, how I stop RH7
creating /dev/lp* every time I boot ? I don't
use devices attached to lp* ....

thanks & greetings,
Friedrich


2001-02-04 15:05:38

by Marko Kreen

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

On Sun, Feb 04, 2001 at 11:16:16AM +0100, Joachim 'roh' Steiger wrote:
> On Sun, 4 Feb 2001, Marko Kreen wrote:
> > Compile in options 'SCSI generic', 'SCSI cdrom and 'SCSI
> > emulation support' then add 'hdb=scsi' to kernel parameters.
> is there someone working on direct support for Atapi-cdrw this time?
> i would like to use a clean solution and am ready to help testing such
> stuff (if existing) with my yamaha atapi-cdrw connected to an asus a7v

I guess the kernel does not care, the problem is the user-space
utilities want to spek SCSI. You could contact the developers
of cdwriter or cdrecord I guess.

--
marko

2001-02-04 17:02:55

by patrick.mourlhon

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

> > I've got those kind of message now :
> >
> > Feb 4 07:18:35 Line kernel: scsi : aborting command due to timeout : pid 0, scsi0, channel 0, id 0, lun 0 Read (10) 00 00 00 00 2e 00 00 01 00
>
> If this is a correct ISO9660 cd you should not see those
> messages. It is either hardware problem (eg IDE cable is badly
> conencted or CDRW is broken/dusty) or this CD is simply
> scratched. Does it work with another CD?
>
> Also try to put it on separate IDE channel than your main HD.

Cable looks ok, removed and reinstalled, used it before with
a second hard disk. CDRW may be broken. don't know, but at
least nothing appear broken all around the device.
CD was read with an other CDROM reader.
Never seen CDRW working reliably till now. But never used it
through Windows, don't have it since 4 years. I might at least
check if it could work on Windows.

Whatever thanks a lot for your time, was greatly appreciated,

patrick

2001-02-04 20:35:17

by Douglas Gilbert

[permalink] [raw]
Subject: Re: AW: ATAPI CDRW which doesn't work -> devfs problems

Friedrich Lindenberg wrote:
> I was trying to burn cds under linux-2.4.1 with
> devFS enabled. But x-cd-roast (and also cdrecord)
> do not find any scsi drives. I guess they have been
> renamed or something like that, I cannot find them
> in /dev, nor anywhere in /dev/scsi ...

xcdroast expects to find a whole swag of sg device
filenames (/dev/sg[0-16], /dev/sg[a-q]) and scsi
cdrom names (/dev/sr[0-15]) when it starts. The
xcdroast tarball comes with a MAKEDEVICES.sh script to
create them. If they are not all there it seems to
get upset.

This is not very devfs friendly since its policy
is only to show /dev entries for devices that you
actually have connected and that a driver is
controlling.

So the hack solution is to edit out of MAKEDEVICES.sh
those file names that you actually have then execute
it. IMO this is not a devfs problem, xcdroast needs an
improved device scanning algorithm.

BTW the /dev/sga,b,c style of sg device names are
deprecated in favour of the numeric style.

Doug Gilbert

2001-02-05 01:10:13

by Jens Axboe

[permalink] [raw]
Subject: Re: ATAPI CDRW which doesn't work

On Sat, Feb 03 2001, [email protected] wrote:
> Feb 3 22:08:25 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
> Feb 3 22:08:25 Line kernel: hdb: DMA disabled
> Feb 3 22:08:55 Line kernel: hdb: ATAPI reset timed-out, status=0x90
> Feb 3 22:08:55 Line kernel: hda: DMA disabled

Try disabling DMA on the drive before accessing it.

--
Jens Axboe

2001-02-05 03:34:46

by Rogerio Brito

[permalink] [raw]
Subject: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Feb 05 2001, Jens Axboe wrote:
> On Sat, Feb 03 2001, [email protected] wrote:
> > Feb 3 22:08:25 Line kernel: hdb: irq timeout: status=0xd0 { Busy }
> > Feb 3 22:08:25 Line kernel: hdb: DMA disabled
> > Feb 3 22:08:55 Line kernel: hdb: ATAPI reset timed-out, status=0x90
> > Feb 3 22:08:55 Line kernel: hda: DMA disabled
>
> Try disabling DMA on the drive before accessing it.

Well, this has nothing to do with the above, but is there any
utility or /proc entry that lets me say to my CD drive that it
should not work at full speed?

Basically, some drives make way too much noise when they're
operating at full speed. When I'd like to listen to some MP3s
from a burned CD-R, what I'm currently doing is copying the
files that I want to /tmp and listening from there, but this
is obviously a dirty solution. :-(


Thanks in advance for any hints, Roger...

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rogerio Brito - [email protected] - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

2001-02-05 13:41:11

by Ingo Oeser

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Mon, Feb 05, 2001 at 01:34:24AM -0200, Rogerio Brito wrote:
> Well, this has nothing to do with the above, but is there any
> utility or /proc entry that lets me say to my CD drive that it
> should not work at full speed?

/proc/ide/hdX/settings ? The (current,init)_speed settings there?

Give it a try at least ;-)

Regards

Ingo Oeser
--
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< come and join the fun >>>>>>>>>>>>

2001-02-05 13:48:32

by Jens Axboe

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Mon, Feb 05 2001, Rogerio Brito wrote:
> Well, this has nothing to do with the above, but is there any
> utility or /proc entry that lets me say to my CD drive that it
> should not work at full speed?
>
> Basically, some drives make way too much noise when they're
> operating at full speed. When I'd like to listen to some MP3s
> from a burned CD-R, what I'm currently doing is copying the
> files that I want to /tmp and listening from there, but this
> is obviously a dirty solution. :-(

ioctl(cd_fd, CDROM_SELECT_SPEED, speed);

--
Jens Axboe

2001-02-05 15:30:55

by Guest section DW

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)


> On Mon, Feb 05, 2001 at 01:34:24AM -0200, Rogerio Brito wrote:
> > Well, this has nothing to do with the above, but is there any
> > utility or /proc entry that lets me say to my CD drive that it
> > should not work at full speed?

I missed the original post, but there is a mount flag "-o speed="
for precisely this purpose.

2001-02-05 15:40:07

by Jens Axboe

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Mon, Feb 05 2001, Guest section DW wrote:
> I missed the original post, but there is a mount flag "-o speed="
> for precisely this purpose.

Hah, this I did not know. Checking the util-linux source, it might
be a really good idea to not about if setting the speed fails.
This will happen quite often on cd-r/w or dvd drives.

--
Jens Axboe

2001-02-05 17:30:59

by Andre Hedrick

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Mon, 5 Feb 2001, Ingo Oeser wrote:

> On Mon, Feb 05, 2001 at 01:34:24AM -0200, Rogerio Brito wrote:
> > Well, this has nothing to do with the above, but is there any
> > utility or /proc entry that lets me say to my CD drive that it
> > should not work at full speed?
>
> /proc/ide/hdX/settings ? The (current,init)_speed settings there?
>
> Give it a try at least ;-)

That is the ATA transfer rate between the device and the host only.

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com

2001-02-06 00:01:41

by Rogerio Brito

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Feb 05 2001, Jens Axboe wrote:
> ioctl(cd_fd, CDROM_SELECT_SPEED, speed);

I'd like to thank everybody that replied either on the list
and privately. I didn't know that I could just use the /proc
entries to change the IDE driver speed with a simple:

echo current_speed:4 > /proc/ide/hdc/settings

(Thanks Mark for this).

I'd also like to thank Andries about the tip on the mount
option. I didn't find anything in the util-linux (mount)
manpage before I asked (I'm using Debian potato's util-linux
2.10q-1).

The option that I chose was to cook a little proggie to call
the ioctl to set the speed. This is the most flexible solution
(as it doesn't involve messing with fstab or being root to
pass the mount option to mount). Thanks, Jens!

Thank you all very, very much for the amazing (and fast) help!


[]s, Roger...

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rogerio Brito - [email protected] - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

2001-02-06 00:24:51

by Andre Hedrick

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Mon, 5 Feb 2001, Rogerio Brito wrote:

> On Feb 05 2001, Jens Axboe wrote:
> > ioctl(cd_fd, CDROM_SELECT_SPEED, speed);
>
> I'd like to thank everybody that replied either on the list
> and privately. I didn't know that I could just use the /proc
> entries to change the IDE driver speed with a simple:
>
> echo current_speed:4 > /proc/ide/hdc/settings

You can not it has nothing to do with the speed of the device but the
transfer rate between the host and the device.

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com

2001-02-11 10:47:13

by Pavel Machek

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

Hi!

> > Well, this has nothing to do with the above, but is there any
> > utility or /proc entry that lets me say to my CD drive that it
> > should not work at full speed?
> >
> > Basically, some drives make way too much noise when they're
> > operating at full speed. When I'd like to listen to some MP3s
> > from a burned CD-R, what I'm currently doing is copying the
> > files that I want to /tmp and listening from there, but this
> > is obviously a dirty solution. :-(
>
> ioctl(cd_fd, CDROM_SELECT_SPEED, speed);

Does this actually work? I helped my friend with partly broken cdrom
(worked only at low speeds) and it did not have much effect. It did
not make my cdrom quiet, either, AFAI can remember.
Pavel
--
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]

2001-02-11 16:48:06

by Jens Axboe

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Sat, Feb 10 2001, Pavel Machek wrote:
> > ioctl(cd_fd, CDROM_SELECT_SPEED, speed);
>
> Does this actually work? I helped my friend with partly broken cdrom
> (worked only at low speeds) and it did not have much effect. It did
> not make my cdrom quiet, either, AFAI can remember.

It's no news that vendors only implement what they want to. New
cd-r/w and dvd drives are not required to implement this command,
so it may not work there either.

--
Jens Axboe

2001-02-11 18:21:09

by Rogerio Brito

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Feb 10 2001, Pavel Machek wrote:
> Hi!
>
> > ioctl(cd_fd, CDROM_SELECT_SPEED, speed);
>
> Does this actually work? I helped my friend with partly broken cdrom
> (worked only at low speeds) and it did not have much effect. It did
> not make my cdrom quiet, either, AFAI can remember.

Well, I wrote a little program that just makes this call that
Jens told me about and it worked perfectly with my hardware --
using my CD-ROM drive at speed 1, 2 or 4, it works quietly and
I can listen to MP3s at volumes that I couldn't earlier.

OTOH, it seems that a paradox is happening: this very same
drive has some problems (not always reproducible) reading some
CD-RW discs when it operates at very slow speeds. In this
case, the best that I can do is to let the drive accelerate as
much as it wants and then it works ok.

BTW, Jens, what is the way to set the drive back to its
maximum speed, without limits? Where could I read more about
the subject (that is, this and other ioctl's) without annoying
you? I'm a moderately competent C programmer (only
moderately), but I know *nothing* about the kernel.


[]s, Roger...

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rogerio Brito - [email protected] - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

2001-02-11 20:10:51

by alan

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Sun, 11 Feb 2001, Jens Axboe wrote:

> On Sat, Feb 10 2001, Pavel Machek wrote:
> > > ioctl(cd_fd, CDROM_SELECT_SPEED, speed);
> >
> > Does this actually work? I helped my friend with partly broken cdrom
> > (worked only at low speeds) and it did not have much effect. It did
> > not make my cdrom quiet, either, AFAI can remember.
>
> It's no news that vendors only implement what they want to. New
> cd-r/w and dvd drives are not required to implement this command,
> so it may not work there either.

Take a look at the code for cdparanoia or one of the other MP3 ripping
programms. Slowing down the drive is a standard feature for that type of
program. (Reduces errors when pulling audio tracks off the disc.)

[email protected] | Note to AOL users: for a quick shortcut to reply
Alan Olsen | to my mail, just hit the ctrl, alt and del keys.
"In the future, everything will have its 15 minutes of blame."

2001-02-11 21:39:17

by Jens Axboe

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)

On Sun, Feb 11 2001, Alan Olsen wrote:
> > It's no news that vendors only implement what they want to. New
> > cd-r/w and dvd drives are not required to implement this command,
> > so it may not work there either.
>
> Take a look at the code for cdparanoia or one of the other MP3 ripping
> programms. Slowing down the drive is a standard feature for that type of
> program. (Reduces errors when pulling audio tracks off the disc.)

One would think that you have taken a look at the cdparanoia
source before posting something like this. Guess what it does to
control speed? Reread my message, you totally missed the point.

--
Jens Axboe

2001-02-11 22:08:26

by alan

[permalink] [raw]
Subject: Re: Slowing down CDROM drives (was: Re: ATAPI CDRW which doesn't work)


Sorry. it was late when I answered that. (Either that or no ocffe, not
certain which.)

On Sun, 11 Feb 2001, Jens Axboe wrote:

> On Sun, Feb 11 2001, Alan Olsen wrote:
> > > It's no news that vendors only implement what they want to. New
> > > cd-r/w and dvd drives are not required to implement this command,
> > > so it may not work there either.
> >
> > Take a look at the code for cdparanoia or one of the other MP3 ripping
> > programms. Slowing down the drive is a standard feature for that type of
> > program. (Reduces errors when pulling audio tracks off the disc.)
>
> One would think that you have taken a look at the cdparanoia
> source before posting something like this. Guess what it does to
> control speed? Reread my message, you totally missed the point.
>
> --
> Jens Axboe
>
>

[email protected] | Note to AOL users: for a quick shortcut to reply
Alan Olsen | to my mail, just hit the ctrl, alt and del keys.
"In the future, everything will have its 15 minutes of blame."

2001-02-12 02:20:37

by Ion Badulescu

[permalink] [raw]
Subject: Re: Slowing down CDROM drives

On Sun, 11 Feb 2001 16:20:47 -0200, Rogerio Brito <[email protected]> wrote:

>> > ioctl(cd_fd, CDROM_SELECT_SPEED, speed);

Yes: pass 0 as the speed, in the ioctl() above.

Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.