linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Vlad Codrea <VladCodrea@mail.utexas.edu>
Cc: albertl@mail.com, Tejun Heo <htejun@gmail.com>,
	linux-ide@vger.kernel.org
Subject: Re: DVD drive fails in 2.6.20.2
Date: Sat, 17 Mar 2007 00:34:04 +0800	[thread overview]
Message-ID: <45FAC6FC.4020105@tw.ibm.com> (raw)
In-Reply-To: <45FA07E2.6080008@mail.utexas.edu>

Vlad Codrea wrote:

> 
> Hi,
> 
> I've attached the full dmesg after applying Albert's patch. The new
> messages seem to be:
> 
> ata2: protocol 7 task_state 4
> ata2: protocol 7 task_state 4 (dev_stat 0x58)
> ata2: protocol 7 task_state 2
> ata2: protocol 7 task_state 2 (dev_stat 0x58)
> ata2: protocol 7 task_state 3 (dev_stat 0x58)
> 
 
<snip>

> libata version 2.00 loaded.
> ata_piix 0000:00:07.1: version 2.00ac7
> ata1: PATA max UDMA/33 cmd 0x1F0 ctl 0x3F6 bmdma 0xFCF0 irq 14
> ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xFCF8 irq 15
> scsi0 : ata_piix
> PM: Adding info for No Bus:host0
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> USB Universal Host Controller Interface driver v3.0
> ata1.00: ATA-4, max UDMA/33, 12685680 sectors: LBA 
> ata1.00: ata1: dev 0 multi count 16
> ata1.00: configured for UDMA/33
> scsi1 : ata_piix
> PM: Adding info for No Bus:host1
> ata2.00: ATAPI, max MWDMA2, CDB intr
> ata2.00: configured for MWDMA2
> PM: Adding info for No Bus:target0:0:0
> scsi 0:0:0:0: Direct-Access     ATA      IBM-DADA-26480   AD6O PQ: 0 ANSI: 5
> PM: Adding info for scsi:0:0:0:0
> PM: Adding info for No Bus:target1:0:0
> ata2: protocol 7 task_state 4
> ata2: protocol 7 task_state 4 (dev_stat 0x58)
> ata2: protocol 7 task_state 2
> ata2: protocol 7 task_state 2 (dev_stat 0x58)
> ata2: protocol 7 task_state 3 (dev_stat 0x58)
> ata2.00: ata_eh_analyze_tf, AC_ERR_HSM, 0x58
> ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
> ata2.00: (BMDMA stat 0x5)
> ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
>          res 58/00:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
> ata2: soft resetting port
> ata2: port is slow to respond, please be patient (Status 0xd8)
> ata2: port failed to respond (30 secs, Status 0xd8)
> ATA: abnormal status 0xD8 on port 0x177
> ATA: abnormal status 0xD8 on port 0x177
> ATA: abnormal status 0xD8 on port 0x177
> ATA: abnormal status 0xD8 on port 0x177
> ATA: abnormal status 0xD8 on port 0x177

ata2: protocol 7 task_state 4   <=== The device interrupts to receive CDB
ata2: protocol 7 task_state 4 (dev_stat 0x58)  <== Good, DRQ seen. CDB sent.
ata2: protocol 7 task_state 2   <=== interrupt. We expect DMA complete.
ata2: protocol 7 task_state 2 (dev_stat 0x58) <== What? DRQ set? No good.
ata2: protocol 7 task_state 3 (dev_stat 0x58) <== HSM violation.
(BMDMA stat 0x5) <=== Interrupted, DMA active.

Still no clue why the device wrongly sets DRQ here for a DMA transfer...
Possibilities:
1. HSM sent all CDB to the device, but the device is waiting for more CDB data?
2. HSM asked the drive to do ATAPI DMA, but the drive is doing PIO?

Hi Vlad,

Could you please turn off ATAPI DMA and see if the drive works under PIO,
thanks.

--
albert

(This is not a patch. Please edit drivers/ata/libata-core.c as below.)

int ata_check_atapi_dma(struct ata_queued_cmd *qc)
{
	struct ata_port *ap = qc->ap;
	int rc = 0; /* Assume ATAPI DMA is OK by default */

	if (ap->ops->check_atapi_dma)
		rc = ap->ops->check_atapi_dma(qc);

 rc = 1; (<==== Please add "rc = 1;" here to turn off ATAPI DMA. )

	return rc;
}


  reply	other threads:[~2007-03-16 16:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13  5:09 DVD drive fails in 2.6.20.2 Vlad Codrea
2007-03-14  3:57 ` Tejun Heo
2007-03-14  4:11 ` Tejun Heo
2007-03-14 15:15   ` Vlad Codrea
2007-03-14 16:58     ` Vlad Codrea
2007-03-15  6:22     ` Tejun Heo
2007-03-15 14:00       ` Vlad Codrea
2007-03-15 17:57         ` Albert Lee
2007-03-16  2:58           ` Vlad Codrea
2007-03-16 16:34             ` Albert Lee [this message]
2007-03-16 18:09               ` Vlad Codrea
2007-03-17  4:43                 ` Albert Lee
2007-03-18  1:26                   ` Vlad Codrea
2007-03-18 10:57                     ` Albert Lee
2007-03-19  5:58                       ` Vlad Codrea
2007-03-19  6:48                         ` Albert Lee
2007-03-19  7:01                           ` Albert Lee
2007-03-19 13:22                             ` Vlad Codrea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45FAC6FC.4020105@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=VladCodrea@mail.utexas.edu \
    --cc=albertl@mail.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).