Skip to contentSkip to conversation

EH, irq-pio merge and NCQ patches

git-patches Tejun Heo 2 participants 5 messages May 15, 2006 – May 16, 2006 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

Hello, Jeff.

This is the updated git-patches of previously posted five patchsets[1]. Changes are

* SCSI-implement-host_eh_scheduled patch updated as discussed.

* A new patch, which renames ata_down_sata_spd_limit() and friends to sata_*(), is added to prep patchset.

* ata_scr_*() renamed to sata_scr_*()

* ehc->flags has been moved to ehi->flags so that it can also be used to pass flags from IRQ handler to EH.

* Spurious ata_dev_init() prototype killed from ering patch.

* ata_ering is changed to include #ATA_ERING_SIZE predefined ering entries. As this makes add-dev-ering patch trivial, the patch is collapsed into implement-ering.

* sata_sil EH now directly calls ata_bmdma_irq_clear() instead of calling ops->irq_clear().

I didn't add DMA engine stopping to ata_bmdma_freeze() in this series. When BMDMA engine is turned off, all status bits go too. However, the status is used by BMDMA EH to report and to recognize host bus error reprsented as timeout.

To make all of them work, the BMDMA status needs to be stored in ata_bmdma_freeze() and used in EH, which is currently a bit difficult to implement for generic BMDMA. I think we can resolve this later.

The series can be browsed at the following URL.

http://htj.dyndns.org/git/?p=libata-tj.git;a=shortlog;h=for-jeff

If you're satisfied with the updates, please pull from.

git://htj.dyndns.org/libata-tj for-jeff

The tree is tagged with the following.

fj-prep
fj-eh-fw
fj-eh
fj-merge-irq-pio
fj-ncq

Thanks.

[1] http://article.gmane.org/gmane.linux.ide/9959
[2] http://article.gmane.org/gmane.linux.ide/9984
[3] http://article.gmane.org/gmane.linux.ide/9995
[4] http://article.gmane.org/gmane.linux.ide/10005
[5] http://article.gmane.org/gmane.linux.ide/10011

Signature · 1 line
tejun
author
#1 lore raw
Quoted 15 lines · Tejun Heo

Hello, Jeff.

This is the updated git-patches of previously posted five patchsets[1]. Changes are

* SCSI-implement-host_eh_scheduled patch updated as discussed.

* A new patch, which renames ata_down_sata_spd_limit() and friends to sata_*(), is added to prep patchset.

* ata_scr_*() renamed to sata_scr_*()

* ehc->flags has been moved to ehi->flags so that it can also be used to pass flags from IRQ handler to EH.

Quoted 8 lines

* Spurious ata_dev_init() prototype killed from ering patch.

* ata_ering is changed to include #ATA_ERING_SIZE predefined ering entries. As this makes add-dev-ering patch trivial, the patch is collapsed into implement-ering.

* sata_sil EH now directly calls ata_bmdma_irq_clear() instead of calling ops->irq_clear().

I forgot one.

* AHCI now has proper IRQ-mask manipulating freeze/thaw().

Signature · 1 line
tejun
#2 lore raw
In reply to Tejun Heo
Quoted 8 lines · Tejun Heo

I didn't add DMA engine stopping to ata_bmdma_freeze() in this series. When BMDMA engine is turned off, all status bits go too. However, the status is used by BMDMA EH to report and to recognize host bus error reprsented as timeout.

To make all of them work, the BMDMA status needs to be stored in ata_bmdma_freeze() and used in EH, which is currently a bit difficult to implement for generic BMDMA. I think we can resolve this later.

Agree re storing BMDMA status. The very next operation needs to be DMA-stop, though. Otherwise shadow register block isn't accessible. And you must still check BMDMA status -after- stopping DMA, too (that doesn't invalidate your logic quoted above, of course).

Quoted 7 lines

The series can be browsed at the following URL.

http://htj.dyndns.org/git/?p=libata-tj.git;a=shortlog;h=for-jeff

If you're satisfied with the updates, please pull from.

git://htj.dyndns.org/libata-tj for-jeff

Pulled into #upstream and other branches, and pushed to kernel.org. Please check and make sure everything looks OK, after kernel.org finishes mirroring to the outside world.

Thanks.

BTW, it would be nice if you would start with branch #sii-irq when you are updating the sata_sil interrupt handling path. And eventually we want to push #sii-lbt too.

