Bug 15403

Summary: cd/dvd burning fails due to spurious AN on LG GH22NS50
Product: IO/Storage Reporter: Matthias-Christian Ott (ott)
Component: Serial ATAAssignee: Tejun Heo (tj)
Status: RESOLVED CODE_FIX    
Severity: normal CC: axboe, carlos, kay, tj
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.32 Subsystem:
Regression: No Bisected commit-id:

Description Matthias-Christian Ott 2010-02-26 16:16:31 UTC
Some time ago I bought a LG GH22NS50, but never used it. Now I wanted to burn my secondary backup on CD and got the following output with a blank CD-R and a CD that contains data. I tried both AHCI and IDE compatible in the BIOS without success.

# dpkg-query -s linux-image-2.6.32-trunk-amd64
Package: linux-image-2.6.32-trunk-amd64
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 92884
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Architecture: amd64
Source: linux-2.6
Version: 2.6.32-5
Provides: linux-image, linux-image-2.6, linux-modules-2.6.32-trunk-amd64
Depends: module-init-tools, initramfs-tools (>= 0.55) | linux-initramfs-tool
Pre-Depends: debconf | debconf-2.0
Recommends: firmware-linux-free (>= 2.6.32)
Suggests: linux-doc-2.6.32, grub | lilo
Conflicts: initramfs-tools (<< 0.55)
Description: Linux 2.6.32 for 64-bit PCs
 The Linux kernel 2.6.32 and modules for use on PCs with AMD64 or Intel 64
 processors.
 .
 This kernel also runs on a Xen hypervisor.  It supports only unprivileged
 (domU) operation.

# uname -a
Linux qp 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC 2010 x86_64 GNU/Linux

