All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: linux-ide@vger.kernel.org, kou.ishizaki@toshiba.co.jp
Subject: Re: Celleb cannot exit from ata_host_intr()
Date: Fri, 19 Jan 2007 18:48:35 +0800	[thread overview]
Message-ID: <45B0A203.1090508@tw.ibm.com> (raw)
In-Reply-To: <200701180652.l0I6qKSE018982@toshiba.co.jp>

Akira Iguchi wrote:
> 
> I have a problem that our hardware (Celleb) cannot exit from
> ata_host_intr() when ATAPI DMA data read fails.
> 
> This PATA controller sets bit2 (ATA_DMA_INTR) of BMDMA status register
> after it finished DMA data read. If ATAPI DMA data read fails
> due to no CDROM, it doesn't transfer data and generates an interrupt.
> In this case, bit2 of BMDMA status register is not set.

This behavior is different from other adapters. For other adapters,
ATA_DMA_INTR bit of BMDMA status is set whenever the drive raises INTRQ.

> 
> libata ISR (ata_host_intr()) checks this bit by the following code:
> 
> 			/* if it's not our irq... */
> 			if (!(host_stat & ATA_DMA_INTR))
> 				goto idle_irq;
> 
> 
> Our driver always hits this check. As a result, ISR loops forever.
> I temporarily use libata by removing this check.
> 
> I wonder if this check is necessary. In drivers/ide, cdrom_decode_status()
> seems to check IDE STATUS register instead of BMDMA status register.
> If there is no problem, I hope this check will be removed.
> 

This check is needed to make sure it is "my irq". Otherwise we might
- incorrectly stop BMDMA if another PCI adapter raise the same shared irq 
- incorrectly read ALT_STATUS when DD0-DD15 being used for DMA transfer

Is the irq of Celleb IDE shared with other adapters?
If the irq is non-shared, could you check if the following code works
for Celleb:

			/* if it's not our irq... */
			if ((host_stat & ATA_DMA_ACTIVE) &&
			    !(host_stat & ATA_DMA_INTR))
				goto idle_irq;


--
albert



  reply	other threads:[~2007-01-19 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18  6:52 Celleb cannot exit from ata_host_intr() Akira Iguchi
2007-01-19 10:48 ` Albert Lee [this message]
2007-01-22  2:48   ` Akira Iguchi
     [not found]   ` <200701220248.l0M2m9r4016903@toshiba.co.jp>
2007-01-22  7:58     ` Albert Lee

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=45B0A203.1090508@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=akira2.iguchi@toshiba.co.jp \
    --cc=albertl@mail.com \
    --cc=kou.ishizaki@toshiba.co.jp \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.