2005-11-21 22:01:09

by Gustavo Guillermo Pérez

[permalink] [raw]
Subject: /dev/sr0 not ready, but working

When I use my external case as Firewire or USB 2.0 I got the error on the
kernel syslog:
sr 0:0:0:0: Device not ready.
last message repeated 187 times

Same using amdtp FireWire Driver and usb-storage driver.

but the drive keeps writing and the media finish and close as espected on the
95% of times, the other 5% :(.

This does not happen when the drive is on IDE interface, my kernel verison is:
2.6.14/12, and the Drive is a Pioneer DVR110D and A07 both the same onto an
ADS Tech BOX.

Regards
--
Gustavo Guillermo P?rez
Compunauta uLinux
http://www.compunauta.com


2005-11-21 23:25:35

by Jeff Garzik

[permalink] [raw]
Subject: Re: /dev/sr0 not ready, but working

On Mon, Nov 21, 2005 at 04:00:51PM -0600, Gustavo Guillermo P?rez wrote:
> When I use my external case as Firewire or USB 2.0 I got the error on the
> kernel syslog:
> sr 0:0:0:0: Device not ready.
> last message repeated 187 times
>
> Same using amdtp FireWire Driver and usb-storage driver.
>
> but the drive keeps writing and the media finish and close as espected on the
> 95% of times, the other 5% :(.

This happens on my S/ATAPI box too...

Jeff



2005-11-22 15:36:48

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

On Mon, 21 Nov 2005, Jeff Garzik wrote:

> On Mon, Nov 21, 2005 at 04:00:51PM -0600, Gustavo Guillermo P?rez wrote:
> > When I use my external case as Firewire or USB 2.0 I got the error on the
> > kernel syslog:
> > sr 0:0:0:0: Device not ready.
> > last message repeated 187 times
> >
> > Same using amdtp FireWire Driver and usb-storage driver.
> >
> > but the drive keeps writing and the media finish and close as espected on the
> > 95% of times, the other 5% :(.
>
> This happens on my S/ATAPI box too...

What is an S/ATAPI box?

Would either of you like to tell us when these messages come up? What are
you doing with the drive? Does it happen only when the drive is writing?
What about when the drive is reading? Does anything else of interest
appear in the system log?

Alan Stern

2005-11-22 17:43:23

by Gustavo Guillermo Pérez

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

El Martes, 22 de Noviembre de 2005 09:36, Alan Stern escribi?:
> On Mon, 21 Nov 2005, Jeff Garzik wrote:
> > On Mon, Nov 21, 2005 at 04:00:51PM -0600, Gustavo Guillermo P?rez wrote:
> > > When I use my external case as Firewire or USB 2.0 I got the error on
> > > the kernel syslog:
> > > sr 0:0:0:0: Device not ready.
> > > last message repeated 187 times
> > >
> > > Same using amdtp FireWire Driver and usb-storage driver.
> > >
> > > but the drive keeps writing and the media finish and close as espected
> > > on the 95% of times, the other 5% :(.
> >
> > This happens on my S/ATAPI box too...
>
> What is an S/ATAPI box?
I guess is a Serial ATA or ATAPI converter to USB, but is Jeff who said that
> Would either of you like to tell us when these messages come up? What are
> you doing with the drive? Does it happen only when the drive is writing?
> What about when the drive is reading? Does anything else of interest
> appear in the system log?
Yes, I do the same operations as iee1394 and USB, and here we go:
1) ieee1394 Dirty DVD+RW ad UdfFileSystem without pktcdvd cause +rw
No Real problems, the errors on logical sectors was and old bad mount, but the
second one writing 5 o 6 MB of a lot of small files does not produce the
error.
2) ieee1394 Normal growisofs -Z /dev/sr0 -J -r /folder
No errors on the media, writing as iso not packet.
The error appears while writing the DVD+RW 96 times, not the same udf disk.
3) Reading from The writed disc
No error, normal operation.
4)Changing to USB Interface and ShutDown the iee1394, and do the udf Stuff.
Normal operation no errors on the DVD-RW media.
5) USB Writing Normal growisofs -Z /dev/sr0 -J -r /folder
No errors on the media, writing as iso not packet.
The error appears while writing the DVD-RW 57 times, not the same udf disk,
less data less errors.
6) Reading data from USB Interface.
No errors normal operation.
7) lspci, lsusb
The mouse is not relevant, I was plugged today.