# dmesg 
[...]
[ 3271.864968] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3271.864973] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3271.864977] Info fld=0x0
[ 3271.864978] sr 0:0:0:0: [sr0] Add. Sense: Logical block address out of range
[ 3271.864983] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00
[ 3271.864990] end_request: I/O error, dev sr0, sector 0
[ 3271.864993] Buffer I/O error on device sr0, logical block 0
[ 3271.867896] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3271.867900] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3271.867904] Info fld=0x0
[ 3271.867906] sr 0:0:0:0: [sr0] Add. Sense: Logical block address out of range
[ 3271.867910] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00
[ 3271.867917] end_request: I/O error, dev sr0, sector 0
[ 3271.867921] Buffer I/O error on device sr0, logical block 0
[ 3272.078031] cdrom: This disc doesn't have any tracks I recognize!
[ 3379.348120] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.348124] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.348129] Info fld=0x160c0, ILI
[ 3379.348130] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.348135] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.348143] end_request: I/O error, dev sr0, sector 361216
[ 3379.348147] Buffer I/O error on device sr0, logical block 45152
[ 3379.354738] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.354743] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.354748] Info fld=0x160c0, ILI
[ 3379.354749] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.354755] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.354762] end_request: I/O error, dev sr0, sector 361216
[ 3379.354766] Buffer I/O error on device sr0, logical block 45152
[ 3379.360228] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.360231] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.360235] Info fld=0x160c0, ILI
[ 3379.360236] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.360241] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.360248] end_request: I/O error, dev sr0, sector 361216
[ 3379.360250] Buffer I/O error on device sr0, logical block 45152
[ 3379.367743] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.367746] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.367750] Info fld=0x160c0, ILI
[ 3379.367752] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.367756] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.367763] end_request: I/O error, dev sr0, sector 361216
[ 3379.367766] Buffer I/O error on device sr0, logical block 45152
[ 3379.372726] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.372729] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.372733] Info fld=0x160c0, ILI
[ 3379.372734] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.372739] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.372746] end_request: I/O error, dev sr0, sector 361216
[ 3379.372749] Buffer I/O error on device sr0, logical block 45152
[ 3379.379290] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.379293] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.379297] Info fld=0x160c0, ILI
[ 3379.379298] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.379302] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.379309] end_request: I/O error, dev sr0, sector 361216
[ 3379.379312] Buffer I/O error on device sr0, logical block 45152
[ 3379.384042] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.384045] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.384049] Info fld=0x160c0, ILI
[ 3379.384051] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.384055] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.384062] end_request: I/O error, dev sr0, sector 361216
[ 3379.384064] Buffer I/O error on device sr0, logical block 45152
[ 3379.602804] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.602808] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.602812] Info fld=0x160c0, ILI
[ 3379.602814] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.602818] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.602825] end_request: I/O error, dev sr0, sector 361216
[ 3379.602828] Buffer I/O error on device sr0, logical block 45152
[ 3379.657672] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3379.657676] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3379.657681] Info fld=0x160c0, ILI
[ 3379.657682] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3379.657687] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3379.657695] end_request: I/O error, dev sr0, sector 361216
[ 3379.657699] Buffer I/O error on device sr0, logical block 45152
[ 3402.994419] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3402.994424] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3402.994428] Info fld=0x160c0, ILI
[ 3402.994430] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3402.994435] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3402.994442] end_request: I/O error, dev sr0, sector 361216
[ 3402.994446] Buffer I/O error on device sr0, logical block 45152
[ 3402.999423] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3402.999428] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3402.999432] Info fld=0x160c0, ILI
[ 3402.999433] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3402.999439] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3402.999446] end_request: I/O error, dev sr0, sector 361216
[ 3402.999451] Buffer I/O error on device sr0, logical block 45152
[ 3403.002873] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.002876] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.002880] Info fld=0x160c0, ILI
[ 3403.002881] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.002885] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.002892] end_request: I/O error, dev sr0, sector 361216
[ 3403.002895] Buffer I/O error on device sr0, logical block 45152
[ 3403.006381] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.006385] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.006388] Info fld=0x160c0, ILI
[ 3403.006390] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.006394] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.006401] end_request: I/O error, dev sr0, sector 361216
[ 3403.006404] Buffer I/O error on device sr0, logical block 45152
[ 3403.011265] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.011268] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.011272] Info fld=0x160c0, ILI
[ 3403.011273] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.011277] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.011284] end_request: I/O error, dev sr0, sector 361216
[ 3403.011287] Buffer I/O error on device sr0, logical block 45152
[ 3403.014721] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.014725] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.014729] Info fld=0x160c0, ILI
[ 3403.014730] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.014735] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.014742] end_request: I/O error, dev sr0, sector 361216
[ 3403.014746] Buffer I/O error on device sr0, logical block 45152
[ 3403.018248] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.018252] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.018256] Info fld=0x160c0, ILI
[ 3403.018257] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.018262] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.018269] end_request: I/O error, dev sr0, sector 361216
[ 3403.018271] Buffer I/O error on device sr0, logical block 45152
[ 3403.212498] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.212503] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.212508] Info fld=0x160c0, ILI
[ 3403.212509] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.212515] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.212523] end_request: I/O error, dev sr0, sector 361216
[ 3403.212527] Buffer I/O error on device sr0, logical block 45152
[ 3403.267345] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3403.267348] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current] 
[ 3403.267352] Info fld=0x160c0, ILI
[ 3403.267354] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 3403.267358] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 60 c0 00 00 02 00
[ 3403.267365] end_request: I/O error, dev sr0, sector 361216
[ 3403.267368] Buffer I/O error on device sr0, logical block 45152

# lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1
00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 6
00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIB (ICH10) LPC Interface Controller
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
03:00.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)
03:04.0 IDE interface: Integrated Technology Express, Inc. IT8213 IDE Controller
03:08.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
Comment 1 Tejun Heo 2010-03-02 07:35:38 UTC
Hmmmm... the model seems to have problems on Linux.  It's a pretty cheap one so I'll go ahead and order one and see whether I can reproduce the problem locally.  Does it work in other OSes?

Thanks.
Comment 2 Tejun Heo 2010-03-02 07:37:37 UTC
Can you also please post the output of hdparm -I on the drive?
Comment 3 Matthias-Christian Ott 2010-03-12 10:07:57 UTC
# hdparm -I /dev/cdrw 

/dev/cdrw:

ATAPI CD-ROM, with removable media
	Model Number:       HL-DT-ST DVDRAM GH22NS50                
	Serial Number:      K1998RJ2657         
	Firmware Revision:  TN01    
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
	Likely used CD-ROM ATAPI-1
