* Celleb cannot exit from ata_host_intr()
@ 2007-01-18 6:52 Akira Iguchi
2007-01-19 10:48 ` Albert Lee
0 siblings, 1 reply; 4+ messages in thread
From: Akira Iguchi @ 2007-01-18 6:52 UTC (permalink / raw)
To: linux-ide; +Cc: kou.ishizaki
Hi,
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.
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.
Best regards,
Akira Iguchi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Celleb cannot exit from ata_host_intr()
2007-01-18 6:52 Celleb cannot exit from ata_host_intr() Akira Iguchi
@ 2007-01-19 10:48 ` Albert Lee
2007-01-22 2:48 ` Akira Iguchi
[not found] ` <200701220248.l0M2m9r4016903@toshiba.co.jp>
0 siblings, 2 replies; 4+ messages in thread
From: Albert Lee @ 2007-01-19 10:48 UTC (permalink / raw)
To: Akira Iguchi; +Cc: linux-ide, kou.ishizaki
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Celleb cannot exit from ata_host_intr()
2007-01-19 10:48 ` Albert Lee
@ 2007-01-22 2:48 ` Akira Iguchi
[not found] ` <200701220248.l0M2m9r4016903@toshiba.co.jp>
1 sibling, 0 replies; 4+ messages in thread
From: Akira Iguchi @ 2007-01-22 2:48 UTC (permalink / raw)
To: albertl; +Cc: linux-ide, kou.ishizaki
Hi, Albert-san,
Thank you for your comment.
>Albert Lee wrote:
>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
I understood the meaning of this check.
>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;
My irq is non-shared, but above code doesn't work.
I got the following register values at this point:
- DMA_STATUS = 0x01 (ATA_DMA_ACTIVE is 1)
- ALT_STATUS = 0x51 (ERR is 1)
Now I think I should handle this problem in my bmdma_status() hook
because it is a device specific problem.
I intend to emulate ATA_DMA_INTR if the following conditions are true:
- In ISR
- ALT_STATUS[ERR] = 1
- DMA_STATUS[DMA_ACTIVE] = 1
Best regards,
Akira iguchi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Celleb cannot exit from ata_host_intr()
[not found] ` <200701220248.l0M2m9r4016903@toshiba.co.jp>
@ 2007-01-22 7:58 ` Albert Lee
0 siblings, 0 replies; 4+ messages in thread
From: Albert Lee @ 2007-01-22 7:58 UTC (permalink / raw)
To: Akira Iguchi; +Cc: albertl, linux-ide, kou.ishizaki
Hi Iguchi-san,
>
>
>>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;
>
>
> My irq is non-shared, but above code doesn't work.
> I got the following register values at this point:
> - DMA_STATUS = 0x01 (ATA_DMA_ACTIVE is 1)
> - ALT_STATUS = 0x51 (ERR is 1)
Ah, I see, so the adapter thinks BMDMA is still active. :(
Wonder whether this behavior would be related to CD-ROM drive...
i.e. Does it possibly work ok with other CD-ROM models?
>
> Now I think I should handle this problem in my bmdma_status() hook
> because it is a device specific problem.
> I intend to emulate ATA_DMA_INTR if the following conditions are true:
> - In ISR
> - ALT_STATUS[ERR] = 1
> - DMA_STATUS[DMA_ACTIVE] = 1
>
>
Some controller like Promise 2027x has an extra register/bit for INTRQ.
Don't know whether Celleb has such hardware bit or not. If do, maybe
such bit can be also used as substitute for bmdma:INTR.
--
albert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-22 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 6:52 Celleb cannot exit from ata_host_intr() Akira Iguchi
2007-01-19 10:48 ` Albert Lee
2007-01-22 2:48 ` Akira Iguchi
[not found] ` <200701220248.l0M2m9r4016903@toshiba.co.jp>
2007-01-22 7:58 ` Albert Lee
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).