Working with +RW -RW -R and +R, allways writing not udf packets the error
appears. As IDE interface the drive does not produce any device not ready
error.

(1)-------------------------------------------------
ieee1394: Initialized config rom entry `ip1394'
ieee1394: Loaded CMP driver
ohci1394: $Rev: 1313 $ Ben Collins <[email protected]>
ACPI: PCI Interrupt 0000:00:14.0[A] -> GSI 16 (level, low) -> IRQ 21
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[21] MMIO=[e3006000-e30067ff]
Max
Packet=[2048]
ieee1394: Loaded AMDTP driver
ieee1394: Node added: ID:BUS[0-00:1023] GUID[0050c50250004101]
ieee1394: Host added: ID:BUS[0-01:1023] GUID[00000d610056da51]
eth1394: $Rev: 1312 $ Ben Collins <[email protected]>
eth1394: eth2: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)
sbp2: $Rev: 1306 $ Ben Collins <[email protected]>
ieee1394: sbp2: Driver forced to serialize I/O (serialize_io=1)
ieee1394: sbp2: Try serialize_io=0 for better performance
scsi0 : SCSI emulation for IEEE-1394 SBP-2 Devices
ieee1394: sbp2: Logged into SBP-2 device
ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
Vendor: PIONEER Model: DVD-RW DVR-110D Rev: 1.22
Type: CD-ROM ANSI SCSI revision: 00
sr0: scsi3-mmc drive: 1x/351x xa/form2 tray
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
UDF-fs INFO UDF 0.9.8.1 (2004/29/09) Mounting volume 'LinuxUDF', timestamp
2005/
11/20 19:41 (1e98)
sr 0:0:0:0: Device not ready.
end_request: I/O error, dev sr0, sector 5380
Buffer I/O error on device sr0, logical block 1345
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1346
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1347
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1348
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1349
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1350
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1351
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1352
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1353
lost page write due to I/O error on sr0
Buffer I/O error on device sr0, logical block 1354
lost page write due to I/O error on sr0
sr 0:0:0:0: Device not ready.
end_request: I/O error, dev sr0, sector 8656
sr 0:0:0:0: Device not ready.
end_request: I/O error, dev sr0, sector 11932
sr 0:0:0:0: Device not ready.
end_request: I/O error, dev sr0, sector 15208
sr 0:0:0:0: Device not ready.
end_request: I/O error, dev sr0, sector 18484
cdrom: sr0: dirty DVD+RW media, "finalizing"
UDF-fs INFO UDF 0.9.8.1 (2004/29/09) Mounting volume 'LinuxUDF', timestamp
2005/
11/20 19:41 (1e98)
cdrom: sr0: dirty DVD+RW media, "finalizing"
(1)----------------------------------------------
(2)----------------------------------------------
XFS mounting filesystem hda6
Ending clean XFS mount for filesystem: hda6
XFS mounting filesystem hda7
Ending clean XFS mount for filesystem: hda7
sr 0:0:0:0: Device not ready.
Las message repeated 96 times
(3)----------------------------------------------
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
(3)----------------------------------------------
(4)----------------------------------------------
ieee1394: Node changed: 0-01:1023 -> 0-00:1023
ieee1394: Node suspended: ID:BUS[0-00:1023] GUID[0050c50250004101]
usb 6-1: new high speed USB device using ehci_hcd and address 3
scsi0 (0:0): rejecting I/O to dead device
scsi0 (0:0): rejecting I/O to dead device
scsi0 (0:0): rejecting I/O to dead device
scsi0 (0:0): rejecting I/O to dead device
scsi0 (0:0): rejecting I/O to dead device
scsi0 (0:0): rejecting I/O to dead device
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver ub
Vendor: PIONEER Model: DVD-RW DVR-110D Rev: 1.22
Type: CD-ROM ANSI SCSI revision: 00
sr0: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
usb-storage: device scan complete
pktcdvd: v0.2.0a 2004-07-14 Jens Axboe ([email protected]) and [email protected]
pktcdvd: writer pktcdvd0 mapped to sr0
UDF-fs INFO UDF 0.9.8.1 (2004/29/09) Mounting volume 'LinuxUDF', timestamp
2005/11/21 13:49 (1e98)
cdrom: sr0: dirty DVD-RW media, "finalizing"
(4)----------------------------------------------
(5)----------------------------------------------
sr 1:0:0:0: Device not ready.
last message repeated 57 times
(5)----------------------------------------------
(6)----------------------------------------------
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
(6)----------------------------------------------
(7)----------------------------------------------
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host
Bridge (rev 80)
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
0000:00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
0000:00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture
(rev 11)
0000:00:0c.0 USB Controller: OPTi Inc. 82C861 (rev 10)
0000:00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID
Controller (rev 80)
0000:00:0f.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge
[KT600/K8T800/K8T890 South]
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
0000:00:13.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
0000:00:14.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host
Controller (rev 46)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX
4000 AGP 8x] (rev c1)
Bus 006 Device 003: ID 06e1:d186 ADS Technologies, Inc.
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 002: ID 047d:1035 Kensington
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
(7)----------------------------------------------


--
Gustavo Guillermo P?rez
Compunauta uLinux
http://www.compunauta.com

2005-11-22 18:56:42

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

On Tue, 22 Nov 2005, Gustavo Guillermo P?rez wrote:

> Yes, I do the same operations as iee1394 and USB, and here we go:
> 1) ieee1394 Dirty DVD+RW ad UdfFileSystem without pktcdvd cause +rw
> No Real problems, the errors on logical sectors was and old bad mount, but the
> second one writing 5 o 6 MB of a lot of small files does not produce the
> error.
> 2) ieee1394 Normal growisofs -Z /dev/sr0 -J -r /folder
> No errors on the media, writing as iso not packet.
> The error appears while writing the DVD+RW 96 times, not the same udf disk.
> 3) Reading from The writed disc
> No error, normal operation.
> 4)Changing to USB Interface and ShutDown the iee1394, and do the udf Stuff.
> Normal operation no errors on the DVD-RW media.
> 5) USB Writing Normal growisofs -Z /dev/sr0 -J -r /folder
> No errors on the media, writing as iso not packet.
> The error appears while writing the DVD-RW 57 times, not the same udf disk,
> less data less errors.
> 6) Reading data from USB Interface.
> No errors normal operation.
> 7) lspci, lsusb
> The mouse is not relevant, I was plugged today.
>
> Working with +RW -RW -R and +R, allways writing not udf packets the error
> appears. As IDE interface the drive does not produce any device not ready
> error.

I know practically nothing about how your device works, so this is just a
guess. It seems likely that the IEEE1394-USB/ATA interface controller
translates the commands it receives over the external bus into a sequence
of ATA or ATAPI commands that is somewhat different from the sequence of
commands Linux would use if the drive were directly attached to an IDE
controller. As a result, perhaps the drive sends those "not ready"
replies when you use it over an external bus but not when you use attach
it over ATA.

Or maybe not... Maybe the drive _does_ send those "not ready" messages
and the IDE driver ignores them instead of printing them in the system
log. Or perhaps those messages are sent by the bus interface controller
and not by the drive itself. I just don't know.

Alan Stern

2005-11-22 18:59:32

by Jeff Garzik

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

On Tue, Nov 22, 2005 at 10:36:46AM -0500, Alan Stern wrote:
> What is an S/ATAPI box?

A box with S/ATAPI in it.


> Would either of you like to tell us when these messages come up? What are
> you doing with the drive? Does it happen only when the drive is writing?
> What about when the drive is reading? Does anything else of interest
> appear in the system log?

I see it when burning CDs and DVDs.

Jeff


2005-11-22 19:00:10

by Jeff Garzik

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

On Tue, Nov 22, 2005 at 01:56:39PM -0500, Alan Stern wrote:
> I know practically nothing about how your device works, so this is just a
> guess. It seems likely that the IEEE1394-USB/ATA interface controller
> translates the commands it receives over the external bus into a sequence
> of ATA or ATAPI commands that is somewhat different from the sequence of
> commands Linux would use if the drive were directly attached to an IDE
> controller. As a result, perhaps the drive sends those "not ready"
> replies when you use it over an external bus but not when you use attach
> it over ATA.
>
> Or maybe not... Maybe the drive _does_ send those "not ready" messages
> and the IDE driver ignores them instead of printing them in the system
> log. Or perhaps those messages are sent by the bus interface controller
> and not by the drive itself. I just don't know.

The difference is between ide-cd.c and sr.c, most likely.

Jeff



2005-11-23 02:22:17

by Gustavo Guillermo Pérez

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

El Martes, 22 de Noviembre de 2005 12:56, Alan Stern escribi?:
> On Tue, 22 Nov 2005, Gustavo Guillermo P?rez wrote:
> > Yes, I do the same operations as iee1394 and USB, and here we go:
> > 1) ieee1394 Dirty DVD+RW ad UdfFileSystem without pktcdvd cause +rw
> > No Real problems, the errors on logical sectors was and old bad mount,
> > but the second one writing 5 o 6 MB of a lot of small files does not
> > produce the error.
> > 2) ieee1394 Normal growisofs -Z /dev/sr0 -J -r /folder
> > No errors on the media, writing as iso not packet.
> > The error appears while writing the DVD+RW 96 times, not the same udf
> > disk. 3) Reading from The writed disc
> > No error, normal operation.
> > 4)Changing to USB Interface and ShutDown the iee1394, and do the udf
> > Stuff. Normal operation no errors on the DVD-RW media.
> > 5) USB Writing Normal growisofs -Z /dev/sr0 -J -r /folder
> > No errors on the media, writing as iso not packet.
> > The error appears while writing the DVD-RW 57 times, not the same udf
> > disk, less data less errors.
> > 6) Reading data from USB Interface.
> > No errors normal operation.
> > 7) lspci, lsusb
> > The mouse is not relevant, I was plugged today.
> >
> > Working with +RW -RW -R and +R, allways writing not udf packets the error
> > appears. As IDE interface the drive does not produce any device not ready
> > error.
>
> I know practically nothing about how your device works, so this is just a
> guess. It seems likely that the IEEE1394-USB/ATA interface controller
> translates the commands it receives over the external bus into a sequence
> of ATA or ATAPI commands that is somewhat different from the sequence of
> commands Linux would use if the drive were directly attached to an IDE
> controller. As a result, perhaps the drive sends those "not ready"
> replies when you use it over an external bus but not when you use attach
> it over ATA.
>
> Or maybe not... Maybe the drive _does_ send those "not ready" messages
> and the IDE driver ignores them instead of printing them in the system
> log. Or perhaps those messages are sent by the bus interface controller
> and not by the drive itself. I just don't know.
>
> Alan Stern
Ok, yes may be the drive sends some command bad back translated to the system.
And may be is not important, cause drive works, and media almost never get
badwritten.

--
Gustavo Guillermo P?rez
Compunauta uLinux
http://www.compunauta.com

2005-11-24 15:03:37

by Mark Lord

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

Jeff Garzik wrote:
> On Tue, Nov 22, 2005 at 01:56:39PM -0500, Alan Stern wrote:
..
>>Or maybe not... Maybe the drive _does_ send those "not ready" messages
>>and the IDE driver ignores them instead of printing them in the system
>>log. Or perhaps those messages are sent by the bus interface controller
>>and not by the drive itself. I just don't know.
>
>
> 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.

Cheers

2005-11-24 17:28:14

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working

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