Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932517AbVKXR2O (ORCPT ); Thu, 24 Nov 2005 12:28:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932462AbVKXR2O (ORCPT ); Thu, 24 Nov 2005 12:28:14 -0500 Received: from mx1.rowland.org ([192.131.102.7]:34823 "HELO mx1.rowland.org") by vger.kernel.org with SMTP id S932432AbVKXR2N (ORCPT ); Thu, 24 Nov 2005 12:28:13 -0500 Date: Thu, 24 Nov 2005 12:28:09 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Mark Lord cc: Jeff Garzik , =?ISO-8859-1?Q?Gustavo_Guil?= =?ISO-8859-1?Q?lermo_P=E9rez?= , , Linux Kernel Mailing List Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working In-Reply-To: <4385D63C.50009@rtr.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1560 Lines: 49 On Thu, 24 Nov 2005, Mark Lord wrote: > Jeff Garzik wrote: > > The difference is between ide-cd.c and sr.c, most likely. > > Agreed. I get hundreds and hundreds of these when simply playing a DVD: > > sr0: CDROM not ready. Make sure there is a disc in the drive. > > Nothing really wrong here, other than that the kernel is flooding > my syslogs with messages that could really be left to the userspace > application to decide about. If any of you is interested in pursuing this, try out this patch. It will tell what the offending command is and how it is getting submitted. Once that is known, the generic cdrom layer or the sr driver can be changed to suppress these warnings. Alan Stern --- a/drivers/scsi/sr_ioctl.c Mon Oct 31 10:12:20 2005 +++ b/drivers/scsi/sr_ioctl.c Thu Nov 24 12:24:59 2005 @@ -139,8 +139,15 @@ break; } } - if (!cgc->quiet) - printk(KERN_INFO "%s: CDROM not ready. Make sure there is a disc in the drive.\n", cd->cdi.name); + if (!cgc->quiet) { + static int cnt = 0; + if (cnt < 8) { + ++cnt; + printk(KERN_INFO "%s: CDROM not ready. Make sure there is a disc in the drive.\n", cd->cdi.name); + printk("cmd[0] = %d\n", cgc->cmd[0]); + dump_stack(); + } + } #ifdef DEBUG scsi_print_sense_hdr("sr", &sshdr); #endif - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/