Bug 150175 - message repeats every 2 seconds : Device not ready. Make sure there is a disc in the drive.
Summary: message repeats every 2 seconds : Device not ready. Make sure there is a disc...
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Beta 3
Hardware: i586 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Bernhard Kaindl
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-11 16:35 UTC by michel munnix
Modified: 2006-02-17 10:43 UTC (History)
3 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
/var/log/messages before inserting up to after removing a cd (1.90 KB, text/plain)
2006-02-11 16:37 UTC, michel munnix
Details
output from hwinfo --cdrom (2.37 KB, text/plain)
2006-02-11 16:39 UTC, michel munnix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michel munnix 2006-02-11 16:35:40 UTC
in /var/log/messages I get every 2 seconds the same line :
Feb 11 16:53:19 linux klogd: Device not ready. Make sure there is a disc in the drive.
Feb 11 16:53:21 linux klogd: Device not ready. Make sure there is a disc in the drive.
Feb 11 16:53:23 linux klogd: Device not ready. Make sure there is a disc in the drive.
Only if put a cd in, it shuts up. This happens only to my scsi CDwriter, not to the ide DVD drive, nor DVDwriter
This happend in previous SuSELinux versions before suse 10.0, hoped it would disappear with 10.1
Comment 1 michel munnix 2006-02-11 16:37:46 UTC
Created attachment 67771 [details]
/var/log/messages before inserting up to after removing a cd
Comment 2 michel munnix 2006-02-11 16:39:47 UTC
Created attachment 67772 [details]
output from hwinfo --cdrom
Comment 3 Hannes Reinecke 2006-02-13 09:29:51 UTC
That's haldaemon polling your device.

Try '/etc/init.d/haldaemon stop' and see whether the message disappears.
Comment 4 michel munnix 2006-02-13 22:10:43 UTC
Yes, you're rigth, the message disappears when I stop the haldaemon service.
Comment 5 Greg Kroah-Hartman 2006-02-16 05:44:10 UTC
not a kernel issue, reassigning...
Comment 6 Michael Gross 2006-02-16 13:20:15 UTC
Danny: I think HAL should not pollute the syslog in this way. After all this message is not very useful at all, don't you think?
Comment 7 Danny Al-Gaaf 2006-02-16 13:53:24 UTC
Not HAL pollute the syslog. This message is at least from the kernel and not from HAL.

Btw. we could blacklist the device, but in this case you will not get automounted CDs/DVDs because we will not register media change.

@kay any other ideas?
Comment 8 Kay Sievers 2006-02-16 15:46:22 UTC
Yeah, fix the kernel not to print this absolute nonsense.
Comment 9 Michael Gross 2006-02-16 15:54:51 UTC
I'll add the Kernel maintainers into CC
Comment 10 Danny Al-Gaaf 2006-02-16 16:20:11 UTC
I reassign this to kernel.

@kay: Btw. should we blacklist the device or ignore this errormessage?
Comment 11 Kay Sievers 2006-02-16 16:24:40 UTC
Let's wait if the kernel can be fixed. There could be more like this in the end...
Comment 12 Chris L Mason 2006-02-16 20:54:19 UTC
I can easily get rid of the kernel dmesg, but why would you want to poll the drive every two seconds?  I thought we wanted our hard drives to be able to suspend from time to time for power reasons? 
Comment 13 michel munnix 2006-02-17 07:51:35 UTC
Remember, it is a cd-writer not a hard disk. Does the kernel think it's a hard drive ?
Comment 14 Hannes Reinecke 2006-02-17 08:19:08 UTC
Actually, there _is_ something askew in the kernel.

hal does an 			
drive = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);

this _should_ be mapped to sr_device_status in drivers/scsi/sr_ioctl.c, which then calls test_unit_ready();

	memset(&cgc, 0, sizeof(struct packet_command));
	cgc.cmd[0] = GPCMD_TEST_UNIT_READY;
	cgc.quiet = 1;
	cgc.data_direction = DMA_NONE;
	cgc.timeout = IOCTL_TIMEOUT;
	return sr_do_ioctl(cd, &cgc);

and sr_do_ioctl might output a line like:
'CDROM not ready.  Make sure there is a disc in the drive.'

The line from above, however, is from scsi_ioctl.c:ioctl_internal_command()
which we should reach at all.

Jens, care to elaborate what's going on here?
Comment 15 Hannes Reinecke 2006-02-17 08:22:49 UTC
Actually, maybe can Bernd give us a hand here...
Comment 16 Jens Axboe 2006-02-17 10:43:10 UTC
The message should just be killed, it's a normal condition. I've committed a patch to do that.