Configuration:
	DRQ response: 50us.
	Packet size: 12 bytes
	cache/buffer size  = unknown
Capabilities:
	LBA, IORDY(can be disabled)
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Comment 4 Matthias-Christian Ott 2010-03-12 10:10:00 UTC
According to http://www.lge.com/us/support/product/support-product-profile.jsp?customerModelCode=GH22NS50 a new firmware version (TN02) is available, but I don't have Microsoft Windows, so I can't test it.
Comment 5 Tejun Heo 2010-03-16 00:27:27 UTC
I have the drive now.  Haven't had time to work on it yet tho.  I'll get to it in a few days.  Please wait a bit.

Thanks.
Comment 6 James Ettle 2010-03-23 23:41:01 UTC
I see this too, on a TSSTcorp CDDVDW SN-S082H, whenever I insert blank media or an audio CD. It behaves itself with a data CD-ROM. The drive seems to work fine reading data. This is with 2.6.33.1, I don't recall seeing this on 2.6.31. From dmesg, with a blank CD-R:


Buffer I/O error on device sr0, logical block 0
sr 3:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 3:0:0:0: [sr0] Sense Key : Illegal Request [current] 
sr 3:0:0:0: [sr0] Add. Sense: Logical block address out of range
sr 3:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00
end_request: I/O error, dev sr0, sector 0


and with an audio CD:


sr 3:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 3:0:0:0: [sr0] Sense Key : Illegal Request [current] 
sr 3:0:0:0: [sr0] Add. Sense: Illegal mode for this track
sr 3:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 40 00
end_request: I/O error, dev sr0, sector 0
Buffer I/O error on device sr0, logical block 0
Buffer I/O error on device sr0, logical block 1
Buffer I/O error on device sr0, logical block 2
Buffer I/O error on device sr0, logical block 3
Buffer I/O error on device sr0, logical block 4
Buffer I/O error on device sr0, logical block 5
Buffer I/O error on device sr0, logical block 6
Buffer I/O error on device sr0, logical block 7
Buffer I/O error on device sr0, logical block 8
sr 3:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 3:0:0:0: [sr0] Sense Key : Illegal Request [current] 
sr 3:0:0:0: [sr0] Add. Sense: Illegal mode for this track
sr 3:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
end_request: I/O error, dev sr0, sector 0


The drive's hdparm info:


/dev/sr0:

ATAPI CD-ROM, with removable media
	Model Number:       TSSTcorp CDDVDW SN-S082H                
	Serial Number:      
	Firmware Revision:  SB00    
Standards:
	Supported: CD-ROM ATAPI-3 -4 -5 -6 -7 
Configuration:
	DRQ response: 50us.
	Packet size: 12 bytes
	cache/buffer size  = unknown
Capabilities:
	LBA, IORDY(can be disabled)
	DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=383ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	Power Management feature set
	   *	PACKET command feature set
	   *	DEVICE_RESET command
	   *	NOP cmd
HW reset results:
	CBLID- below Vih
	Device num = 0 determined by CSEL
Comment 7 Matthias-Christian Ott 2010-03-24 00:01:04 UTC
My drive doesn't work with 2.6.30, so I think our bugs are related, because mine doesn't seem to be an regression bug.
Comment 8 Matthias-Christian Ott 2010-03-24 00:02:00 UTC
s/related/not related/
Comment 9 James Ettle 2010-03-24 00:07:21 UTC
Perhaps, then again I may have been mistaken (I don't use optical media very often). I also see this on another machine (with an ATI-IXP chipset) with a HL-DT-STCD-RW/DVD DRIVE GCC-4241N drive: put in a blank or audio CD, and get


cdrom: This disc doesn't have any tracks I recognize!
sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current] 
Info fld=0x0, ILI
sr 1:0:0:0: [sr0] Add. Sense: Illegal mode for this track
sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00
end_request: I/O error, dev sr0, sector 0
Buffer I/O error on device sr0, logical block 0


