Bug 9604 - ata_ahci driver does not like to finalize a DVD, times out
Summary: ata_ahci driver does not like to finalize a DVD, times out
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 03:15 UTC by Joe Ceklosky
Modified: 2012-05-17 15:21 UTC (History)
2 users (show)

See Also:
Kernel Version: Stock 2.6.23.11
Subsystem:
Regression: No
Bisected commit-id:


Attachments
libata-fixes-2.6.24-rc5.patch (31.64 KB, patch)
2007-12-19 22:03 UTC, Tejun Heo
Details | Diff
v2.6.24-rc6-to-improve-ATAPI-data-transfer.patch (166.22 KB, patch)
2008-01-02 03:34 UTC, Tejun Heo
Details | Diff

Description Joe Ceklosky 2007-12-19 03:15:39 UTC
Thought it might be a cable problem, but I change the Intel DP35DP motherboard to IDE instead of AHCI mode and I don't get the error on the finalize step.
In IDE mode I was using the ata_piix driver.

Steps to reproduce:
Burn a DVD and the finalize step will generate the following:

Kernel message:
Dec  9 08:42:35 saturn kernel: ata3.00: exception Emask 0x10 SAct 0x0 SErr 0x400100 action 0x2 frozen
Dec  9 08:42:35 saturn kernel: ata3.00: irq_stat 0x08000000, interface fatal error
Dec  9 08:42:35 saturn kernel: ata3.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x2a data 32768 out
Dec  9 08:42:35 saturn kernel:          res 50/00:03:00:00:80/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
Dec  9 08:42:35 saturn kernel: ata3: soft resetting port
Dec  9 08:42:35 saturn kernel: ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Dec  9 08:42:35 saturn kernel: ata3.00: configured for UDMA/33
Dec  9 08:42:35 saturn kernel: ata3: EH complete
Comment 1 Tejun Heo 2007-12-19 22:03:54 UTC
Created attachment 14133 [details]
libata-fixes-2.6.24-rc5.patch

Can you please apply the attached patch on top of 2.6.24-rc5 and see whether the problem goes away?
Comment 2 Joe Ceklosky 2007-12-20 20:01:49 UTC
I pulled 2.6.24-rc5 and applied the patch and retested.  It still failed on the finalize, plus I got a few others.

When I started up k3b with a blank disk in ata2.00 I got the following:

ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata3.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 8 in
         cdb ac 00 00 00 00 00 00 00  00 01 03 00 00 00 00 00
         res 40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata3.00: status: { DRDY }
ata3: hard resetting link
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: configured for UDMA/33
ata3: EH complete
ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata2.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 8 in
         cdb ac 00 00 00 00 00 00 00  00 01 03 00 00 00 00 00
         res 40/00:03:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata2.00: status: { DRDY }
ata2: hard resetting link
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: configured for UDMA/100
ata2: EH complete
ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata2.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 8 in
         cdb ac 00 00 00 00 00 00 00  00 01 03 00 00 00 00 00
         res 40/00:03:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata2.00: status: { DRDY }
ata2: hard resetting link
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: configured for UDMA/100
ata2: EH complete


After k3b ran and tried to do the finalize I got the following:

ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata2.00: cmd a0/01:00:00:00:80/00:00:00:00:00/a0 tag 0 dma 32768 out
         cdb 2a 00 00 05 61 70 00 00  0a 00 00 00 00 00 00 00
         res 40/00:03:00:00:80/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata2.00: status: { DRDY }
ata2: hard resetting link
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: configured for UDMA/100
ata2: EH complete
Comment 3 Tejun Heo 2008-01-02 03:22:53 UTC
Eeekk.  Can you please give a shot at the following git head?

http://git.kernel.org/?p=linux/kernel/git/tj/libata-dev.git;a=shortlog;h=improve-ATAPI-data-transfer
git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata-dev.git improve-ATAPI-data-transfer

In case you're not gitified yet, I'll attach a patch against -rc6.
Comment 4 Tejun Heo 2008-01-02 03:34:22 UTC
Created attachment 14262 [details]
v2.6.24-rc6-to-improve-ATAPI-data-transfer.patch

Here's the patch.
Comment 5 Joe Ceklosky 2008-01-04 12:35:25 UTC
I used v.2.6.24-fc6 and applied your diff and retested.
Again an error.  Here is what I see in the logs:


ata2.00: ATAPI DMA for WRITE disabled (0x20000000).
         If this continues to happen, please report to
         linux-ide@vger.kernel.org
ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata2.00: cmd a0/01:00:00:00:80/00:00:00:00:00/a0 tag 0 dma 32768 out
         cdb 2a 00 00 05 61 70 00 00  0a 00 00 00 00 00 00 00
         res 40/00:03:00:00:80/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata2.00: status: { DRDY }
ata2: hard resetting link
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: configured for UDMA/100
ata2: EH complete
Comment 6 Tejun Heo 2008-01-05 07:56:35 UTC
Which program are you using to burn?  k3b?  If so, can you please give a shot at wodim and see whether it has the same problem.  In the above log, WRITE(10) is issued w/ 32k data but actual CDB to the drive only specifies 10 bytes to transfer which is very weird.  Short reads are okay but short writes aren't in many cases.

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