Bug 432729 - execute command "eject -X" can not output a list of speeds of "cdrom"
execute command "eject -X" can not output a list of speeds of "cdrom"
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: eject (Show other bugs)
5.1
i686 Linux
low Severity low
: rc
: ---
Assigned To: Kamil Dudka
desktop-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-13 20:40 EST by Peng Haitao
Modified: 2010-10-22 18:29 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-26 12:40:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This is a patch fixing this bug (473 bytes, patch)
2008-02-13 20:40 EST, Peng Haitao
no flags Details | Diff
the attachment of executing command "eject -v -X" (282 bytes, text/plain)
2008-02-14 20:54 EST, Peng Haitao
no flags Details
the attachment of executing command "cat /proc/sys/dev/cdrom/info" (433 bytes, text/plain)
2008-02-14 20:55 EST, Peng Haitao
no flags Details
This is a patch fixing this bug (2.01 KB, patch)
2008-02-15 05:03 EST, Peng Haitao
no flags Details | Diff
The attachment of executing command "lsmod" (2.73 KB, text/plain)
2008-02-17 19:28 EST, Peng Haitao
no flags Details
eject-2.1.5-5.el5.src.rpm (133.96 KB, application/x-rpm)
2008-02-28 08:31 EST, Zdenek Prikryl
no flags Details
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm" (2.20 KB, patch)
2008-02-28 20:46 EST, Peng Haitao
no flags Details | Diff
The attachment of executing command "for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done" (2.04 KB, text/plain)
2008-03-06 19:43 EST, Peng Haitao
no flags Details

  None (edit)
Description Peng Haitao 2008-02-13 20:40:34 EST
Description of problem:
Using command "eject" with option "-X" can not output a list
of speeds which can be used as an argument of the -x option.

Version-Release number of selected component (if applicable):
eject-2.1.5-4.2.el5

How reproducible:
100%

Steps to Reproduce:
1.eject -X
  
Actual results:
eject: CD-ROM select speed command failed: Input/output error

Expected results:
4 16 24 ...

Additional info:
Comment 1 Peng Haitao 2008-02-13 20:40:34 EST
Created attachment 294862 [details]
This is a patch fixing this bug
Comment 2 Zdenek Prikryl 2008-02-14 05:38:21 EST
Hello,
I need some additional info from you. Please, run eject (without a patch) in a
verbose mode "$ eject -v -X" and create an attachment. Also create an attachment
with an output of "$ cat /proc/sys/dev/cdrom/info".

Thanks
Comment 3 Peng Haitao 2008-02-14 20:54:47 EST
Created attachment 294961 [details]
the attachment of executing command "eject -v -X"
Comment 4 Peng Haitao 2008-02-14 20:55:55 EST
Created attachment 294962 [details]
the attachment of executing command "cat /proc/sys/dev/cdrom/info"
Comment 5 Peng Haitao 2008-02-15 05:03:23 EST
Created attachment 294998 [details]
This is a patch fixing this bug

This patch avoids giving up too early the speed detection: in case of error,
just try with the next speed.
Comment 6 Zdenek Prikryl 2008-02-15 08:33:27 EST
Patch seems fine. But still, I would like to have some additional information. 
Because this is first case of this kind of problems, a bug could be in a 
kernel module of cdrom. So, what cdrom do you have? Please, attach an output 
of "$ lsmod" as attachment too.

Thanks
Comment 7 Peng Haitao 2008-02-17 19:28:07 EST
Created attachment 295119 [details]
The attachment of executing command "lsmod"

I execute command in the machine "Acer Altos G530(SATA)"
Comment 8 Zdenek Prikryl 2008-02-28 08:30:20 EST
Please try to build eject-2.1.5-5.el5.src.rpm which I'll create as an
attachment. This version tries to list speeds of a cdrom in different way.

Please, let me know, if this version works correct. 
Comment 9 Zdenek Prikryl 2008-02-28 08:31:04 EST
Created attachment 296204 [details]
eject-2.1.5-5.el5.src.rpm
Comment 10 Peng Haitao 2008-02-28 20:46:04 EST
Created attachment 296298 [details]
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm"

This version does not work correct, the bug is still existent. So I make a
another patch to fix this bug in the source of "eject-2.1.5-5.el5.src.rpm".
Comment 11 Zdenek Prikryl 2008-03-06 05:47:54 EST
Hello, one more test. Because eject fails to set some low CDROM speed, we try
another tool.

So run this as a root:
$ for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done

Will every set of speed run without any error?
Comment 12 Peng Haitao 2008-03-06 19:43:30 EST
Created attachment 297128 [details]
The attachment of executing command "for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done"

BTW, The function ioctl(fd, CDROM_SELECT_SPEED, speed) when the speed is 1, 2
or 3 will return -1.
Comment 13 Zdenek Prikryl 2008-03-11 08:13:21 EDT
Hmm, it's really strange. As I mentioned before, it may be a kernel stuff. So
I'm reassigning this to kernel and will wait for their statement.
Comment 14 Anton Arapov 2008-07-04 03:08:09 EDT
  It's obviously normal return of the ioctl(). Nothing really strange happened,
it's device dependent.
  No doubts that eject tool have to deal with other then successful returns from
ioctl(), it will not break the logic of the tool and does not change the
behavior. Proposed there patches for eject is what I'd like to see in eject.

Alternatively, you can try to update the firmware in cd/dvd drive. Or at least
to look for it,... it might be known issue.

go ahead, Zdenek!
Comment 15 RHEL Product and Program Management 2009-03-26 12:46:51 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 20 Kamil Dudka 2010-03-26 12:40:04 EDT
The proposed solution does not solve the problem, which seems to be caused by the device (or its firmware).  As there is nothing we can improve in eject itself wrt. the issue, I am closing the bug as CANTFIX.  Feel free to reopen if you are aware of another solution.  Thanks in advance!

Note You need to log in before you can comment on or make changes to this bug.