This also happens on 2.6.31 in this machine (the one from Comment #6 doesn't have a 2.6.31 on it), the only difference being the absence of CDB: Read in that case...
Comment 10 Tejun Heo 2010-03-26 08:18:47 UTC
Hmmm... my drive has the new firmware TN02 but shows the same problem.  I tried with different write sizes but once the recording of the first chunk is complete, the drive aborts further write requests with invalid write address.  This doesn't seem to be a driver issue tho.  The data transport seems to work just fine.  Probably the drive needs a different recording command sequence / timing / whatever.  I'll play with it a bit more.

Thanks.
Comment 11 Tejun Heo 2010-03-26 17:28:56 UTC
Here are things I've found so far.

* It's not a kernel regression.  2.6.30 behaves the same and other
  drives work fine.

* There seems to be a regression in cdrom open path which makes media
  presence polling continuously trigger read errors under the current
  kernel for some drives but this doesn't seem to have much to do with
  the burning failures.

* ata_piix/ahci does make difference.  In piix mode, it works, in ahci
  it doesn't even when the command stream for burning is identical.

I'll keep digging and the kernel read error messages shouldn't be too hard to fix but the burning failure seems like a subtle compatibility issue and could be difficult to diagnose and work around w/o bus tracer. :-(

Thanks.
Comment 12 Tejun Heo 2010-03-26 17:41:39 UTC
Another interesting data point.

* Both ich8 and jmb ahci's fail.
Comment 13 Matthias-Christian Ott 2010-03-26 20:48:46 UTC
On my computer the drive didn't work with IDE compatibility and ATA mode. But thanks for all the efforts you make.
Comment 14 Tejun Heo 2010-03-29 04:20:03 UTC
On further investigation, the problem seems to be caused by how udev polls for media presence events and spurious AN events during burning interacts with it.  Does stopping udevd make burning work?

Thanks.
Comment 15 Matthias-Christian Ott 2010-03-29 04:31:30 UTC
No, not really. Wodim burned the CD without any complaints, but it only contained 2048 bytes of zeros, when I tried to read it. However, I saw the burning light flashing and heard the CD rotating.
Comment 16 Tejun Heo 2010-03-29 14:27:47 UTC
Hmmm... that's strange.  Can you please try once more just in case and eject and reload the media before trying to read it back?

Thanks.
Comment 17 Matthias-Christian Ott 2010-03-29 14:44:36 UTC
That did it. A 80 MiB file got correctly burned onto the CD, though the drive was quite noisy.
Comment 18 Carlos Corbacho 2010-04-05 21:33:02 UTC
This drive is very noisy on Windows as well - I suspect that is just the nature of these drives, rather than anything Linux specific.
Comment 19 Tejun Heo 2010-04-07 10:07:28 UTC
This problem happens like the following.

* Device generates spurious AN when burning starts.

* udev/hal opens the device and issues commands to investigate the event.

* Device replies to those unexpected probing commands and fails burning.

This can be fixed by updating probing programs to open w/ O_EXCL.  Kay Sievers already fixed upstream.  Please report to your distro so that they can apply the fix.

While investigating the problem, an issue in block device open path also was discovered where O_EXCL open attempts can interfere with the existing O_EXCL open.  Patches to address this issue have been posted.

  http://thread.gmane.org/gmane.linux.kernel/971119

Resolving as CODE_FIX.

Thanks.
Comment 20 Tejun Heo 2010-04-07 10:17:11 UTC
Updated bug title for later reference.  The repeated read failures during probing are probably caused by drive responding unusually to READ TOC making the driver believe that the present media is not blank.  This doesn't have anything to do with the burning failure.  The only consequence is ugly messages and considerable delay until the drive is ready to use after blank media is inserted.  I think there are a couple of things we can try to work around this one.  Can one of you guys please open a separate bug entry for this and assign it to me?

Thanks.
Comment 21 Matthias-Christian Ott 2010-04-10 21:46:27 UTC
I reported this to the Debian maintainer: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577256
Comment 22 James Ettle 2010-04-11 09:43:26 UTC
(In reply to comment #20)
> Updated bug title for later reference.  The repeated read failures during
> probing are probably caused by drive responding unusually to READ TOC making
> the driver believe that the present media is not blank.  This doesn't have
> anything to do with the burning failure.  The only consequence is ugly
> messages
> and considerable delay until the drive is ready to use after blank media is
> inserted.  I think there are a couple of things we can try to work around
> this
> one.  Can one of you guys please open a separate bug entry for this and
> assign
> it to me?

Filed bug 15757 as requested.