Jeff

author
#3 lore raw
Quoted 11 lines · Jeff Garzik
Quoted 8 lines · Tejun Heo

I didn't add DMA engine stopping to ata_bmdma_freeze() in this series. When BMDMA engine is turned off, all status bits go too. However, the status is used by BMDMA EH to report and to recognize host bus error reprsented as timeout.

To make all of them work, the BMDMA status needs to be stored in ata_bmdma_freeze() and used in EH, which is currently a bit difficult to implement for generic BMDMA. I think we can resolve this later.

Agree re storing BMDMA status. The very next operation needs to be DMA-stop, though. Otherwise shadow register block isn't accessible. And you must still check BMDMA status -after- stopping DMA, too (that doesn't invalidate your logic quoted above, of course).

I see. I think this can be done by making all BMDMA related stuff into a layer between highlevel libata and BMDMA LLDDs. We can move all IO ops into that layer and newer controllers like ahci, sata_sil24 and sata_mv don't have to care about them. Have yet to think about how to do it in simple way though, such that changes to BMDMA LLDDs are minimal.

Quoted 1 line

Pulled into #upstream and other branches, and pushed to kernel.org. Please check and make sure everything looks OK, after kernel.org finishes mirroring to the outside world.

I glanced over them and diffed with my own tree. All look good & dandy.

Quoted 1 line

BTW, it would be nice if you would start with branch #sii-irq when you are updating the sata_sil interrupt handling path.

I certainly can, but I'm not sure it's a good idea to do it. Most likely, it will end up in another rewriting of the rewritten irq handler (commit-wise, it will be merge-sii-irq then rewrite sii-irq). The new one in hp-LLDD-prep uses BMDMA2 to cut down on IO access and also makes use of the fact that sata_sil uses ATA_DMA_INTR bit to indicate IRQ pending even when non-DMA command is in progress, so the whole structure is somewhat different from the one in sii-irq.

Quoted 1 line

And eventually we want to push #sii-lbt too.

Yeap, I looked at that one, too. But, IIRC, the test result wasn't too positive. Am I remembering correctly?

Signature · 1 line
tejun
#4 lore raw
Quoted 7 lines · Tejun Heo
Quoted 6 lines · Jeff Garzik
Quoted 5 lines · Tejun Heo

I didn't add DMA engine stopping to ata_bmdma_freeze() in this series. When BMDMA engine is turned off, all status bits go too. However, the status is used by BMDMA EH to report and to recognize host bus error reprsented as timeout.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

To make all of them work, the BMDMA status needs to be stored in ata_bmdma_freeze() and used in EH, which is currently a bit difficult to implement for generic BMDMA. I think we can resolve this later.

Agree re storing BMDMA status. The very next operation needs to be DMA-stop, though. Otherwise shadow register block isn't accessible. And you must still check BMDMA status -after- stopping DMA, too (that doesn't invalidate your logic quoted above, of course).

I see. I think this can be done by making all BMDMA related stuff into a layer between highlevel libata and BMDMA LLDDs. We can move all IO ops into that layer and newer controllers like ahci, sata_sil24 and sata_mv don't have to care about them. Have yet to think about how to do it in simple way though, such that changes to BMDMA LLDDs are minimal.

In an ideal world, drivers would register themselves as BMDMA drivers rather than libata drivers. Move all the BMDMA hooks to a separate structure, leaving only the high level ->qc_issue() interface in ata_port_operations.

Quoted 3 lines
Quoted 1 line

BTW, it would be nice if you would start with branch #sii-irq when you are updating the sata_sil interrupt handling path.

I certainly can, but I'm not sure it's a good idea to do it. Most likely, it will end up in another rewriting of the rewritten irq handler (commit-wise, it will be merge-sii-irq then rewrite sii-irq). The new one in hp-LLDD-prep uses BMDMA2 to cut down on IO access and also makes use of the fact that sata_sil uses ATA_DMA_INTR bit to indicate IRQ pending even when non-DMA command is in progress, so the whole structure is somewhat different from the one in sii-irq.

OK. I'll drop my branch then.

Quoted 3 lines
Quoted 1 line

And eventually we want to push #sii-lbt too.

Yeap, I looked at that one, too. But, IIRC, the test result wasn't too positive. Am I remembering correctly?

My test results were quite positive :) At least one negative report on 3114 IIRC.

Jeff